Julien Castiaux a152c536b7 [FIX] fields: Better error for invalid @depends
Create a model as follow:

    class FooModel(models.Model):
        _name = 'foo'
        bar = fields.Char(compute="compute_bar")

        @depends('bazz')  # wrong dependency, bazz does not exist
        def compute_bar(self):
            for rec in self:
                rec.bar = "Babar raconte des beaux bobards."

Uppon -u foo_module, a ValueError is rose for the invalid dependency
with the following message:

> Field foo.bar cannot find dependency bazz on model foo.

We had feedback the error message was not very clear to some users,
the new error message is:

> Wrong @depends on 'compute_bar' (compute method of field foo.bar).
> Dependency field 'bazz' not found in model foo.

closes odoo/odoo#62328

Task: 2366612
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2020-11-26 09:17:30 +00:00
2020-11-30 07:07:58 +00:00
2020-04-20 11:41:39 +00:00
…
…
…
…
…
2020-09-28 14:07:25 +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%