Jorge Pinna Puissant bdef3505bd [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>
2020-02-20 12:22:50 +00:00
2020-02-13 11:45:39 +00:00
…
2019-10-03 12:48:09 +00:00
…
…
…
2019-11-08 11:24:04 +00:00
2019-10-03 12:48:09 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%