-
- Downloads
[FIX] sale_margin: make sale.order.line create override handle section lines
The sale.order.line model has a 'display_type' field since 762adede that specify if the line is a dummy line used for presentation purposes. These dummy lines are 'section' lines or 'note' lines. If it is the case, the line does not have a product_id. The sale_margin module overrides the create method of lines to add the margin computation, assuming there are no dummy lines since that part of the code is older than the new feature. As a result the line creation would crash on a key error on dummy lines. We now skip the margin computation if the line has a display_type. opw 1939881 closes odoo/odoo#31035
Please register or sign in to comment