Steps to reproduce:
- Go to a website page > Add a 'Form' block > Add a new 'Selection'
field.
- Go to the page (in 'edit_translations' mode) > The selection field
options are not translatable.
The goal of this commit is to make the select options translatable
by adding an intermediate `.o_translation_select` element.
This element will handle option's text translations from the linked
`<select/>`. The final values are copied to the original element
right before save.
opw-3233360
closesodoo/odoo#120363
X-original-commit: 5ff53d7f289ec531f8369a47d02bd58252bb98a5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Current link in settings leads to 404 error page,
changing the path to the right one
opw-3279614
closesodoo/odoo#120356
X-original-commit: beffb2fcab99439c9bf9b398e500e2437e38f9f9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
In case you write user_id = False on the sale order,
It will match the first sale team without sale team manager.
It is because False != None.
After this fix, we check if user_id is Falsy instead of None.
closesodoo/odoo#120346
X-original-commit: 8adde86c719b2dc76e21e440c32de1307e5c4da3
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Stock valuation layers are generated for storable and consumable products. However, given that we don't keep track of its quants we hide those layers by default.
by adding a domain [('product_id.type', '=', 'product')].
On the dashboard, such domain is currently not present. As a result, our inventory valuation value is not the same if we look at it though the dashboard.
This commit adds the same domain so that the value of the inventory shown is always the same (which means not including consumable products).
OPW-3275521
closesodoo/odoo#120267
X-original-commit: d392087941367d93ef63fd0ccdb0b988b338218c
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
avoid overriding payment views by creating new computed field in the payment provider property and override it if needed in inherited payment models
task-3120983
closesodoo/odoo#116573
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This task change the people who can edit a calendar event.
This calendar event currently allow every user to modify every
event in the calendar. This cause issue where one user can
modify the time-off event for other employees.
This PR change the right to modify an event from the calendar
view in the calendar app. With these changes, only the people
attending an event will be able to modify it from the calendar
view.
task-id : 3185743
closesodoo/odoo#112964
Signed-off-by: Arnaud Joset <arj@odoo.com>
This commit fixes a few things in the UI:
- The format selection labels could be confusing to users, for example the word "billing" is not necessary here. Now the labels are clearer and structured in a similar way.
- `peppol_endpoint` is recomputed whenever there is a change in the vat but we do not want to make changes if there is already some value in this field. This commit adds a check for whether `peppol_endpoint`is already filled in.
- Same for the `peppol_eas` field - should not be changed if it's already there.
- Both of these fields should be logged in the chatter when changed
closesodoo/odoo#120344
X-original-commit: f749033466c674d91722a2ac753645955da04bad
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
Steps to reproduce the bug:
- Go to Decimal accuracy:
- Select the “Product Unit of Measure”
- Set the Value to “4”
- Create a storable product with BoM:
- add any product as component
- save
- Click on the BoM overview widget
Problem:
The “Product UoM” precision is not used
opw-3288403
closesodoo/odoo#120296
X-original-commit: 837a6ca90d6944f9faf4b28e69703f5310c6ec6a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Before this PR, using the message component wihtout a thread could crash because
props.thread could be undefined (as thread is an optional props).
This PR just add the guard.
closesodoo/odoo#120233
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
*: barcodes_gs1_nomenclature,point_of_sale
In this commit, we are converting the `BarcodeParser` to js class. As a
consequence, instead of having 2 options of instantiating the parser -- via
nomenclature_id or via nomenclature -- we are removing the first option.
Instantiating the parser will now only require the built nomenclature object.
This is possible because in all the pathways where the parser is instantiated,
the web services are ready, meaning `rpc` and/or `orm` services are ready. As a
result, the consumer of the parser can just build the nomenclature object itself
by fetching the nomenclature details from the server. A helper static method
called `fetchNomenclature` is introduced in the `BarcodeParser` class to aid in
building the nomenclature object it needed.
Furthermore, the methods that return the required nomenclature and rule fields
are converted to static fields which can still be patched (check
barcodes_gs1_nomenclature in enterprise).
closesodoo/odoo#120228
Related: odoo/enterprise#40582
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Before this commit, on a blog page with the "regular cover" and "read
next article" options enabled, the image in the "read next article"
block would shrink when the text was too long.
Steps to reproduce the bug:
- Go to a blog page (e.g. "Sierra Tarahumara").
- Enable the "regular cover" and "read next article" options.
- Enter edit mode.
- Scroll down the page.
- Enter a lot of text as the title of the "read next article" block.
- Bug: As the text increases, the width of the image decreases.
opw-3267842
closesodoo/odoo#120025
X-original-commit: 06a6e78b0f41188dd4c7c45c26f6038ecbd5b311
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit:
When using shift+enter to move to a new line, now applying bold, italics,
underline, etc and then trying to add a color to both lines would result in
lines merging.
After this commit:
Now when the both lines are bold and then applying a color to both the lines
would no longer merge.
closesodoo/odoo#119701
Task: 3269922
X-original-commit: 0473dbd0090dd7b2fb1ff59a83a38df941303681
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit makes the `dependencies` param of
`odoo.define` mandatory. It was optional and when
omitted, a regexp read the function to find the
dependencies. We can simplify it now almost all js
modules have been converted to esm.
The transpiler already adds the param for the es
modules except if the module has an alias.
task id: 3271352
closesodoo/odoo#119145
Related: odoo/enterprise#40040
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Purpose: HR can view employee leave records from the calendar but can
not approve, validate or refuse it from there.
In case they want to make action, they have to go through
menu < time off < approvals < time off < find the employee
< find the requested time off < open it < approve.
In this commit the action buttons are added on the dashboard.
task - 3175495
closesodoo/odoo#116342
Signed-off-by: Kevin Baptiste <kba@odoo.com>
*:pos_epson_printer,pos_epson_printer_restaurant,point_of_sale,
pos_restaurant,pos_hr_restaurant
Before the printers only worked in the pos_restaurant and not in the
point_of_sale. Indeed, the methods managing the printers were located
in the pos_restaurant.
Now all these methods have been moved.
For the community part here are the affected modules:
- The methods in pos_epson_printer_restaurant have been moved to
pos_epson_printer.
- The methods in pos_restaurant have been moved to point_of_sale.
- The module pos_epson_printer_restaurant has been removed as it only
handled printers.
Some of these methods have been adapted/renamed to better suit
the needs.
This branch the first part of the following task: 3224508
closesodoo/odoo#114655
Related: odoo/upgrade#4414
Related: odoo/enterprise#37901
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
To improve onboarding experience, configuring Stripe
has been added in Invoice onboarding process.
For db with other apps(ecommerce or sales) if onboarding is
done in one place it is considered done in other places with
exclusion of Sales, unless it was done in Sales.
task-3208045
closesodoo/odoo#114131
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
When the payment method was detached from the customer, trying to pay
with the linked payment token would end up with a crash because Stripe
failed to send us the payment intent, as it could not create it.
With this commit, we test for the existence of the returned payment
intent and prematurely return in `_send_payment_request` to prevent a
cursor rollback. The transaction is set in 'error' and the error
message is logged in the stdout and on the transaction's state message
field.
closesodoo/odoo#120348
X-original-commit: 4ebf0efc16ef78ca568ef93fb2c36ce404cb0c12
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Purpose
=======
All the properties field file respect prettier rules defined in
/web/tooling (like normal field), during odoo/odoo#118929 we forgot
to apply those rules.
Task-3188915
closesodoo/odoo#119811
Related: odoo/enterprise#40363
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
When the focus is inside the label of the property, if we click
outside of the popover we need to click a second time to close the
popover.
Before that code was used to solve a bug where the definition popover
was closed when you select the text inside the property label. It
seems not necessary anymore, and it causes the issue above.
Task-3188915
Part-of: odoo/odoo#119811
Purpose
=======
Most of the template in web use the `and` syntax instead of `&&`,
use this syntax for consistency.
Task-3188915
Part-of: odoo/odoo#119811
Purpose
=======
When this option is enabled, the button to create new properties
is invisible. We create a client action instead, and when the user
executes client action for the first time, the button becomes visible
until the user refreshes the page.
This is useful because most of the time, the user will create the
properties and then won't change them. So this button uses space
unnecessarily in the form view (for the most of the use cases).
Task-3188915
Part-of: odoo/odoo#119811
Fixes a situation where users who are part of the Attendances Officer (or Manager) group but
without access to private employee data would see the following error when trying to book time
off.
`ValueError: Invalid field 'last_check_in' on model 'hr.employee.public'`
Other instances of the same ValueError were observed by managers trying to approve employee leave
and employee expenses.
As per hr/models/hr_employee.py:22-26 fields not available on hr.employee.public should have
groups='hr.group_hr_user' and this was not the case in hr_attendance.
closesodoo/odoo#120324
X-original-commit: ff4e7d6a414097d000e62825cf43425ea14bd77e
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Current behavior:
When you try to open the pos as a demo user, you get an error message.
Steps to reproduce:
- Install pos and loyalty modules
- Log in as demo user
- Try to open the pos
- You get an error message
opw-3297341
closesodoo/odoo#120334
X-original-commit: 5f6a1df7eda6909df302bc6cfa3ba02d8a2de3d7
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Description of the issue/feature this PR addresses:
---
When a user chooses "Repeat Pattern" as the background image position,
nothing happens.
Current behavior before PR:
---
As the background size is set to auto, for background-position
`repeat-pattern` no effect[1] can be seen in the
background size.
[1]: https://bit.ly/3MM31Ac
Desired behavior after PR is merged:
---
Not a bug but can be considered an improvement in features by setting
some default[2] width or height for a repeat-pattern option for all
relevant snippets.
[2]: https://bit.ly/3GbGIBo
task- 2862510
closesodoo/odoo#102995
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
In the Invoicing dashboard, the "Average Invoice" scorecoard displays
the wrong amount of invoices. It displays the number of
"account.invoice.report" lines.
This commit fixes the issue by displaying the count_unique measure
of "move_id"
task 3180524
closesodoo/odoo#120322
X-original-commit: 6232896fe06640de6d461e645811673fe27481aa
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
* Indentation
* Explicit field attributes
* Double quoted strings for strings shown to users (single quoted ones for the rest)
closesodoo/odoo#120245
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
As module versions can be single digit, an upgrade script for version
`x.y.z`, is currently parsed as an upgrade script for module
version `z` in Odoo `x.y`.
However 3-digits module versions are more common than single-digit ones
and developers may expect the `x.y.x` upgrade scripts to be major-less
scripts.
This ambiguity can lift off if we accept module versions to be **only**
2-digits or 3-digits. This however make the `x.y.z` upgrade script
major-less. This can be fixed by renaming the script to `x.y.z.0`.
Part-of: odoo/odoo#118420
Fixed the popup call. The call was made with the old method showPopup.
The call is now made with the new .add method on the popup service.
closesodoo/odoo#120274
X-original-commit: d174e6cdacfdde6973e4ced931bb7572b6bd0511
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Monnom David (moda) <moda@odoo.com>
Before this PR, the `Updating the parent message of a reply also
updates the visual of the reply` test was failing in a non-deterministic
fashion.
This PR fixes this issue by replacing the `nextTick` by a specific
`waitUntil` in order to ensure the DOM is properly updated before
asserting.
Fixes 20829 runbot issue.
closesodoo/odoo#120273
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
*: web, web_editor, payment
Before this commit, templates with %d was given to sprintf but it was not interpreted by the function
After the commit, %d are replaced by %s in templates for sprintf
Also this commit converts a last _.str.sprintf into sprintf
PR#120143
closesodoo/odoo#120143
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Steps to reproduce:
- activate `group_stock_reception_report` in settings
- activate `auto_show_reception_report` for the "Receipts" operation type
- create a receipt w/ any product + confirm
- create a return w/any product + confirm
- select both the receipt + return in the (Operations > Transfers) list
view > action > Validate
Expected result: both pickings are validated
Actual result: stacktrace due to expected singleton ValueError
enterprise PR : https://github.com/odoo/enterprise/pull/37518
task-3204596
closesodoo/odoo#120190
X-original-commit: b2ac4b2f30e15c4b8a50628798b2fc39d7d43331
Related: odoo/enterprise#40570
Signed-off-by: Tiffany Chang <tic@odoo.com>
Steps to reproduce:
- create a product;
- disable the continue selling option for the out-of-stock;
- do not have a stock quantity for this product.
- go to ecommerce;
- without click on the product, add it in the cart with the cart icon (on the picture).
Issue:
It is possible to add the product to the cart.
If we repeat this several times, we will create quotations.
Solution:
Hide the button if the product is a storable product
and we don't want to sell it if we have no stock.
We also check the quantity available.
opw-3148069
closesodoo/odoo#120176
X-original-commit: bf4b5962c396101f242822058b5ddf815408e3f8
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Before this commit, when chatter message list was lower
than 2500px, the message-list had scrollable of 2500px
of height.
This happens because the area detecting present time was
always 2500px. thus making the content have this value as
scrollheight.
This commit fixes the issue by making presence area not
go above the conversation height. So if message list is
250px of height, then presence area is 250px, not 2500px.
closesodoo/odoo#120173
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Starting with Firefox 109, a widget element prototype that is put
inside an iframe will not be instanceof its original constructor.
See: https://github.com/webcompat/web-bugs/issues/118350
This is because a node that is adopted by an iframe will have its
prototype changed to match the constructor from within the iframe
instead of its original one. This has been the case for a long time.
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1470017
It largely went unnoticed because of another quirk of Firefox related
to the use of instanceof which was fixed in version 109.
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1360715
Since this bug was fixed it became apparent, in the form of a
traceback, that the wrong instance of ClipboardJS was being used
in the case of Firefox, due to the forced prototype change.
This commit could be reverted once Firefox is fixed.
Steps to reproduce the issue in Firefox > 109:
- Create a new mass mailing.
- Choose the third template with "Thank you for joining us!".
- Click on the "LOGIN" button link inside the email.
- Get a traceback about a paremeter not being the right type.
Task-3186513
OPW-3172914
closesodoo/odoo#120171
X-original-commit: c0da01c716716f9d35abe9d90dad27cce1452ebb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: Jinjiu Liu <jili@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Fixed incorrect use of the popup add function. Since version saas-16.2,
the first parameter must be the chosen popup component and not the name
of the popup as a string.
closesodoo/odoo#120101
X-original-commit: cba91da208b30b5122af3d76c4e7731555d6e0c8
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Scenario:
- set a quotation template on a quotation that adds lines ordered with
a sequence (eg. 3 lines with sequences 10, 11, 12)
- add lines in this quotation
- save
Issue:
The added lines have sequence 10 and the seen order changes.
This is caused by 6f11060d6afd9edce904dd34a2d415a2a2461108 that tries to
mitigate a more rare issue when there is more than one page of lines.
Solution:
Reverting the previous fix, and setting the sequence of the first line
to -99:
- when resequencing the first page, the sequence will be -99 to -60 =>
records from the second page will not get in the first page
- new lines will be added at the end
Issues still present:
- when resequencing the second page, item from 3 pages get into it (it
was already the case before 6f11060d6afd9edce904dd34a2d415a2a2461108)
- when adding a new line (without resequencing), it is added at the end
and not at the beginning of the next page
But those are just behavior in any list view (as is the original issue
of 6f11060d6afd9edce904dd34a2d415a2a2461108, but since it was partially
fixed for a year, this patch try to give an in-between solution instead
of just reverting it).
opw-2833913
closesodoo/odoo#120047
X-original-commit: 621454fac58e6d079ec6dc52795548c3dadea0e5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>