Since 3d04e44880 [0], the class `article`
is used instead of `page`. As reports not using `external_layout` does
still manually used `page` class as wrapper, there were not rendered
properly. Force these reports to correctly wrap their content into an
`article` div by using a dedicated template.
Closes#15118
[0] more precisely https://git.io/vM58c
If the database is create in monolangue and `en_US` is not present, the default
value computation crashes as tries to assign a value not present in the
selection (all installed languages).
Use the environment language as default (same as the default of res.partner).
It may be empty but not a value not existant in the database.
Fixes#15165Closes#15176
This commit has been forward-ported by error in 9 and +.
Update website_sale.js to fix impacted databases.
Decimal precision in v8 = 0.01, and v9+ = 2
With fwd port, int(0.01) instead of int(2) because data-precision
appears 2x, first with 0.01 (v8), secondly with 2 (v9+).
Js fix uses the last decimal-precision (v9) instead of the first (v8)
The "Inventory at Date" has several issues:
- graph and pivot views are not available despite their existence
- the views are not linked to an action, thus it is impossible to save
it on the dashboard.
opw-703649
If the user tries to save on the dashboard a view which was not open
through an existing action, the call to method `add_to_dashboard`
crashes because of incorrect arguments (`action_id` is undefined in JS).
This is for example the case when trying to save an "Inventory at Date"
in the dashboard (will be fixed in a subsequent commit).
opw-703649
The "Inventory at Date" has several issues:
- graph and pivot views are not available despite their existence
- the views are not linked to an action, thus it is impossible to save
it on the dashboard.
opw-703649
If the user tries to save on the dashboard a view which was not open
through an existing action, the call to method `add_to_dashboard`
crashes because of incorrect arguments (`action_id` is undefined in JS).
This is for example the case when trying to save an "Inventory at Date"
in the dashboard (will be fixed in a subsequent commit).
opw-703649
Fix several references to `groups=` in views that were incorrect or declared in
a way that the view or code was evaluated before the group creation (order of
creation) or errors in group name.
Closes#15098Fixes#15094
The group base.group_user is used in the computation of the share column which
is executed at column creation, before the group is imported.
Set it in base.sql to already have an xmlid to resolve.
The group sale.group_discount_per_so_line is used in account but declared in
sale. As the has_group method ignores unexistant fields, this field was never
displayed until somebody install sale.
In account, replace the discount group with debug mode.
Remove it from the report as it was only displayed when at least one discount
was set (not possible if the discount field is not displayed).
In sale, makes xpath to use the correct group.
Fixes 15094
Be a little less strict when not showing o2m list view warning so if the
o2m is not editable (a modal is open instead of editing inline) we still
show warnings.
Also have warnings over modal overlays so they can be used for modals.
opw-702333
When seller_ids are set on a product with a Minimal Order Quantity(MOQ),
the function _select_seller didn't get the ordered quantity so the
sellers with an MOQ were never selected.
opw:704856
This removal has led to a necessary refactoring:
- make the setup of field attributes extensible;
- make the instantiation of custom fields extensible;
- delegate model and field reflection to `ir.model` and `ir.model.fields`;
- move the implementation of sparse and serialized fields to module `base_sparse_field`;
With 003d85b instead of getting the name of the relation
field_relation we get field_relation/id.
But the data about the related fields are not gotten all at once when
opening the export modal. They are gotten by clicking on the arrow of
the related record.
So we need to have these /id information saved in the export list,
otherwise for example the related records can be missing when exporting
from an export list, whilst everything was OK without using the saved
export list.
With the previous change, an export list could contain an id and .id
fields for the same relational field, so a change must also be done in
fields_info method used when getting a saved list.
opw-665994
opw-693535
note: adapted forward-port of 8.0's 29be9ae80 which was lost when
merging web enterprise onto web community.
When posting inventory during a manufacturing order,
all raw material and finished product moves are used,
also those done from a previous post inventory.
This is no problem for the moving of quants because
a filtering is done in the move_validate method,
but it is a problem for the price calculation in
mrp_account and for linking the consumed/produced_quant_ids
of the quants of the raw and finished moves.
Before this fix, it would calculate already consumed materials
a second time in the price of the finished products and would
link quants produced with previously consumed quants (and vice versa)
when doing a second post inventory.
We add a test to show the issue.
The invoice lines were generated almost fully from the given purchase line.
For a few field, the information was retrieved from the purchase order selected
in the onchange.
In standard it makes no difference but the purpose of this generic method is to
rely only of the line given as parameter.
In the scenario of extensions to generate invoice lines from several purchase
orders, this method could not be used as was relying on the previously selected
purchase order.
This was done at OCA/purchase-workflow#319
This commit ensure to only rely on givem `line` to generate invoice lines.
Closes#15104