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.

15 lines
516 B

  1. # -*- coding: utf-8 -*-
  2. # © 2017 Akretion (http://www.akretion.com)
  3. # @author: Alexis de Lattre <alexis.delattre@akretion.com>
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  5. from odoo import models, fields
  6. class AccountInvoice(models.Model):
  7. _inherit = 'account.invoice'
  8. sale_agreement_id = fields.Many2one(
  9. 'sale.agreement', string='Sale Agreement', ondelete='restrict',
  10. readonly=True, states={'draft': [('readonly', False)]},
  11. track_visibility='onchange')