I have a problem because when I create a field in sale.order.line model. This field does not appear in the database Postgresql when I make a query in sale_order_line.
This is the statement I created field in the model sale.order.line :
niu = fields.Char(string="NIU", compute="_niu_validation", default=" ", readonly=True)
Please if anyone could help me , I'll be very grateful. Thank you for your time and dedication.
That's is a computed field that it's not stored in the database, if you wanna store the result of the computation you need to add the argument store=True to the field definition, like:
niu = fields.Char(string="NIU", compute="_niu_validation", default=" ", readonly=True, store=True)
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 2/29/16, 8:12 AM|
|Seen: 287 times|
|Last updated: 2/29/16, 8:22 AM|