A previous commit(ea8acc17b4)
added a compute on invoice_user_id fields to
guess the Sale Person. The problem is that by adding the compute
on the field, the readonly default value changes for True.
It causes that user can't change the sale person anymore.
no task id
closesodoo/odoo#139035
X-original-commit: af5e3eedf90d64462afc625b30dec742361389f5
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Reproduction:
1. in Website, enter Editing mode, drag a block with a button, for
example, banner
2. click on the button then click on the text above the button
3. the selection should be around the text paragraph, but it's on the
button
Note the behavior is only for the first time of clicking on the element,
e.g. when dragging and dropping a new block
Fix: The selection restoration when destroying the link tools should be
done on the spot instead of binding to the destroy of linkToolsInfos.
Without this fix, the selection restore in link tool is done after the
full selection step for o_default_snippet_text element
task-3514638
closesodoo/odoo#139031
X-original-commit: 6dcc33c6c85b605f43e8f42a5d4013eca9e0ef7a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Reproduction:
1. install website, drag a block with button
2. click at the beginning of the button text
3. type something, it will be outside of the button area
Reason:
The contenteditable is reset depending on the o_editable and
o_not_editable class in the _onPostSanitize function.
Fix: don’t do the resetting when we have the _fixLinkMutatedElements key
in OdooEditor as it indicates that the link isolation trick is executing
task-3514628
closesodoo/odoo#139030
X-original-commit: 1727317f258d184432b01b6295d01f688e298257
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: Nicolas Bayet <nby@odoo.com>
Steps to reproduce:
1) Create loyalty program with default settings (10% discount on all
orders above $50)
2) Create quotation with amount >50, all products must be invoiceable on
delivered quantity, not ordered quantity
3) Add promotion with 'Promotions' button
4) Confirm order
5) Order has invoice status 'Nothing to invoice'
6) Add shipping
7) Order now has invoice status 'To invoice'
An order with shipping and no promo, or no promo with shipping, would in
both cases have nothing to invoice as long as the 'real' products are
not delivered. But when you have both a promo and delivery line, the
order is 'to invoice'.
The '_compute_invoice_status' methods of sale.order in the delivery and
sale_loyalty modules are not compatible, as the delivery compute filters
out delivery but not reward lines.
OPW-3357289
closesodoo/odoo#139014
X-original-commit: 201a4fc7144935947cd2909e4830a666bbdac02d
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
Steps to reproduce:
-------------------
- being in a multi-company environment;
- have one product made that is first in alphabetical
order of "Internal Reference" throughout the database (e.g. [AAA]);
- make this product specific to one of the companies
(set the "Company" field on the product template)
- go into a different company within the database
(not the one set on this product);
- create a new discount & loyalty record, and set
the "Program Type" to "Discount Code".
Issue:
------
An access rights error occurs.
Cause:
------
When creating a `promo_code` program, we use the first product
that can be sold in the default reward values.
Solution:
---------
Take into account the company in the domain that retrieves
the default product.
opw-3538516
closesodoo/odoo#139008
X-original-commit: d80c28c78bf3237e2526a6370f9c6c0b0f8dc232
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
Update the eas list in preparation for the Peppol PINT format
that will come to 17 in the near™ future
closesodoo/odoo#139005
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Issue:
Typing '@' in a chatter and waiting for the partner suggestions can
sometimes be really slow for some users, even freeze some users
browsers.
Analysis:
Since 12152279a5 the sorting on
partner suggestions has been generalized to take an arbitrary amount
of functions to apply sequential filtering. One particular of those
is `partnerCompareRegistry['discuss.recent-chats']` which makes a
call to `getRecentChatPartnerIds` which makes multiple checks for
each pair of partners in the thread to order them based on their
`lastInterestDateTime`. This property is actually quite heavy, as it
involves deserializing datetime objects and making calls to libs and
regex matches, creating a lot of garbage memory in the process.
The complexity of this machinery is atrocious:
- First `sortPartnerSuggestions` loops over all the current partners
we fetched from the backend, and in a `sort` callback we call
*each* filtering method (we shortcut on the first filtering that
succeed). So we call at worse each filter `O(n*log(n))` times.
- Since `partnerCompareRegistry['discuss.recent-chats']` is the
lowest sequence in the filtering array, we will *always* go
through it for those partners `O(n*log(n))` times, inherently calling
`getRecentChatPartnerIds`.
- This function in question gets it's list of partner from the
thread in the store, and sorts those partners with a callback
again. So again we have `O(m*log(m))` callbacks. This callback makes
8 calls to `lastInterestDateTime`, which as mentioned previously
is actually an expensive function if called frequently as it
generates a lot of garbage.
- All this garbage that is generated triggers multiple calls to the
browser GC, and it's being frequently called, either stalling the
browser for a few seconds, and for some users (as the problems
scales over quadratic for the number of partners in the
suggestions/thread) completely halting it.
Solution:
- Correct implementation of `getRecentChatPartnerIds` to not call
`lastInterestDateTime` so frequently, it was unnecessary.
- Dependency inject the call to `getRecentChatPartnerIds` outside of
the initial sorting callback, as it's independent of the sorting
parameter and can be hoisted outside of the routine and injected
into the filter.
Reference:
task-3556235
closesodoo/odoo#138988
X-original-commit: ba31d252c0738811cfe80a70bbbd7d489a45cf03
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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>