You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
762 B

  1. # © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import models, fields
  4. class SaleOrder(models.Model):
  5. _inherit = 'sale.order'
  6. agreement_id = fields.Many2one(
  7. comodel_name='agreement', string='Agreement', ondelete='restrict',
  8. track_visibility='onchange', readonly=True, copy=False,
  9. states={'draft': [('readonly', False)], 'sent': [('readonly', False)]})
  10. agreement_type_id = fields.Many2one(
  11. comodel_name="agreement.type", string="Agreement Type",
  12. ondelete="restrict",
  13. track_visibility='onchange', readonly=True, copy=True,
  14. states={'draft': [('readonly', False)], 'sent': [('readonly', False)]})