Commit [1] changed a method to be asynchronous instead of synchronous
but did not care about where it was called or overridden. That code and
its surrounding needs to be refactored when fully switching to OWL.
Meanwhile this extracts the asynchronous part of the method to be done
once in all cases at initialization for now.
This is probably a cause of race condition or bugs but this was mainly
discovered during a master task development, preventing to code the new
feature properly.
[1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997closesodoo/odoo#138985
X-original-commit: e26c007dd14de9d0cbf76181e8054a3498e67bd9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Since https://github.com/odoo/odoo/pull/104287 the GS1 separator defined
in the nomenclature is no more used in `BarcodeParser`
`gs1_decompose_extanded` but it is used in `barcodeService`
`cleanBarcode` instead. The issue with that is `cleanBarcode` is not
called in every case.
It will if the barcode is actually scanned but it won't if the barcode
is decoded from a picture (using the device's camera) or triggered
through an event directly (thanks to the debug console and the manual
entry available in the Barcode App.)
That means if we want to support custom separators, we have to clean the
barcode also in `parse_gs1_rule_pattern`.
How to reproduce:
- Activate `stock_barcode` and chose the GS1 nomenclature;
- Create a product and set a valid barcode (right checksum, eg.:
00000000012348);
- In the Barcode App, create a new receipt and scan a GS1 barcode for
this product containing also a quantity and using a custom separator
(`#` can be use aswell by default, eg.: 3008#0100000000012348 for 8x
this product) with using the device camera or by trigger the event
through the console:
odoo.__WOWL_DEBUG__.root.env.services.barcode.bus.trigger(
"barcode_scanned",
{ barcode: "3008#0100000000012348" },
);
-> Issue: the barcode is not recognized.
With this commit, the parser will get the nomenclature's separator and
will use it like before in `gs1_decompose_extanded`.
Also, this commit slightly changes the separator regex (from '\x1D?' to
'(?:\x1D+)?') in case multiple separators follow each other.
OPW-3439905
closesodoo/odoo#138420
X-original-commit: 39ecbf9d93d465533619aa32e127331a0307c3a9
Related: odoo/enterprise#48811
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Steve Van Essche <svs@odoo.com>
Create a new model mixins that allow other model to
activate the history feature on html fields.
This history automatically track the changes
on the related html field and allow the user
to revert to a previous version at any time.
This also introduce a new component that can be used to :
* List the recent history
* See a previous version of the document
* Compare a previous version to the current one
* Revert the document to a previous version of it
task-3039787
closesodoo/odoo#112957
Related: odoo/enterprise#37211
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
In the context of branches, you need to be able to select taxes of
an ancestor company on an invoice/bill, even when you don't have access
to the ancestor company.
In order to do that, we relax the restriction when searching with a
`parent_of` or `child_of` on a related field, so that it also includes
ids of related field records you don't have access to. This should not
be a problem, since in the end the search will return records of a
model restricted by its own access rules.
task-3503204
closesodoo/odoo#138942
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
When a user only has access to a branch and not to the parent, he can
not create a new customer invoice or vendor bill, since we need to check
the lock date on all ancestor companies (where the user might not have
access to).
This fix allows the user to create a new customer invoice or vendor bill
again when only having access to a branch.
Furthermore, in the above case we are also unable to assign a partner on
the invoice/bill, since we are checking properties that might belong to
an ancestor company we don't have access to. We also fixed that here, so
a partner can be selected.
task-3503204
Part-of: odoo/odoo#138942
Once a branch company has some data associated with it, it can't be
deleted anymore. Since the branches could only be opened in a dialog,
it was also impossible to archive them.
In order to allow (un)archiving a branch, we added a stat button on the
company form to show the branches in a list view, where people can
(un)archive them.
task-3503204
Part-of: odoo/odoo#138942
Currently, when a user has access to a branch of a company, but not to
the company itself, the branch will not show up in the company switcher.
As a result, the user is not able to switch back to that branch when
logged in to another company.
To fix this, we now show the whole hierarchy of the branches you have
access to, disabling the companies/branches you don't have access to.
task-3503204
Part-of: odoo/odoo#138942
Change of domain applied when clicking on the "home buttons" button of
a self order, now showing buttons linked to its pos_config + those
linked to no pos_config.
Part-of: odoo/odoo#138897
Added the ability to group orders by point of sale in the order backend
view.
Added "point of sale" column to this same view.
Part-of: odoo/odoo#138897
If a pos_config has no category restrictions and receives a product with
no category, a default category named "uncategorised" will be created.
Technical change: previously, categories were grouped according to their
name, the problem being that if two categories had the same name, this
would cause problems; now they are grouped by their ID.
Part-of: odoo/odoo#138897
Before this commit, the table number was not displayed on the
confirmation page of the POS Self Order app. This is due to two PR being
merged at the same time, one that removed the field from the model and
the other using it. This is now fixed by using another field instead of
the removed one.
closesodoo/odoo#138895
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Remove the seats_available_insufficient flow on the
event registration editor. As it's no longer possible to confirm
an SO and create draft registration.
Indeed the registration state is linked to the sale order state.
And a validation error is directly raised if there are not enough
seats to confirm the SO.
task-3555628
closesodoo/odoo#138743
Related: odoo/upgrade#5279
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
In this pr: https://github.com/odoo/enterprise/pull/30853 we've merged two
settings into one to make Tax calculation & display more coherent. In the case
of a "Tax per line" computation, the column "Tax Included" is optional=hide in
the backend, but we've elected to put it in the PDF all the time.
This task we will only change the pdf and portal (preview):
1. Remove the "Tax Incl" column on all relevant templates (pdf/portal).
2. Rename the "Tax Excl" column to "Amount".
task-3552656
closesodoo/odoo#138624
Related: odoo/enterprise#48923
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Before this commit, if a view contained a searchPanel the scrollbar went at the top automatically; now the behavior of the scrollbar with or without a searchPanel is the same.
closesodoo/odoo#138341
X-original-commit: b8f881de82ab931ed8bf45e67dd8b28f943e733f
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
*: pos_sale,purchase,sale
The '_get_query_currency_table' function of the res.currency
model (added in 'account' module) was refactored in this commit.
After this commit the functions parameters are effectively "decoupled"
from the 'account_reports' module.
Previously the the function took an 'options' parameter.
The 'options' was a dictionary that was formatted to be compatible with
the report options from the 'account_reports' module (enterprise).
Due to a change to these report options (see enterprise PR)
the function had to be changed in some ways.
It was chosen to "decouple" it from the report options for the following reasons:
1. The 'account' module does not (really) depend on 'account_reports'
or knows about it at all.
2. There was still a (soft) dependency on the 'account_reports' options though:
Changes to the report options had to be reflected here too.
3. Every function that calls this function previously had to create some pseudo
'account_reports' report options. This made it inconvenient to use the
function outside of a report.
task-3484368
closesodoo/odoo#136173
Related: odoo/enterprise#47735
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
In Spain, the modelo 390 is a mandatory annual tax report that compiles the modelo 303 informations, while adding extra informations.
task-2894615
Part-of: odoo/odoo#129886
Add a company_registry number to the demo company,
as it would be needed by l10n_se_sie_import
task-2826514
closesodoo/odoo#109171
Related: odoo/enterprise#34840
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Allow to perform maintenance operations on workcenters.
Block workorders during maintenance slots.
Workcenters now gather maintenance data.
Workorders gantt views adapted to show blocked slots and summed times.
Change recurrence scheme, move settings from equipment/workcenter
to maintenance request.
This allows multiple maintenances on same element (monthly, yearly, ...)
and removes the need of ir.cron
See odoo#94866
See odoo/enterprise#28964closesodoo/odoo#94866
Task: 2444754
Related: odoo/upgrade#4571
Signed-off-by: Steve Van Essche <svs@odoo.com>
Prior to this commit, the icon for the Boleto payment method was
missing.
This commit adds this missing icon.
task-3557094
closesodoo/odoo#138899
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Before this commit, adding more records to a many2many field than the
limit of the pager did not update the pager. This commit fixes this
issue by updating the limit of the pager.
closesodoo/odoo#138883
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Remove TIN from Billing Address view as it's
not supported.
task-3283179
closesodoo/odoo#138839
X-original-commit: 3f79cc23665f2bee762465734aa147309b5aaa3e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: anko-odoo <anko@odoo.com>
Online payment method added to kiosk. This works in the same way as in
the mobile SelfOrder, except that the payment page does not open
automatically in the kiosk. A QR code appears and the user is asked to
scan it to make the payment on their phone.
Once the QR code has been scanned, the page on the kiosk updates to show
"payment in progress", and once the payment has been validated, the
validation page appears on the kiosk. These different statuses are sent
via websocket.
closesodoo/odoo#138825
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
The purpose of this commit is to delete the legacy/js/core/time.js file.
We have therefore replaced all calls to time.js with the l10N/date.js utilities.
Part of task 3439226
closesodoo/odoo#138609
Related: odoo/enterprise#48918
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Remove useless link between message and shortcodes
There is a o2m / m2o link between mail.message and mail.shortcode. However
this link is not used: 'messages' (m2o from shortcode to message) is never
set. Anyway there is no usage of this link: shortcodes are replaced in
message body and that's it.
Improve link preview code
* remove useless indirections;
* improve performance of link creation, cleanly support batch-creation;
* name methods according to ORM;
* use tools for html empty;
Also cleanup link preview tests: concatenate tests when possible, improve
setup, use real-life scenarios (using 'message_post' notably), remove useless
data creation.
Task-3557985 (Mail: Message cleanup (shortcode, link))
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
closesodoo/odoo#138938
Related: odoo/upgrade#5292
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Improve link preview code
* remove useless code indirections;
* improve performance of link creation, cleanly support batch-creation (could
lead to 98+5 URLs to the same domain creation within default 10 seconds
instead of 98+1 but we feel it's ok);
* name methods according to ORM;
* use tools for html empty;
Also cleanup link preview tests: concatenate tests when possible, improve
setup, use real-life scenarios (using 'message_post' notably), remove useless
data creation.
Task-3557985 (Mail: Message cleanup (shortcode, link))
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
Part-of: odoo/odoo#138938
There is a o2m / m2o link between mail.message and mail.shortcode. However
this link is not used: 'messages' (m2o from shortcode to message) is never
set. Anyway there is no usage of this link: shortcodes are replaced in
message body and that's it.
Task-3557985 (Mail: Message cleanup (shortcode, link))
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
Part-of: odoo/odoo#138938
'email_formatted' on 'res.company' model depends on its formatted catchall
and its underlying partner formatted email. However we do not need to
give 'partner.id.email_formatted' trigger in the compute methods as it is
not stored and thus do not need to recompute it for every change of linked
partners in DB; it is valid for the current transaction. It allows to lessen
invalidation of computed fields.
Task-3557985 (Mail: Message cleanup (shortcode, link))
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
Part-of: odoo/odoo#138938
Created custom filters using tag_ids for the tour to click on
using the add custom filter in the filter dropdown was buggy when used in the tour
the o_filter_condition div didnt update when changing the custom filter
Task-3511261
closesodoo/odoo#138930
X-original-commit: cf44186bdd082bb822eb1801534f8bf4b5a904e2
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Correspondent in thread can be null and lead into crash
when getting thread action and im status.
Replace correspondent with chatPartner when type is chat.
The fix is to solve the problem so that it is not blocking
systray and chatWindow tests related.
Also, this fix small issue of systray overflowing issue.
closesodoo/odoo#138913
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Since [1], the notification option for the live chat button does not
work. This commit restores it.
[1]: odoo#122834
task-3555864
closesodoo/odoo#138904
X-original-commit: 2f8683d22a781fce6cc5c1c39b0018f1b531fa8a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Manage worksheet templates on maintenance requests.
Also add 'Notes' and 'Instruction' tabs in form view.
closesodoo/odoo#127616
Task: 3186753
Related: odoo/enterprise#43763
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
When a tax is created using an unsigned tax tags AND a signed tax tag,
the mapper in the chart template model was crashing, skipping the needed
mapping for the signed tax (the unsigned tax doesn't need to be mapped
as it comes from a template).
task-3520182
closesodoo/odoo#138840
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Pierre-Rodéric Roose (prro) <prro@odoo.com>
Steps to reproduce:
- Install account.
- Go to Payment terms, and select any term (or create a new one).
- In the form, we can see a description box with some darker color.
- Now activate Dark Mode.
We don't need to apply a different background to these payment terms.
Based on similar field in the rest of odoo is better to remain without
any background.
opw-3465888
closesodoo/odoo#138852
X-original-commit: 9c13d961763df9e6a1359cc4645842c055c6d931
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
pos*: point_of_sale, pos_self_order
In this PR, we improve the tracking_number computation decreasing the
number of string manipulation and increasing the number of int manipulation
in the backend. In the frontend, the computation of the tracking_number
was wrong. It was previously taking the whole session id and concatenate
it with the whole sequence number. We also fix that. It now takes the
last digit of the session id and the 2 last digits of the sequence number.
We also improve the payment_screen. Now, when the user arrives on the
payment_screen. If there is only 1 payment method. This payment_method
will be chose by default.
We also fix the display of the tracking number in the order reminder
page in pos_self_order.
Enterprise PR: odoo/enterprise#48991closesodoo/odoo#138813
Signed-off-by: David Monnom (moda) <moda@odoo.com>
The color refresh button in the document layout configuration modal is
misaligned and moves the content when clicked
This commit adapts the CSS to have a proper absolute placement and
apply a height on the o_field_widget in this view to fix the issue.
task-3378759
part of: task-3326263
closesodoo/odoo#138774
X-original-commit: 907373d6e7556ecd17b0c0a87b3705e242f9d628
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Tax group are currently ordered by sequence only.
Only 2 localizations of ours have defined the sequence on them.
So, most of the tax groups have the same sequence.
The order of search made on them is thus undeterministic.
It can be seen when running the test test_generate_xml_sale with
l10n_ee_reports installed, it fails sometimes (1 in 50 to 100).
Because the invoice amounts are grouped and ordered by tax groups.
Linked to runbot error 24595
closesodoo/odoo#138890
X-original-commit: 7535c6091cb841a428ea0f4cc6d4bb1779e70346
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
The `MoneyDetailsPopup` allows users to specify the exact
amount of each coin or bill present at the closing of the session.
This popup does not however have a easy to use interface, as there is
no button to increment/decrement the number of bills of a certain type.
In this commit we create a new component called `NumericInput`.
This is an input surrounded by increment/decrement buttons.
We use this component in the `MoneyDetailsPopup`.
We create the component `TModelInput` in which we extract the functionality
used by both the new `NumericInput` component and the existing `Input` component.
We also refactor the `Input` component such that it now extends this new `TModelInput`
class.
closesodoo/odoo#138851
Task: 3555403
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Previously, a link was included when creating a channel,
but this was unnecessary since there is no way to see the link
when you are not in the channel.
This commit removes the link while keeping the notification
to show the author and time of channel creation.
closesodoo/odoo#138668
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
[1] tried to remove nondeterminism from bus tests. However, several
issues remain:
- the asset watchdog bundle is added to the registry during bus tests.
Websocket tests wait for the `connect` event after starting the environment.
This `connect` event can be triggered sooner than expected since the asset
watchdog services starts the bus.
- a the random delay is added to the reconnection attempts.
- `nextTick` is kept when waiting for a client to leave the worker.
This commit fixes those issues.
[1]: https://github.com/odoo/odoo/pull/138221closesodoo/odoo#138639
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit:
There were no default icon set when a new activity type is created.
After this commit:
When user will create a new activity type, 'fa-tasks' will be added as
its default icon.
task-3525592
closesodoo/odoo#136952
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
For PEPPOL, the Customer Reference field on invoices is a required
field. In Odoo it can be blank when creating an invoice from scratch.
In order to avoid errors when sending PEPPOL invoices, we want to
set the Customer Reference to the invoice name when no reference was
provided.
task-3499548
closesodoo/odoo#135158
Signed-off-by: Laurent Smet (las) <las@odoo.com>
In 15.0, the SEO dialog did not allow trailing/leading spaces.
However, in Odoo 16.0 one can add leading and trailing spaces in their
SEO keywords.
This is becausethe commit which converted the SEO dialog to OWL [1] did
not trim new keywords, which could lead to keywords with trailing space.
It means that those keyword won't be marked as checked in the SEO
Dialog.
This commit removes trailing spaces when opening the SEO Dialog, in case
of an existing DB having such a case, and also when adding new keywords.
To note that trailing spaces will still be inside the page until the SEO
dialog saves the SEO data again.
Note that there might be (or might have been at some point) some cases
of migration which seems to lead to those spaces being added when the
user land in Odoo 16.
[1]: https://github.com/odoo/odoo/commit/ac55f2bb113ecf7c774fe6e96d28e716184a97d1
opw-3460300
closesodoo/odoo#138872
X-original-commit: 69c0293b59468c24c92b8b900cba7dd93bbbd0cf
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
This will make it consistent with items applying to templates and
with form view where internal reference is shown.
It doesn't look like there is any reason to not displaying it in variants.
closesodoo/odoo#138866
X-original-commit: 9f53b8d2185a1abf9635c9d9f6c5378943da4d0a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>