Adrian Torres 4584aed5e5 [FIX] account: avoid computing uom price if no product
Before this commit:

* Enable UOMs
* Create a new invoice and invoice line
* Set *only* the uom field of the invoice line
* Singleton expected error

This happens because the method _compute_price of `uom.uom` expects a
singleton, however since no product has been defined yet, it gets an
empty recordset which of course doesn't comply with self.ensure_one(),
raising a Singleton Error.

Functionally speaking, it makes sense to define a product before
choosing an uom, however a Singleton Error is an unexpected error, so
instead of doing that, we only calculate the price_unit if a product has
been chosen.

Fixes #28269

closes odoo/odoo#28278
2018-10-30 10:07:35 +00:00
2018-10-29 09:13:59 +00:00
2015-09-08 15:45:09 +02:00
2018-10-09 13:44:38 +00:00
2015-09-08 17:58:38 +02:00
2018-04-18 15:59:05 +02: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, Purchase Management, ...

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.

Then follow 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%