This commit fixes an issue when there are several public categories on
a single product. Categories are shown side-by-side under product name
in the search bar.
This commit also fixes the issue where the `Category:X` text is matched
and highlighted whereas the search text is not used to match the product
categories.
Steps to reproduce :
- Install eCommerce
- Add several eCommerce Categories to a product
- Go to shop
- Search for the product in the searchbar
- Traceback
Current Behavior :
- Traceback when generating the results in the quick search bar.
It's not expected to have several categories in the current
implementation.
- If all products have a unique category, then the text in
`Category:X` is matched and highlighted.
Desired Behavior :
- No traceback
- When there are multiple categories, an extra link should be
present on each category rather than a unique link on all
categories.
- The product categories don't have to be matched.
Related PR: #79258
task-2680726
closesodoo/odoo#79363
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The two fields (name & price) were only updated on pricelist (`product.pricelist`) save, not when the rules were updated (`product.pricelist.item`).
The reason was that name and price are compute fields, which were added to the tree view but not added to the form view.
This commit adds "name" and "price" to the `product.pricelist.item` form view and hence the values will be updated as soon as the popup form is saved.
Fixes: #78488
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#79748
Forward-port-of: odoo/odoo#78699
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Steps to reproduce the bug:
- Install POS
- Go to the POS settings and enable “Gift Card” option
- Create a new Gift card with initial amount of $50
- Open a new POS session > create an order of $50 and apply the gift card
- Confirm the order > the order state becomes “paid” and the gift card balance is computed correctly: $0
Problem:
Close the POS session, the order state becomes “done” and the balance is computed wrongly: $50
opw-2683523
closesodoo/odoo#79741
X-original-commit: 10f22a125a96d60fc5983531f6026ba325d08959
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
The commit 1b80fe9b56acea09a6784691561df65fe6349f50 made impossible
to undo after dropping a snippet.
Task-2688104
closesodoo/odoo#79649
X-original-commit: 92b1f78e8de6c343a9d1ef19459522b868cf108f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
As an oversight of 2185e89e3f2a15b98b9cb8c3371a6031f9a6f055, it became
impossible to move snippets.
Task-2688281
closesodoo/odoo#79648
X-original-commit: f76ba944c516a0377cec324f564df604e52c2ffd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
In the editor, there was a little spot where it was impossible to
click in order to select a text.
Task-2684378
closesodoo/odoo#79642
X-original-commit: 02c0cce926b1252596f10299597a9c984a8341ac
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
Before this commit, an update to the colorpicker could be called
multiples times with a `colorpicker` not yet in the document.
If a colorbpicker has been created, we need to await it's start method
to be fully resolved.
Task-2667983
closesodoo/odoo#79641
X-original-commit: 105208c8363f77130ee644ce8ec2e993d9955763
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
Before this commit, the reference of the linkPopover was
the last popover being created which is not what this property
is supposed to correspond to. It should correspond to the latest
opened linkPopover.
Without this fix, the code that want to act on the last linkPopover
would not work as expected (e.g. `this.linkPopover.hide();` in
`_onSelectionChange`).
Task-2667983
X-original-commit: d1abbc9d66a5858c771fa643f8c73990e8f14792
Part-of: odoo/odoo#79641
Whenever a link is being manipulated through the link tool,
the classes are being saved before the manipulation. However,
the class `o_default_snippet_text` is removed in the meantime.
Because we never want that class after the manipulation, this commit
systematically remove it.
Task-2667983
X-original-commit: f82f004e1e1439c38a09d5eb0fded5197e058c1b
Part-of: odoo/odoo#79641
Before this commit, selecting a link was not working all the time.
This commit allow to properly select a link all the time.
Task-2667983
X-original-commit: 8c90772470046d0b932443ac7b2c2a868c443a85
Part-of: odoo/odoo#79641
The error "ResizeObserver loop limit exceeded" was catch by the browser error
global listener. this error was wrongly flagged as a CORS error.
This error is well known to be useless and can safely be ignored.
We do so.
Task-2670745
closesodoo/odoo#79645
X-original-commit: 1c21e2d6fa3c25d2a920902ebecd19f6229b56d8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
The flow has been broken multiple times across the years. Let's add a
test in all stable versions.
For the 14.0 forward-port, the test came with a fix which restores the
13.0 flow which we tried to change in 14.0... but only ended up broking
it. Indeed, with [1], the 13.0 was fixed. And, with [2], we tried to
simplify the flow... but the explanation given by the commit is just
wrong: the flow was just broken and the simplification that was to be
done in fact practically never occurs. The more the reason to add a
test, proving how the flow is working. The simplification may be done
someday but not sure it is really worth it.
For the 15.0 forward-port, another fix was needed because of [3] which
introduced a bug which makes the onBlur method be called multiple times
when hiding a whole editor hierarchy.
[1]: https://github.com/odoo/odoo/commit/076992bdf099f3a645c9a1ef6df2cdcccbf1c2b2
[2]: https://github.com/odoo/odoo/commit/5c007305c9998ade32c6677cac5552101c3a96af
[3]: https://github.com/odoo/odoo/commit/806a8db35b5e0e6a461422f5bba7c97180c3ef29closesodoo/odoo#79734
X-original-commit: 0acc5e784b15d9c963660da3781763448503f33e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Currently 'Timesheet cost' is not set in demo data.
This commit sets the 'Timesheet cost' on each employee of the demo data.
task-2531416
closesodoo/odoo#76151
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
When trying to save a new res.partner without name, an error appeared saying
Invalid fields:
- Name
- Name
Add condition to the domain to make it required only when displayed
Fixes#77976closesodoo/odoo#79727
X-original-commit: f65e3d9d21d269058dd842a4319b5b2242df103e
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
The Gross Margin stat button does not display the same value as the margin shown
AAL linked to the AA of the project, which might be confusing. This has been
improved by changing some labels, and adding some explanatory tooltips.
task-2671576
closesodoo/odoo#78739
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Declared as an api.model in all the other modules except auth_totp
closesodoo/odoo#79726
X-original-commit: 61b319ea2b5ffc70e0fd80eb62b8a3f700be0f1f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Since we don't have other docs for `account.tax.report.line`, let's just improve
source readability
closesodoo/odoo#79696
Signed-off-by: William André (wan) <wan@odoo.com>
Allow to use _adjust_to_calendar with or without leaves.
This PR adds a keyword argument to the _adjust_to_calendar, _get_closest_work_time and _work_intervals_batch to include or not the employee being on leave when searching for the start and end of the shift.
task-2632775
closesodoo/odoo#79127
Related: odoo/enterprise#21944
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Since this [commit], the layout style was improved to not break when the save
and discard button are translated.
But it was breaking the mass mailing editor, as those button were not hidden
anymore.
[commit]: https://github.com/odoo/odoo/commit/120c88a6fffc111afba734c60eb06cf0543c1760closesodoo/odoo#79719
X-original-commit: 940ac7a6c0d54e9ef8a89b0dc74b892209e1c125
Signed-off-by: Antoine Guenet <age@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Actually the last status is deleted by the fist request who can reach it
So if a request is lost the answer too
With this fix we delete the last response only when we start a new one
closesodoo/odoo#79706
X-original-commit: 63abab836d95df9a45f6f7d038bb18df88f864b4
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
The translate button was overlapping the codeview button
in the mail template view.
task-2683847
closesodoo/odoo#79704
X-original-commit: 8a6de9089bfd77f5fdc6f4a11016906454e442cc
Signed-off-by: Antoine Guenet <age@odoo.com>
Current behavior :
When a bom is created with uom set as dozens the report
operations time is not correct. For exemple if the operation
time is 10 minutes. The operation time for a dozen should be
120, but at the moment it's 10 minutes
Steps to reproduce:
Have a product in units.
Create a bill of materials in dozens.
Have a operation where the workstation that has a capacity of 1.
Look at the Bill of material cost and structure even though it uses a dozen it shows
the operation time for one unit.
opw-2669899
closesodoo/odoo#79624
X-original-commit: 11f905737ea73aaf26dc792639abf66549a31864
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
In task 2404630 the avatar feature was created and no tests were written due to
the iminent freeze. This PR implements tests for the avatar feature, such as
avatar generation and placeholder logic.
task-2578233
closesodoo/odoo#79688
X-original-commit: 400b3fd93266f88832446c8f7422f6e14b958115
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Current Behaviour :
Employee can request any type of leave.
Behaviour after the PR:
Employee are only shown leave that they can request.
opw-2684670
closesodoo/odoo#79502
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit, luxon wasn't configured with respect to the
user lang, meaning that months weren't translated (for instance,
in the filter menu, date(time) filter options, or in the datepicker
displayed in the "Add custom filter" sub-drodown).
closesodoo/odoo#79644
X-original-commit: 9530b0a2462aca0938ce315cee262b147b7a5634
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before, when installing stock_picking_batch after l10n_it_stock_ddt,
it would give a traceback because the header was replaced in a view
in stock_picking_batch and that removed the invisible field that was
used in an attrs in another place.
So we add the field again in that other place.
closesodoo/odoo#79655
X-original-commit: 997f888a325509c72b2a39af346026783f192700
Signed-off-by: William André (wan) <wan@odoo.com>
Issue: When test sending a mail in Marketing Automation Mailings, there
is a traceback because we try to set the state of the mail to done,
even though there is no done in mail_mail.state
Steps to reproduce :
1) Install Marketing Automation
2) Create/select a campaign
3) Access the templates of that campaign
4) Create/select a template
5) Click Test
6) Send Sample Email
-> Traceback
opw-2568210
closesodoo/odoo#79650
X-original-commit: 954c413149befe847a526b54a1fca4c0dd2b16cd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Gamification display is slow when being heavily used. Indeed the m2m towards
users is used in kanban and form views, leading to a huge data fetch when
being used in production environment with lots of users.
SPECIFICATIONS
Remove user_ids m2m from views. Indeed in some heavily used DBs you may have
more than 10K records in user_ids, leading to a huge m2m tags to display.
Replace it by an optimized count, used in
* form view: as a stat button redirecting to participants of a challenge;
* kanban view: a line (replacing the 11 first avatars) redirecting to
participants of a challenge;
Also of this commit is to rename and reorder views, data and models by main
model. It allows to better understand module organization and find views
one may have to update.
Task-2678295
closesodoo/odoo#79599
Related: odoo/upgrade#3020
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Gamification display is slow when being heavily used. Indeed the m2m towards
users is used in kanban and form views, leading to a huge data fetch when
being used in production environment with lots of users.
SPECIFICATIONS
Remove user_ids m2m from views. Indeed in some heavily used DBs you may have
more than 10K records in user_ids, leading to a huge m2m tags to display.
Replace it by an optimized count, used in
* form view: as a stat button redirecting to participants of a challenge;
* kanban view: a line (replacing the 11 first avatars) redirecting to
participants of a challenge;
Task-2678295
Part-of: odoo/odoo#79599
Purpose of this commit is to rename and reorder data by main model. It
allows to better understand module organization and find data one may have
to update.
Task-2678295
Part-of: odoo/odoo#79599
Purpose of this commit is to rename and reorder models by main model. It
allows to better understand module organization and find models one may have
to update.
Task-2678295
Part-of: odoo/odoo#79599
Purpose of this commit is to have all gamification menus defined in a single
file. It helps reorganizing a module TOC (menus) when doing some b2b like
on an app. Otherwise menus are split across several files and finding them
and keeping them organized is not easy.
Task-2678295
Part-of: odoo/odoo#79599
Purpose of this commit is to rename and reorder views by main model. It
allows to better understand module organization and find views one may have
to update.
Task-2678295
Part-of: odoo/odoo#79599
Steps to reproduce:
- On a company with multi currency
- Set the company currency rate to 1, and the foreign currency
to 0.273748
- Create a vendor bill
- Set first the foreign currency, then select a product with a
tax to 21% and a price unit of 155.32
- Go to 'Journal Items', the 'tax paid' line debit is computed to 119.15
- Reselect the foreign currency on form.
- Now the 'tax paid' line debit is computed to 119.16
The total is also impacted as the tax changed.
Explanation:
Before this commit, the taxes was both computed in foreign currency and company currency. However, when setting a new currency or changing the date, the taxes wasn't recomputed but the new conversion rate was applied.
This commit is fixing the issue by applying the same logic as in 14.0: the taxes are always computed only the foreign currency, then the conversion rate is applied to get the accounting balance.
opw-2569668
closesodoo/odoo#79618
X-original-commit: 11f5fcfb577b117b279f5d96095e9c0798d78bbd
Signed-off-by: Laurent Smet <las@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Steps to reproduce :
- Install website module
- Activate (and translate website) French language
- Go to translated terms and fetch for "Discard" in website module
- Replace the translated value by "Ne pas sauvegarder"
- Go to Website -> Configuration -> Websites
- Select main website and change language to french then save
- Go to Website and edit homepage
- Add any block
Issues :
On top of editor sidebar, buttons are not displayed correctly.
Solutions :
Add css class `d-flex` to the div arround the buttons.
opw-2683602
closesodoo/odoo#79612
X-original-commit: 772156078418544907f9073e242e4491ddae1e5d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
Delete obsolete suggested_recipient_info with isCausal and ensure thread is
required on it.
This is intended to prevent crashing when creating a new partner from a
lead.
Task-2654859
closesodoo/odoo#79619
X-original-commit: fdbbed270d0c266a0e495136b461a4c40f8394bf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, automated actions could not raise "normal"
errors anymore (e.g. UserError). Indeed, since the wowl refactoring,
it always shows the custom BaseAutomationErrorDialog when an error
is thrown in an automated action, even if it is a standard error
well-known by the framework. Before the wowl refactoring, those
errors were handled normally if possible, and when it wasn't the
case, the custom BaseAutomationErrorDialog was used.
This commit restores that behavior.
Complete steps to reproduce:
- Install base_automation module
- Install an app for the base_automation to trigger (e.g. Sales)
- Turn on debug mode
- Go to Automated Actions
- Create an action with Action To Do is Execute Python Code and the Trigger is On Creation & Update
- Set the model to your app (e.g. SalesOrder)
- Put `raise UserError('Test')` in Python Code section
- Go back to the app, try to create a new record in the model you set for the automated action to trigger
- Compare the result with 14.0
closesodoo/odoo#79611
X-original-commit: d65d742de1b30a00b3ffd872c042e002736f7f6b
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
The constrains on orderpoint location being related to the warehouse view
location was too restrictive especially in a complex subcontracting flow
with dropship.
This commit change the constrains to only be triggered if the two
location to be compared have both a warehouse.
closesodoo/odoo#79593
X-original-commit: 871cd6ad2d986ee1c28804aeeee63a001156154a
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Expected Behavior
The total amount and total taxes amount in invoice, purchase order and offer should be formated with the correct formating options (related to the client's location), and with the correct currency symbol, as it was the case in V14
Observed behaviour
In V15, these amount are written as pure numerical values (eg : 1452.24 instead of $1.452,24). This is the case in every generated pdf, as well as in the user portal preview(s), but not in classical form view(s).
Reproducibility
This bug can be reproduced following these steps:
- Create a new invoice
- Validate it
- Preview it in the user portal of download the printable .pdf
This can also be done with a purchase order, following the same steps.
Problem Rout Cause
The problem comes from the fact we read the wrong fields, using account.tax_totals.amount_total and account.tax_totals[subtotals].amount instead of account.tax_totals.formatted_amount_total and account.tax_totals[subtotals].formatted_amount.
opw-2666924
opw-2666553
opw-2665130
closesodoo/odoo#78762
X-original-commit: 2d632013af87f3d4e639bd79595fcbc69aeb4f51
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
- Configure a Receipt Printer for POS
- Create a Product with a long name (> 20 chars) and a big price
(i.e. PRODUCT BCDEFGHMWPGHHH - price: 9999.00)
- Create a Product with a short name (i.e. PRODUCT Z - price: 12.00)
- Make a POS sale with long product first and short as second
On the receipt, the line containing long product is too small to
contain also its price.
So the price will be on another line justified on the right.
But the following product will be stacked on the same line, making
the price on the receipt unreadable.
Someting like this:
-------------------
PRODUCT BCDEFGHMWPGHHH
PRODUCT Z 12.009999.00
The issue also appears for taxes lines and on the report of all sales
of current POS session.
This is due to a css style (float: right) applied to the price part.
opw-2639120
closesodoo/odoo#79595
X-original-commit: c565695b895a012a3953416fab60fe71d6f70665
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
PURPOSE
Display "View document" link on notification emails using the 'light' layout
as done in standard layout.
Cleanup layout xml id propagation through composer or email sending in
mail and various applications.
SPECIFICATIONS: LAYOUT XML ID USAGE
Get rid of context usage and use a real field on mail.compose.message model.
Support old context key in composer for backward compatibility, working like
a default value for the field itself.
On template model: rename ``notif_layout`` parameter of ``send_mail`` to
``email_layout_xmlid`` to be coherent with naming used in other parts of the
code. Moreover it better indicates we expect an xml id.
On rating model: rename ``notif_layout`` parameter of ``rating_send_request``
to ``email_layout_xmlid``, for the same reasons as above.
In various wizards: support ``email_layout_xmlid`` context key when no field
is available, notably because this is still done manually in some wizards
like survey invite. Keep a fallback on ``notif_layout`` but remove support of
``custom_layout`` deprecated since quite a long time.
SPECIFICATIONS: ACCESS LINK
Light template is used is several notification processes as an alternate
layout to the classic one. It currently lacks any link to the document that
generated the notifications.
We add this behavior in this commit. Behavior is the same as the classic
notification email, aka a link to mail/view that chooses what to do based
on access rights and user status (internal, portal, ...).
SPECIFICATIONS: MISC
Remove ``mail_notification_borders`` as it is not used anymore.
LINKS
Task-2621326 (Mail: add 'view' button in 'light notification template')
Task-2647302 (Mail: add layout field in composer
closesodoo/odoo#76418
Related: odoo/enterprise#20903
Related: odoo/upgrade#2829
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Make CI/Style happy even if not really related to this PR.
Task-2621326 (Mail: add 'view' button in 'light notification template')
Part-of: odoo/odoo#76418
Light template is used is several notification processes as an alternate
layout to the classic one. It currently lacks any link to the document that
generated the notifications.
We add this behavior in this commit. Behavior is the same as the classic
notification email, aka a link to mail/view that chooses what to do based
on access rights and user status (internal, portal, ...).
Task-2621326 (Mail: add 'view' button in 'light notification template')
Part-of: odoo/odoo#76418
RATIONALE
Currently we can specify email used for notification layouting through context
use in mail composer. It is then propagated to message_post, stored on
mail.message and used to encapsulate emails sent based on posted messages.
SPECIFICATIONS
On template model: rename ``notif_layout`` parameter of ``send_mail`` to
``email_layout_xmlid`` to be coherent with naming used in other parts of the
code. Moreover it better indicates we expect an xml id.
On rating model: rename ``notif_layout`` parameter of ``rating_send_request``
to ``email_layout_xmlid``, for the same reasons as above.
In various wizards: support ``email_layout_xmlid`` context key when no field
is available, notably because this is still done manually in some wizards
like survey invite. Keep a fallback on ``notif_layout`` but remove support of
``custom_layout`` deprecated since quite a long time.
Task-2621326 (Mail: add 'view' button in 'light notification template')
Task-2647302 (Mail: add layout field in composer)
Part-of: odoo/odoo#76418