Product's display_name can be too long and might not fit in small
labels. A decision was made to split it into default_code and actual
product name, and display both in separate lines.
Unfortunately, the logic of joining those 2 strings is embedded in the
model, so it had to be duplicated in the label.
Task: 3290154
Part-of: odoo/odoo#122511
This commit fixes a bug where popovers could stack up in kanban if one
kept opening them. By changing the event to close popovers from a
mousedown event to a pointerdown event, it is no longer stopped by the
draggable hook and executes correctly.
closesodoo/odoo#136890
X-original-commit: 76665eb400168a6fd6e2b5f5fe099c8c4e9c8a5e
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
__Current behavior before commit:__
The page crashes when we try to merge two partners and the
`mail.activity.mixin` model has a field with `ttype = "reference"`.
This is because a `search()` on a `mixin` model will always crash as
they are abstract class that don't represent real records.
__Description of the fix:__
Add a check to skip the iteration if `Model` is an abstract class (like
a mixin).
__To reproduce:__
1. Go to Settings > Technical > Fields
1. Create a new field
1. Set **Model** as `Activity Mixin`
1. Set **Field Type** as `reference`
1. Go to the Contacts app
1. Select two contacts
1. Click on Action > Merge > MERGE CONTACTS
opw-3458640
closesodoo/odoo#136880
X-original-commit: cb7589cb4bb3ede1b4c4d3f8d04c376a95d42247
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Signed-off-by: Julien Launois (jula) <jula@odoo.com>
Current behavior:
If a PoS had a different currency than the company currency, the total
due was not converted in the PoS currency. So when you paid the total
due it was not the correct amount.
Fix:
The total due is now converted in the PoS currency when the PoS is
loading the data. We also had to change the refreshTotalDueOfPartner to
retrieve the total due in the PoS currency.
Steps to reproduce:
- Create a PoS that uses a different currency than the company currency
(change the journal, pricelist and payment method)
- Make some payments with this PoS using the customer account
- Check the total due of the customer account in the PoS, it's not the
correct value.
- Try to pay the total due, it's not the correct value either.
opw-3469682
closesodoo/odoo#136528
X-original-commit: 4a2dc18eca0fe2e8095f6402e157320cac8985ad
Related: odoo/enterprise#47851
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
Before this PR, when there is no shipping address, the pdf show an empty
"Shipping Address" header. By changing the colspan dynamically we can manage to
keep the layout like it was and remove the useless section.
closesodoo/odoo#134435
Task-id: 3262408
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
The return type of _do_request is inconsistent when an error is
encountered. This causes issues when the callers expect the return
type to be a dictionary consistently.
We fix this by always returning an empty dictionary for the request
response when encountering an error
sentry-4339147124
closesodoo/odoo#136881
X-original-commit: f8ac76906d1eec2ad1bc1243f60998fe50caa1bc
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Reproduction:
1. Create a link right after some text
2. Remove the whole line by backspace character by character(this should
give the p element a history steps id)
3. Try to create a link again
4. The new link is invisible and actually created in br when inspecting
the page
Reason: this is an edge case on Chrome that the document.getSelection()
returns a selection which has br element as the anchorNode. It may
happen when the parent element of the br has history steps and only has
this br element. However, the same steps done on Firefox return the
correct selection on the parent element.
Fix: we make a special case when the selection is a caret type and the
anchorNode is a br element, we re-select the parent element and collapse
the selection to the start. This is trying to mimic the normal case of
adding a link to an empty p element, e.g selection anchorNode is p,
offset is 0.
task-3181486
closesodoo/odoo#136879
X-original-commit: 084ac2a375224288f182961ff98915dbeb428bd6
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com>
Before this commit:
when performing a shift paste of copied VS Code content, the indentation was
lost.
After this commit:
Now, when you perform a shift paste of copied VS Code content, the indentation
is preserved
Task-2884491
closesodoo/odoo#136867
X-original-commit: 1641bb50aa30ac64340eb261b26d4706944299ba
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When the limited product loading option is enabled in the PoS config,
the Top-up eWallet product was not loaded into the PoS. This caused
an error when trying to process an eWallet refund from the PoS since
the Top-up product was missing.
This commit ensures that the Top-up eWallet product is always loaded
into the PoS regardless of the limited product loading setting.
opw-3510639
closesodoo/odoo#136865
X-original-commit: 8eafd156f4a4a8680709feef8b38cbead39957f6
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Before this commit:
The text moves back to the left side on remove format even if the direction rtl
is applied.
After this commit:
The text will not move to the left side on remove format if the direction rtl is
applied.
task-3482193
closesodoo/odoo#136849
X-original-commit: ff955e2cf74189a7cd4b175e8edfe5cfc8f31821
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Add a new column, after tasks that shows the following information :
Tasks: Total done tasks / Total tasks (ratio in percentage)
Timesheet: Hours spent/ allocated hours (ratio in percentage)
\> visibility: only show if the timesheet setting is activated.
Right side panel :
Add the Done icon before Tasks
Add hours spent/allocated hours information under the Timesheet
Extra time: Add a new stat button that shows
the overall extra time used for the project.
visible if hours spent > allocated hours.
By clicking on this it will redirect to the same view
as we have for the timesheet stat button.
task-3432102
closesodoo/odoo#129177
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Reproduction:
1. Install mass mailing
2. Create a mailing with multiple Cover blocks, and replace each
background image by uploading one. In the inspector, you should find the
`data-bg-src` attribute
3. Send the mailing to a Gmail account (or check the sent email on a
local odoo instance), the email is with the long `data-bg-src` attribute
Fix: The fix is put into the existing flattenBackgroundImages function
because the background images are selected and `data-bg-src` is for the
background images. It simply removes this redundant attribute
task-3484103
closesodoo/odoo#136837
X-original-commit: b43d3c091c7f590bb8128dfc922345ad4dbb13dd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com>
Description of the issue/feature this PR addresses:
In Dashboard module tasks section, two scorecard is showing same label
'Time to Assign'. Another scorecard is for closing day so that its label should
be 'Time to Close'.
Current behavior before PR:
two scorecard showing same label 'Time to assign'
Desired behavior after PR is merged:
label is change for one scorecard to 'Time to Close'
Fix:
Rename title of scorecard in json file.
task- 3346509
closesodoo/odoo#136739
X-original-commit: b023b44c699464a09ffc7fe6d9b049ed8ec9148a
Related: odoo/enterprise#47971
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps to reproduce the bug:
- Create a storable “P1”:
- tracking= serial
- save
- Change the type of product to service
Problem:
some fields for tracked products are not hidden, because the product
tracking is not updated.
Solution:
Convert _onchange_type into compute methods.
The tracking is updated even if the change type is applied from the
"product.product" form.
opw-3499976
closesodoo/odoo#136738
X-original-commit: 22fe0ee4764705e55e81f62e07d29fc9bd8296e1
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Steps:
- Open Website > My Account > Projects
- Open the project in which the customer is not set
- Now perform 'group by customer' on that project.
Issue:
- A blank line is shown below the header line.
Cause:
- No condition is applied to it when we do not have a customer set.
Fix:
- Adding condition to display 'No Customer' instead of an empty block.
closesodoo/odoo#136734
Task: 3461563
X-original-commit: 0649a1d12ef9ecd5ff680679eb2c6151287cc22e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Previous fixodoo/odoo#131279 missed marking component lines added in
from the consumption warning wizard as "additional". This made it so the
added line was also added into the backorder when it should NOT have
been (since the backorder should only be based on the original MO's
values).
Followup of task: 3456604
closesodoo/odoo#136728
X-original-commit: 7a45b691781e2862e87da7914a8b3b9a6487b7e9
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Issue:
======
`invoice_label` doesn't appear in invoice print.
Steps to reproduce the issue:
=============================
- Install accounting and l10n_sa
- Go to taxes and select tax 15% sales
- Go to advanced options and change label on invoice.
- Go to any invoice having that tax and print it.
Origin:
=======
The name of the field was the changed from `description` to
`invoice_label` but not updated in all the templates.
opw-3500060
closesodoo/odoo#136723
X-original-commit: 7bc65d85d6d395e8e098aff755d29832c18fa60a
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
Steps to Reproduce:
1) install the project module
2) give a user access to the Marc Demo and log in with the Marc demo
3) through the Kanban view of the project open burger menu
4) You can see that the view section is not styled properly and adding a
scrollbar to the view
Cause:
View section is assigned the 'row' bootstrap class, which causes a scrollbar to
appear.
Fix:
To eliminate the scrollbar, the 'row' class should be removed from the Kanban
View section.
task-3282942
closesodoo/odoo#136706
X-original-commit: 1ac61703bcb71c4a43de6d561e0d1da682e4eb1f
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
The AlertPopup component is identical to the ErrorPopup component,
aside from the fact that the ErrorPopup also plays a sound. We
thus add a new prop to the ErrorPopup that allows the consumer
to decide to have the sound played or not and replace all occurences of the
AlertPopup with ErrorPopup.
closesodoo/odoo#136700
Task: 3522638
Related: odoo/enterprise#47987
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
This fixes flickers in situations where:
- close (manually): notify
- open (manually): notify
- close (from bus)
- open (from bus)
The final state is correct, but it does one extra close and open.
With this fix, it becomes
- close (manually): notify
- open (manually): notify
- (close from bus ignored)
- (open from bus ignored)
Note: the fix is aimed towards fixing issues within the tab making the
manual change, which is the most common use case. Other tabs are not
considered visible at the time of the change, making the flicker
irrelevant, which is convenient to ignore as fixing it would require
more advanced mechanism.
runbot-24379
runbot-24994
closesodoo/odoo#136698
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The server is supposedly already aware of changes that are coming from
itself, it doesn't need to be notified again.
This prevents each extra open tab from making useless RPC.
This also fixes race conditions in situations where:
- close (manually): notify
- open (manually): notify
- close (from bus): notify close again <--- this is the bug
- open (from bus): already no notify for open from bus (ok)
- close (from bus again): and notify close yet again
Final state is close, whereas the user manually set open last.
With the fix, it becomes:
- close (manually): notify
- open (manually): notify
- close (from bus)
- open (from bus)
Finally state is open as expected, no extra RPC.
Note that is this example, there is still a problem, where an obsolete
value from the server (the first close from the bus) will overwrite the
newer local state (open), causing a potential flicker. This will be
fixed in a future commit.
runbot-24379
runbot-24994
Part-of: odoo/odoo#136698
This traceback arises when the user selects multi
company records and click on the 'create report' button.
To reproduce this issue:
1) Install 'hr_expense'
2) Create a new company for example 'test'
3) Enable the 'test' company on the right corner
4) Now open 'employees' and change the company of the current user(Mitchel Admin)
to the 'test'.
5) Open 'Expenses', create a new record, and change the company to 'test'.
6) Fill the required field values and save the record.
7) Now click 'My Expenses/My Expenses to report' and select all the records (Make sure
'My Expenses' filter is applied)
8) Click on the 'Create Record' button
Error:- "ValueError: Expected singleton: res.company(2, 1)"
On the '_create_sheet_from_expenses' method, the value of 'company_id' is getting
through 'self.company_id.id'.
See:-
https://github.com/odoo/odoo/blob/f910987cb4af84c1e7afabf67f05d4eebc31e765/addons/hr_expense/models/hr_expense.py#L324-L335
But when user selects multi company recordsets
'self.company_id' has multi recordsets.
When 'company_id' is getting value through 'self.company_id.id', because of
'self.company_id' has multiple records, which leads
to the above traceback.
By applying this commit will resolve the issue by raising an exception,
when user selected multi company records to create report.
sentry-4465422743
closesodoo/odoo#136695
X-original-commit: 32cb39c9f533820b5558d739d993199a9541f779
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
Create an expense sheet (report)
Add 2+ expenses with 10% included tax to the same employee
Approve expenses and post journal entries
Bill will be created
Go to the tax report
Group by "Tax > Account" or "Account > Tax"
Issue: Bill line will have the tax basis calculated incorrectly
This occurs because the bill will have 2 separate tax line and the query
does not handle this case
opw-3510371
closesodoo/odoo#136694
X-original-commit: 2ed464bc6bf4fa35e1ad2704ed9db71789c39257
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
Storing the _query_count value at the class level makes it trivial
to extend by dependant modules.
closesodoo/odoo#136669
Related: odoo/enterprise#47931
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In log note case, followers are not going to be notified of the message.
Therefore the recipients input should not be visible.
task-3504225
closesodoo/odoo#136661
X-original-commit: c60449a2efde457e8370928681f011c103ea1d60
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
This commit adds the `ui.scss` file in order to provide image
related css classes to the embed livechat (`o_object_fit_cover`)
was missing.
Steps to reproduce:
- Go to the website
- Open a livechat
- Paste a link in order to display a link preview
- The image is stretched since the `o_object_fit_cover`
class is not available in the shadow DOM.
closesodoo/odoo#136656
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When a user is editing an Autocomplete, we don't want to delete its value
if the props value changes.
For example:
- In a form view with a many2one field and another field with an onchange
- Edit the second field
- Insert a value in the many2one input
- The onchange of the first field returns a value for the many2one
Before this commit:
The value inserted in the many2one is lost. It is replaced by the
onchange value
After this commit:
The value inserted in the many2one is unchanged.
closesodoo/odoo#136654
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Bug
===
When searching for projects from the Outlook / Gmail addins, the names
were not translated into the user's language.
Task-3486324
closesodoo/odoo#136645
X-original-commit: 7ebe04189c84381e133ad3d0d6f8b97832b28a14
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Steps to reproduce:
As Admin:
1. Create a Storable product with a Route of Manufacture
2. Create a re-ordering rule for this product.
3. As a user with no MRP access rights, create a sale order with this
product and confirm the sale order.
This creates a new `mrp.production` record with `sudo()` on line
\#85: https://github.com/odoo/odoo/blob/fae59cee91969692c2375b3bd37e914ec0fb606e/addons/mrp/models/stock_rule.py#L85
4. Duplicate sale order and try to confirm again.
This produces an access right error because the first loop finds the
existing `mrp.production` record and tries to create a
`change.production.qty` record.
However, the user doesn't have access rights so they get an error.
Solution:
Add `sudo` to the create call.
opw-3508819
closesodoo/odoo#136640
X-original-commit: c5758e122db5396e23a57826a1b12ed7d9765f55
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Andrew Gavgavian (andg) <andg@odoo.com>
We don't want to force anything and make clear that we have 3 solutions
the user can choose: hash, lock date and audit trail.
This reverts commit 3a5fc92c34.
closesodoo/odoo#136625
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Before this commit:
when cropping a non-supported image in email marketing, it should trigger
a warning but instead throws a traceback error. This issue is due to
snippet.options.js being in legacy JavaScript, which doesn't include the
expected methods from the 'notification' service directly. Instead, it uses
methods from 'makeLegacyNotificationService' that lack the .add() method.
After this commit:
Added the add() methods in the 'makeLegacyNotificationService' which will
resolve the error.
task-3488181
closesodoo/odoo#136611
X-original-commit: 785e0d7ac12e51ce5db611e535f185a2345241ff
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Since [1] qweb library is not used anymore, rendering this test useless.
1 : 4b0a951af6closesodoo/odoo#136610
Signed-off-by: Raphael Collet <rco@odoo.com>
Commits:
[IMP] devtools: add svg elements detection
[FIX] reactivity: do not notify for NOOPs on collections
[IMP] app: export apps set as static property
[IMP] runtime: do not check template equality outside dev mode
[FIX] runtime: properly support t-foreach on strings
More details: https://github.com/odoo/owl/releases/tag/v2.2.6closesodoo/odoo#136591
X-original-commit: c92f9f8a7de6e10354ec0feea64bfc045a0edafb
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
When users try to apply for new job positions from the calendar view,
a traceback will occur.
Steps to reproduce:
- Install the "hr_recruitment" module.
- Go to the "Recruitment" icon; Kanban view will open;
choose any job position; and click on the "NEW APPLICATIONS" button.
- Then, select the "calendar" view and try to create a new record.
After that, a traceback error will occur.
Error: KeyError: 'default_partner_ids'
When users try to apply for new job positions from the calendar view and
the 'default_partner_ids' key does not exist in the context dictionary,
a traceback occurs.
Code reference:
https://github.com/odoo/odoo/blob/16.0/addons/hr_recruitment/models/calendar.py#L18
sentry-4462451583
closesodoo/odoo#136585
X-original-commit: 851c9fde8e73f30a164c81153e43160f95af6b0a
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
steps to reproduce:
- enable analytic
- open journal items in list view
- select one item, set an analytic account
- select the same item, click on the analytic account, click on the save button (floppy disk)
- pop up opens
- close it
Issue:
Traceback
Cause:
In multiEdit mode, the main element cannot be focused in
opw-3463911
closesodoo/odoo#136576
X-original-commit: 93e553c211e1b74c0e712e387290db6455cf0e3d
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Go to the form view of mailing.mailing, write "hello " as the subject,
insert an emoji, you end up with "hello:)" instead of "hello :)". The
problem is that when the input loose the focus, it is automatically
trim.
Reconfigure the `char_emojis` widget so that is doesn't trim.
task-id-3493168
closesodoo/odoo#136530
X-original-commit: 2adda1eb2760ccf970761f424105e245afc3de3f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Version:
--------
- saas-16.4 only
Issue:
------
When a project is duplicated, all tasks and sub-tasks
are visible in the new project's kanban view.
Cause:
------
When writing `project.write({'tasks': [Command.set(new_tasks.ids)]})`,
we trigger an inverse which writes the `project_id` field to the tasks.
This will set the value of `display_in_project` to `True`.
Solution:
---------
Rewrite the `display_in_project` field if necessary.
opw-3479714
closesodoo/odoo#136527
X-original-commit: 6f62d156b65b331a0a15406a90b174c265100491
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Auto install AvaTax module for countries that use AvaTax ('US','BR').
Add a checkbox in settings to easily install the module if needed
task ID: 3398637
closesodoo/odoo#136490
Related: odoo/enterprise#47979
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
commit [1] addeed production cost account. However this account is
mandatory with real time valuation. It could be an issue during
production because we don't have an automatic way to create a new
valid account. On top of it this behavior is optional and people
could still use the classical input and output account for production.
This commit make the cost of production account optional and fallback
on previous behavior with input/output accounts
[1] commit 1eb2e7c814closesodoo/odoo#136463
X-original-commit: ea647812e76931f9193ae841f428b312b861739b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
RATIONALE
Merge two phone-related field on registration as they overlap. Having only
one is sufficient for contact-oriented model like registration.
SPECIFICATIONS
Registration model currently holds two phone field, phone and mobile. This
leads to having records with sometimes phone, sometimes mobile being filled.
This makes phone flows not easy: we have to define fallbacks (use phone or
mobile), data is not always synchronized, ... in the end what event users
need is one phone field to be able to communicate with attendees. Having
only one field is sufficient and simplifies the model.
Keep only one phone field, instead of two. Merge phone and mobile into a single
one, keeping phone as first value when having both available e.g. when
synchronizing with the partner.
Task-3366899
Part-of: odoo/odoo#128232
Co-authored-by: "Jeremy Hennecart" <jeh@odoo.com>
Prior to this PR, `product_configurator_popup.js` did not support
attribute selection of type `multi`. In addition, the
`pos_preparation_display` did not display any attributes.
Now it's possible to select attributes of type `multi` in the Point of
Sale, and the preparation display shows all available attributes.
closesodoo/odoo#136441
Taskid: 3497560
Related: odoo/enterprise#47834
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
As `handle_history_divergence` is not used in the controllers, it makes
no sense to have it in `controllers/main.py`.
task-3217965
closesodoo/odoo#136277
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>