56ef824d3960a371f4d56d84e90792b021a782ec
__Current behavior before commit:__ When a sale order is created with a product added to the cart, `payment_term_id` is initially set by [sale_get_payment_term][1]. However, when the user sets their address, `payment_term_id` is then set to `partner_id.property_payment_term_id` due to the triggering of [_compute_payment_term_id][2]. This means that `payment_term_id` is computed differently if the user edits his address before confirming the order or not. (Resulting in it being `False` most of the time). __Description of the fix:__ Inherit [_compute_payment_term_id][2] to set `payment_term_id` using [sale_get_payment_term][1] from the **website_sale** module. __Steps to reproduce the issue on runbot:__ - Add a product to the cart through the website. → A new sale order will be created with payment terms set. - Proceed to checkout and edit the address on the website → The sale order payment terms will be removed opw-3492868 [1]: https://github.com/odoo/odoo/blob/1336ecf08210b04fb4b365d9e3a2bf8ae434de51/addons/website_sale/models/website.py#L215 [2]: https://github.com/odoo/odoo/blob/1336ecf08210b04fb4b365d9e3a2bf8ae434de51/addons/sale/models/sale_order.py#L518 closes odoo/odoo#145023 X-original-commit: 14f1168d1a27c04312a42f365ebfd24c0d07dba8 Signed-off-by: Julien Launois (jula) <jula@odoo.com>
…
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%