In case a production order loses its procurement group. The backorder
generation process do not have access to the last backorder sequence
used. This commit set a default value to avoid any traceback.
The new backorder name will not be guaranteed exact related to the
production sequence but will be unique in any cases.
closesodoo/odoo#76091
X-original-commit: aae07e88a8166cf26a8c81bb8ee37d630fd6672c
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
During the refactoring of the project_graph and project_pivot views,
their static key "components" were incorectly set making impossible for
OWL to render them. This is now fixed.
closesodoo/odoo#76065
Related: odoo/enterprise#20647
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
We clean various graph archs taking into consideration that:
- the default type of a graph is "bar".
- a bar chart is by default stacked.
- the field attributes type="row" and type="col" does not make sense for
a graph view (since its implementation was separated from the pivot
implementation a long time ago))
- the boolean attributes should now take 1 or 0 as value (but the other
values are accepted for retrocompatibility).
Part-of: odoo/odoo#76065
Setting a default value on a readonly related field without an inverse
method is nonsense. We log some warning when it happens.
We also fixed other cases where a related field has a default value
that overrides the target field's value.
closesodoo/odoo#67762
Related: odoo/enterprise#17313
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Steps to reproduce the bug:
- Install sale and inventory
- Create a SO with Qty 10 and confirm it
- Go to the delivery
- Make partial delivery of 5 units and create back-order of remaining 5 units.
- the status of backorder is “waitting”
- Get back to the sale order and cancel it
- the wizard “sale_order_cancel” is displayed, which gives a reminder of some partial deliveries are already done and asks to confirm the cancellation of SO
- Do not confirm the cancellation of SO and click on the cancel button
- Go to the delivery
- The pending deliveries are cancelled
Problem:
The `"action_cancel"` function in the `"sale_order"` model is first called to cancel pending deliveries,
then the `"action_cancel"` function of the `"sale"` model is called, but in that we check if whether one of the deliveries
is already completed in order to display the wizard.
But if the customer clicks the cancel button in the wizard, the SO will not be canceled, but the pending deliveries will already be.
Solution:
Check in the `"action_cancel"` function of the `"sale.order"` model if whether one of the deliveries is already been completed,
if so, do not cancel the pending deliveries and wait for user confirmation in the wizard.
opw-2623404
closesodoo/odoo#76050
X-original-commit: ca7d5701c6a46f7781bdc9af9f2d26cca880eb93
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
In case there is a `product_qty` column added by a custom module,
`product_qty`, without specifying from which table to take it from
in the view definition, can lead to an ambiguous definition.
```
2021-08-25 12:25:31,624 1145 ERROR db_23001 odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/home/odoo/src/odoo/13.0/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo/src/odoo/13.0/odoo/modules/loading.py", line 424, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/home/odoo/src/odoo/13.0/odoo/modules/loading.py", line 315, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/home/odoo/src/odoo/13.0/odoo/modules/loading.py", line 202, in load_module_graph
registry.init_models(cr, model_names, {'module': package.name}, new_install)
File "/home/odoo/src/odoo/13.0/odoo/modules/registry.py", line 370, in init_models
model.init()
File "/home/odoo/src/odoo/13.0/addons/stock/report/report_stock_quantity.py", line 126, in init
self.env.cr.execute(query)
File "/home/odoo/src/odoo/13.0/odoo/sql_db.py", line 173, in wrapper
return f(self, *args, **kwargs)
File "/home/odoo/src/odoo/13.0/odoo/sql_db.py", line 250, in execute
res = self._obj.execute(query, params)
psycopg2.errors.AmbiguousColumn: column reference "product_qty" is ambiguous
LINE 21: ...AND whd.id IS NULL) OR ls.usage = 'transit' THEN -product_qt...
```
upg-23001
closesodoo/odoo#76049
X-original-commit: 13468160f8b87fa09a3eb205fb0aacf58650b829
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Steps to reproduce the bug:
- Go to Accounting
- Create an invoice:
- select a `invoice_payment_term_id`
- Add product on “account.move.live”
- Save and duplicate it.
Problem:
The `invoice_payment_term_id` field will be duplicated on the second invoice, but not the `invoice_date_due` field
Solution:
The `invoice_date_due` field is set in the `_recompute_payment_terms_lines()` function when adding an `account.move.line`.
As in the duplicate invoice we also have an `account.move.line` we can therefore call this function so that the field is set
https://github.com/odoo/odoo/blob/14.0/addons/account/models/account_move.py#L1043
opw- 2628333
closesodoo/odoo#76045
X-original-commit: aa2e4b9a90d4b67a8b65542ece37ced9b1460557
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
Rounding in purchase order is 'UP' which is causing issue when doing
receipt in a different uom than the purchase. Rounding should be
'HALF-UP'
Added test in purchase and sales to ensure this issue is detected in the
future.
closesodoo/odoo#76006
X-original-commit: 9d3d1949d20834c92449c989299ac8e67f26d05d
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
This commit will improve the wording and the layout of the invitation
email sent to the users getting access to the portal. The signup link of
the email will now be a button that emphasizes the call-to-action.
We will also provide in the email another link that will allow the user
to access the login page. This commit will also improve the wording of a
placeholder in the portal backend.
task-2573334
closesodoo/odoo#74210
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In this PR, we introduce the new OWL view infrastructure and convert
the graph and pivot views to OWL. More details are given in each commit.
closesodoo/odoo#73311
Related: odoo/enterprise#19469
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: stefanorigano (SRI) <sri@odoo.com>
apply new control panel styling from sri
remove o_dropdown_menu_right (looks unused)
remove o_dropdown_inline (this is a regression for small screens, apparently we would like to have this possibility on smaller screens. This does not break mobile usage but Mobile styling is still a bit weird though)
fix systray activitymenu in mobile (issue was introduced with 29731b40)
fix subdropdown flickering (before this commit, parent dropdown was in absolute positioning, making the position hook generate flicker, now it it fixed from the beginning)
Part-of: odoo/odoo#73311
The reporting views are going to be converted to OWL so that their extensions
(like the project_graph and project_pivot views) have to be converted too.
We thus need an owl version of the ProjectControlPanel class.
Here we introduce that control panel and refactor a bit the legacy code.
Part-of: odoo/odoo#73311
Both "__count__" and "__count" can be encountered as measure notations
in reporting views. Typically, "__count__" is used in legacy views and
"__count" in new views. The problem is that both can now be found on
legacy or new side (think of favorite contexts for example). It is thus
necessary to write some compatibility code on each side. Here me
introduce an helper to help in that task.
Part-of: odoo/odoo#73311
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
The reporting views (cohort, graph, and pivot) currently compute and show
the measures in similar but slightly different ways. The present commit
brings some tools that will be used to harmonize their behavior and
factorize the code via a common template and a utility function.
Part-of: odoo/odoo#73311
A simple High Order component that is able to get the actual
Field class in the category "fields" registry
It takes as minimal props:
- record: an object containing the fields key: a meta description of fields
- name: the field name
- type: the widget type name that xould select the right key in the registry
closesodoo-dev/odoo#1018
Related: odoo-dev/enterprise#206
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Part-of: odoo/odoo#73311
The component ViewWidget allows to deal with the "widget" attributes on view arch's nodes
It retrieves the actual widget component via the registry's category "view_widgets"
It is roughly equivalent to _renderWidget in legacy.
Part-of: odoo/odoo#73311
This commit introduces lib-like functions to help transforming
a view arch to an owl template.
compile_lib contains standalone functions that for the most part
can be applied on individual XML nodes to retrieve information
or to apply standard behavior on them.
compile_nodes contains standalone function that transform a arch node
into a viable Owl template one.
Part-of: odoo/odoo#73311
The ControlPanel now supports being passed an object "bottom-content" in its display props.
That Object is constituted by a component and by props to pass to it.
The bottom content of the Control panel is rendered as a Slot within that component
If not present, the ControlPanel continues to display its bottom part as usual
Part-of: odoo/odoo#73311
We refactor the action service and allow the legacy and new views to share
a global state within a same action.
We introduce two new components View and WithSearch along with
the search infrastructure: ControlPanel, FilterMenu,...
Part-of: odoo/odoo#73311
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
This commit moves the content of the static base_import files to a
dedicated `legacy` folder to mark the transition with the new Owl
environment.
Part-of: odoo/odoo#73311
This commit moves the content of the static google_spreadsheet files to
a dedicated `legacy` folder to mark the transition with the new Owl
environment.
Part-of: odoo/odoo#73311
This commit moves the content of the static board files to a dedicated
`legacy` folder to mark the transition with the new Owl environment.
Part-of: odoo/odoo#73311
This commit adapts the "old" Owl Datepicker to work with the new Owl
web client. The behaviors have been mostly preserved (i.e. working
with the bootstrap datepicker) and simply adapted to make use of the
new services and registries.
The previous datepicker template and tests have been marked as "legacy".
Part-of: odoo/odoo#73311
HumanNumber now correctly rounds the number according to decimals (bug with value < 1000 eg: 0.02)
It also correctly keeps `decimals` significant figures whatever powers of 10^3 it should keep
The monetary formatter now passes the currency's digits to human number
Part-of: odoo/odoo#73311
This commit re-introduces the date formatter to go along with its
datetime counterpart, as well as a few tests.
It also refactors the date parsers to make proper use of the arguments
passed to the functions, namely to alter the timezone.
Part-of: odoo/odoo#73311
Before this commit readGroup was actually calling web_read_group.
With this commit, readGroup calls read_group, and webReadGroup
calls web_read_group, as expected.
Part-of: odoo/odoo#73311
Reintroduce the SampleServer class with some modifications:
- it uses luxon instead of moment
- it uses the registry from core folder instead of a dedicated one
A util function is also provided to help the construction of a fake orm
using the sample server in order to get sample data.
Part-of: odoo/odoo#73311
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
This function must be used to parse boolean attributes from archs.
If returns false if the attribute is set to "False", "false", "0"
or "", true otherwise.
Part-of: odoo/odoo#73311
This hook automatically generates custom tooltips (instead of
native ones) for all elements with the "data-tooltip" attribute
set, inside the component using it. The optional attribute
"data-tooltip-position" can be used to enforce a specific tooltip
position.
This commit also makes the WebClient use this hook.
Part-of: odoo/odoo#73311
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
This is actually not what we want. It changes the behavior of
the favorite menu: when the user deletes an item, a confirm dialog
opens, but we want the dropdown to remain visible.
Part-of: odoo/odoo#73311
Before this commit, the new webclient 'Domain' module only supported
arrays for domains constructed with an 'in' operator.
Now, it also supports any primitive, that will then be wrapped in an
array.
Part-of: odoo/odoo#73311
Partially revert b0c325 removing rules defining '<a>' children as
exceptions. Indeed, to have a child wrapping the entry's content (either
<a> or <span>) is now considered the norm.
This commit will extend bootstrap 'dropdown-item' design to any
'o_dropdown_item' child rather than on 'o_dropdown_item' itself.
Part-of: odoo/odoo#73311
Reproduce :
- Create an invoice with a sepa QR-code.
Result :
When reading the QR-code, German banks assume the fisrt 3 characters are the currency name/code, so the first 3 digits of the amount are cut from this amount.
Solution :
The amount now starts with the currency name/code (3 letters), as prescribed by EPC norms.
opw-2591454
closesodoo/odoo#76051
X-original-commit: 4d5b4de95c474136ba69fbddeab5589204efdc4e
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Audric Onockx <auon-odoo@users.noreply.github.com>