diff --git a/invoice.py b/invoice.py index 9098208309..faaf2a88a8 100644 --- a/invoice.py +++ b/invoice.py @@ -1938,22 +1938,26 @@ class FiscalYear(OSV): 'Customer Invoice Sequence', required=True, domain="[('code', '=', 'account.invoice')," \ "['OR', ('company', '=', company)," \ - "('company', '=', False)]]") + "('company', '=', False)]]", + context="{'code': 'account.invoice', 'company': company}") in_invoice_sequence = fields.Many2One('ir.sequence.strict', 'Supplier Invoice Sequence', required=True, domain="[('code', '=', 'account.invoice')," \ "['OR', ('company', '=', company)," \ - "('company', '=', False)]]") + "('company', '=', False)]]", + context="{'code': 'account.invoice', 'company': company}") out_credit_note_sequence = fields.Many2One('ir.sequence.strict', 'Customer Credit Note Sequence', required=True, domain="[('code', '=', 'account.invoice')," \ "['OR', ('company', '=', company)," \ - "('company', '=', False)]]") + "('company', '=', False)]]", + context="{'code': 'account.invoice', 'company': company}") in_credit_note_sequence = fields.Many2One('ir.sequence.strict', 'Supplier Credit Note Sequence', required=True, domain="[('code', '=', 'account.invoice')," \ "['OR', ('company', '=', company)," \ - "('company', '=', False)]]") + "('company', '=', False)]]", + context="{'code': 'account.invoice', 'company': company}") def __init__(self): super(FiscalYear, self).__init__() @@ -2008,6 +2012,7 @@ class Period(OSV): out_invoice_sequence = fields.Many2One('ir.sequence.strict', 'Customer Invoice Sequence', domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice'}", states={ 'required': "type == 'standard'", 'invisible': "type != 'standard'", @@ -2015,6 +2020,7 @@ class Period(OSV): in_invoice_sequence = fields.Many2One('ir.sequence.strict', 'Supplier Invoice Sequence', domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice'}", states={ 'required': "type == 'standard'", 'invisible': "type != 'standard'", @@ -2022,6 +2028,7 @@ class Period(OSV): out_credit_note_sequence = fields.Many2One('ir.sequence.strict', 'Customer Credit Note Sequence', domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice'}", states={ 'required': "type == 'standard'", 'invisible': "type != 'standard'", @@ -2029,6 +2036,7 @@ class Period(OSV): in_credit_note_sequence = fields.Many2One('ir.sequence.strict', 'Supplier Credit Note Sequence', domain="[('code', '=', 'account.invoice')]", + context="{'code': 'account.invoice'}", states={ 'required': "type == 'standard'", 'invisible': "type != 'standard'",