My many2one field was working before but for some reasons, it won't save now when I tried it multiple times. I have declared the field like so:
product_id = fields.Many2one(
comodel_name="product.product",
string="Product")
quantity = fields.Float()
price = fields.Float()
I override the create() method of my model because i have additional process to do.
def create(self, values):
my_model_line = super(MyModel, self).create(values)
# Insert here my other process -> i do not update my record/line just added a computation here
return my_model_line
Here is a sample behavior:
1. User created a line
My Line
Product Quantity Value
[CHAIR] 1.0 10.0
2. User saves -> The line was displayed like this
My Line
Product Quantity Value
1.0 10.0
the database is also null
Before, the behavior was correct but i'm not sure now since it's not returning an error.
Sorry I don't have enough details to see why it's not working. It's easier if you share the module link