diff options
| author | Nans Lefebvre <len@odoo.com> | 2019-02-12 15:53:53 +0000 |
|---|---|---|
| committer | Nans Lefebvre <len@odoo.com> | 2019-02-13 08:24:59 +0000 |
| commit | 3b256ba487df8ed3ef28eddec25af75ce3be4677 (patch) | |
| tree | 4e0d3b0d5f8bb3e8476e58f919f7de48d872a338 /addons/mail/data | |
| parent | f0b3e847d86cd6af1abc7d3f80f5a4727d961356 (diff) | |
[FIX] sale_margin: make sale.order.line create override handle section lines
The sale.order.line model has a 'display_type' field since 762adedece1c6c2b97b2
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
Diffstat (limited to 'addons/mail/data')
0 files changed, 0 insertions, 0 deletions
