John Laterre (jol) 8d2eb9d869 [FIX] base: prevent tracebacks on rate creation
Since this commit, https://github.com/odoo/odoo/commit/32ada4a415a14052d780f351edb82a0011561451,
when adding a new rate from the tree view,
if the `name` field is emptied (despite having a default value),
the `_onchange_rate_warning()` method will generate a traceback
because it will call `_get_latest_rate()` that relies on the `name`
field to order the company rates.

Steps to reproduce:
- Go to the Accounting App.
- Click on Configuration > Currencies.
- Select any currency and click on "Add a line" in the Rates tab.
- Remove the default value from the "Date" field and leave it empty.
- Now try to change "Unit per USD". A traceback should be triggered.

New behavior:
With this fix, an error message will now invite the user to set the `name`
(a.k.a. 'Date') correctly.

closes odoo/odoo#100874

X-original-commit: ddced61ca27f96b89af32f0b99e225321f966681
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-09-23 00:38:55 +02:00
2022-09-20 13:48:49 +02:00
2022-09-09 11:12:25 +02:00
…
…
…
2022-01-14 15:44:52 +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%