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.

14 lines
484 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)]})