summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorJorge Pinna Puissant <jpp@odoo.com>2020-02-19 09:42:43 +0000
committerNicolas Martinelli <nim@odoo.com>2020-02-20 12:22:50 +0000
commitbdef3505bd7ab27ace8599f5beecaa2dcd189241 (patch)
tree9f447e9608c1cb95167dffa40c8323a29cbd919a /addons/web/static
parent59dfbc08297a89c2a196c456c3b713716d638b77 (diff)
[FIX] sale: avoid adding account_id into section lines
- create a SO with a section; - create an invoice from the SO. Before this commit, an SQL constraint was raised : 'Forbidden unit price, account and quantity on non-accountable invoice line'. This error occurs, because the default_get function adds a default account_id to all the lines (including section lines) if a journal_id is passed in the context. The journal_id is added in the context since : 03353118d3176463fbf779471cc272d31fb11b2e Now, the default_get function only adds a default account_id if the line is not a section line or a note line. This avoids the SQL constraint to be raised, and the invoice is correctly created. opw-2199356 opw-2199017 opw-2198781 opw-2198650 closes odoo/odoo#45809 X-original-commit: d71830f5d9f9a717194aaa8ec993d99739fe09e7 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static')
0 files changed, 0 insertions, 0 deletions