I have two companies and I'd like that the field analytic account in the invoice lines becomes a required field only for one company.
I did this:
class account_invoice_line(osv.osv):
_inherit = 'account.invoice.line'
_columns = {
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True),
}
The field is now required for my two companies, but I don't have analytic accounting for both of my companies.
In settings > Configuration > accounting, when I uncheck "Analytic accounting for sales ", it is unchecked in both companies. When I check it, it is checked in both companies!
If that field would not appear for one of the companies, that would be good too.