Considering recent recurring bug reports and the fact that bridge modules
now automatically compute the cost considering logistics, timesheets & expense
flows, the ability to manually edit the cost on a sale.order.line is now disabled.
In most cases, manually specified costs are automatically reset because of
stock/timesheets/expenses added dependencies on the purchase_price field.
Also adapt existing tests and use the new Sale tests common.
closesodoo/odoo#97977
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
* Split python file by classes
* Remove empty ir.model.access.csv file
* Correct name for views file
* Use setUpClass instead of setUp to avoid multiple setups during tests
Part-of: odoo/odoo#85001
Installing sale_margin module on a db with a lot of sale.order was impossible.
This commit significantly improves performances.
Went from many hours (forecasted) to 15 minutes on a db with 300k orders
For sale.order:
- Duplicating logic between edit mode and non edit mode
- Edit mode logic stays the same as before
- Non edit mode uses read_group to speed up the computation
X-original-commit: 9f1ea7427cdb6984f175f5111e4c9a4c5f013af2
New field to express the profitability percentage of a Sales Order (/SO line).
task-2033253
closesodoo/odoo#39926
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
PURPOSE
=======
1. Unified product demo data
2. Less demo: one per use case
3. Demo data for all models
Specification
=============
1. Refactor all the brol in the demo data
2. Adapt the tests to make them green, as some products are
renamed, removed, created in python instead of as demo data
...
Moves UoM models, test and data to a new addon in
order to be able to use uom without product.
A simple example is be to be able to use UoM for
timesheets.
This commit only move code, and adapt xml ids
without chaging any feature or functionnal
behavior.
Note: 'product' module now depends on new
'uom' module.
If some required fields are not present in the created values, they are computed
based on the onchange.
This was introduced at 5c4765130 to allow to import sale order lines without
specifying uom.
If sale_margin is installed, the same issue will occure as it assumes there is
a value for product_uom
Add test, courtesy of Mourad Elhadj Mimoune, Akretion
Closes#17613