i create a new object account.move.oi with inheritance from account.move :
_name = 'account.move.oi'
_inherit = 'account.move'
seq = fields.Char(string="OI No", default='New)
and in create function:
when i try to add new line_ids i get the error:
ValueError: Invalid field 'seq' on model 'account.move'
any help please
create function :
@api.model
def create(self, vals):
if vals.get('seq', 'New') == 'New':
vals['seq'] = self.env['ir.sequence'].next_by_code('ordre.imputation') + '20' or 'New'
result = super(AccountOI, self).create(vals)
return result