Community mailing list archives
Re: Performance of many2oneby
I would have a field tax ID at PO level with onchange function to populate the po lines. Product onchange needs to be adapted as well for new created lines.
This way you keep the standard feature/structure and have an easy way to populate your PO.
Last but not least you can think of using the default property for tax field to pre populate your PO tax ID
I would like to have the community opinion.
We have a client who would like to choose the tax from the purchase order, instead of selecting it for each line.
I can see two possibilities:
1) add a tax code on the model purchase.order. Then on the purchase.order.line, replacing the tax by a related field (related='order_id.tax_i'd)
2) we can override the write method of the purchase order line, and ensure that the tax on the line is the same as the tax on the order
Which one would you recommend? Taking into consideration the performance? I understand that adding related fields slow down is Odoo.
Do you have any other suggestion otherwise?
Eric Caudal (from my mobile)