From da0595dc9f92e9af17ead97e14c4f336ef18529d Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Wed, 9 Jan 2019 15:12:26 +0000 Subject: [PATCH] [IMP] account: Make company_id not required on payment.term --- addons/account/models/account_invoice.py | 2 +- addons/account/views/account_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index fd08620f992..a7c2f6bf562 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -2002,7 +2002,7 @@ class AccountPaymentTerm(models.Model): active = fields.Boolean(default=True, help="If the active field is set to False, it will allow you to hide the payment terms without removing it.") note = fields.Text(string='Description on the Invoice', translate=True) line_ids = fields.One2many('account.payment.term.line', 'payment_id', string='Terms', copy=True, default=_default_line_ids) - company_id = fields.Many2one('res.company', string='Company', required=True, default=lambda self: self.env.user.company_id) + company_id = fields.Many2one('res.company', string='Company') sequence = fields.Integer(required=True, default=10) @api.constrains('line_ids') diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml index 500028bfcf5..8cadf42ea8b 100644 --- a/addons/account/views/account_view.xml +++ b/addons/account/views/account_view.xml @@ -1832,7 +1832,7 @@ - +