Hi,
I have created a new model inherit from sale.order.line like this :
class sale_order_line_option(models.Model):
_name="sale.order.line.option"
_inherit = "sale.order.line"
accept_option = fields.Boolean(u'Option prise',readonly=True,
states={'draft': [('readonly', False)],'sent': [('readonly', False)]})
tax_id = fields.Many2many('account.tax', 'sale_order_option_tax', 'order_line_option_id', 'tax_id',readonly=True,
states={'draft': [('readonly', False)]})
I create this model because I want two differents table : 1 table for sale.order.line and 1 table for sale.order.line.option
And I inherit sale.order too :
class sale_order(models.Model):
_inherit = "sale.order"
order_line_option = fields.One2many('sale.order.line.option', 'order_id', 'Options',readonly=True,
states={'draft': [('readonly', False)],'sent': [('readonly', False)]})
My problem it's I can't create an order if I add a sale.order.line!
I have this error : One of the documents you are trying to access has been deleted, please try again after refreshing.
( I have no error if I just add a sale.order.line.option )
Thanks in advance for yours answers