Current behavior:
When invoicing an order that was made in a closed PoS session, the wrong
partner was used for the invoice. And so the total due was assigned to
the wrong partner if you used the "Customer Account" payment method.
Steps to reproduce:
- Open PoS and make an order for a customer using the Customer Account
payment method.
- Close the PoS session.
- Open the PoS session again, and invoice the order you made in the
previous session.
Fix:
Use the commercial_partner_id of the order's partner instead of the
partner_id directly.
opw-3478670
closesodoo/odoo#135558
X-original-commit: a7ebb5151060f9435941b9da50182e4ec5b58db7
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
Current behavior:
When an order contains a payment line with 0€, and a customer account
payment line. Then you close the PoS and invoice the order from an other
PoS session, you get an error.
Steps to reproduce:
- Open PoS, make a new order with a payment line of 0€ and a customer
account payment line.
- Close the session and open a new one.
- Go in the paid order, and try to invoice it.
- You get an error.
Fix:
To fix the issue we just remove the useless 0€ payment line.
opw-3477486
closesodoo/odoo#135284
X-original-commit: 24c311670164d5f06dc50d829bb653b06cf86f07
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
Current behavior:
When a loyalty reward was applied with a promotion program, a promotion
reward was added with a -Infinity value.
Steps to reproduce:
- Create a loyalty program with a reward of 5€ fixed amount for 50
points
- Create a promotion program with a reward of 10% discount
- Open a pos session, select a customer (and add points to the loyalty
program if needed).
- Add a product to the order, the 10% discount should be applied
- Now click on the reward button to apply the loyalty reward
- The loyalty reward is correctly applied, but a new promotion reward
is added with a -Infinity value.
opw-3297817
closesodoo/odoo#133550
X-original-commit: ee60da301209c84264d706b9d16e45af541a3bbf
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
Before this commit, it was possible to have users fill-in
a scored survey with no way possible to pass it because no
answer had any positive score obtainable.
We keep here the check on sharing of the survey to avoid
errors while configuring the survey, the same way it is
already done when trying to share a survey without any
question at all.
Note that we are also adding this warning and the "This is a
test survey" notice for survey_user and not only managers
because users can also test their surveys...
Task-3374592
closesodoo/odoo#130553
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Purpose
=======
Make it easy for users to differenciate bewteen
simple choice and multiple choice question types.
Specification
=============
Change the multiple choice question type checkboxes
icon from a circle to a square in the survey result page
and the survey template.
In the question form view, tick 2 checkboxes instead of
one for the multiple choice question type.
Task-3252870
closesodoo/odoo#129882
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
[1] introduced the grid mode and with it a util that reloads lazy
images in order to prevent a bug in Chrome which make images disappear.
This util read the .src property of the image element. That property is
the absolute URL.
In order to keep the exact URL that was on the img attribute, one needs
to use "getAttribute".
This commit does exactly that.
Steps to reproduce:
- Drop a Image - Text snippet
- Drag the image to enter grid mode
=> At the same time the image is reloaded with the wrong src
[1]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ecclosesodoo/odoo#135392
X-original-commit: 3528f2c3f9d3b30266f3421672986d202c724a76
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, if a product was set to be available in the PoS,
and also existed in a reward, it was loaded to the PoS twice. This
caused issues in _loadProductProduct during the assigning of pricelist
items, and could result in missing pricelist information for a product.
opw-3487702
closesodoo/odoo#135494
X-original-commit: b64f9bfeb7782e9665ea60e57f09031b6588f883
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Steps to reproduce:
- Create and confirm an MO with extra components in stock
- Update the quantity to produce
Bug:
the reserved qty is not updated (it actually is but to the previous
value if you update MO quantity multiple times)
since this commit[1] moves are now assigned during the write
before the new product_uom_qty is written on them
opw-3489226
[1]:https://github.com/odoo/odoo/pull/93712closesodoo/odoo#135548
X-original-commit: cc23ebefb4a15d163ec508cd535bf757cf626fa5
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
We must wait for an additional tick to be sure that the error
dialog is displayed, because the "unhandledrejection" event is
triggered asynchronously.
Runbot issue-24690
Runbot issue-24691
Runbot issue-24744
Runbot issue-24733
Runbot issue-24742
closesodoo/odoo#135500
X-original-commit: e341f592e2a8ebc3c2e479566425df89a29bf2c7
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
This commit adds a copy of the attachments from the expense report to the created journal entry.
task-3443042
closesodoo/odoo#132955
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Before this commit
==================
Currently, There is no way to know how many qty users can produce with the current stock.
After this commit
=================
With this commit, In the MO Overview report, the following stages are added:
'Ready', 'Not Ready', and '{X} Ready'. the Ready to Produce qty is based on
the component reserved quantity + component free quantity. Furthermore, the
table header in the MO status overview report has been slightly highlighted for
improved visibility.
task-3356499
closesodoo/odoo#124474
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Clean, factorize and optimize the code related to product variants display and price computation, especially the whole `combination_info` logic, which can now be moved to `website_sale` since the new product configurator used for backend doesn't rely on it anymore.
Enterprise PR: https://github.com/odoo/enterprise/pull/41308closesodoo/odoo#121986
Related: odoo/enterprise#41308
Related: odoo/upgrade#5134
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Cache the fiscal position by request the same way it was
done for the pricelist, on the current website record.
Also clean and clarify the pricelist cache at the same time,
making sure invalidations are correctly handled, and that the
whole code relies on the unique logic (& field).
Part-of: odoo/odoo#121986
The prices displayed on the /shop page were not refreshed if the fiscal
position computed for the current partner was modified.
Part-of: odoo/odoo#121986
This method & logic is not used nor necessary anymore with
the multi-company fixes and improvements done in the recent years.
* All requests coming from website are automatically done in the website
company.
* check_company restrictions forbid the use of records from different companies
* multi-company security rules restrict the access to records from the current
company.
Part-of: odoo/odoo#121986
There is no need to manually add the pricelist context for ecommerce
flows anymore, it is automatically managed in `_get_contextual_pricelist`
override of website_sale.
Part-of: odoo/odoo#121986
Clean all code related to _get_combination_info:
* Move logic to website_sale now that backend configurator doesn't
rely on it anymore. Only frontend configurator uses that logic.
* Make sure the returned information is correct and consistent:
* request must be given the right context (multi-company)
* behavior is coherent between modules and overrides (date, company, currency, rounding)
* Performance:
* Avoid loading unnecessary information
* Avoid calling _get_combination_info when only part of the data is necessary.
* Clean/simplify uses and overrides by keeping useful information in the combination_info dict (taxes, currency, ...)
* Code cleanup
* clean imports
* clean architecture
* clean templates
* move old configurator code to website_sale
Now that the product configurator backend side has been redone
completely, the remaining parts previously shared between backend
and frontend configurators can be moved to website_sale because only
used by the frontend configurator.
Part-of: odoo/odoo#121986
Before this commit, when selecting the field to import, the name, external
id and database id could not be selected separatly while they should.
This commit fixes that by comparing the full field path instead of the id
of the fields.
closesodoo/odoo#135482
X-original-commit: 587ee0797bd0075dc7d3a0393ec95360c8ab0770
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Activate analytic accounting
Configure a [TEST] product to create a project on order
Create a SO with [TEST]
Have an expense product [EXP] with reinvoice policy set
Create an expense with [EXP] and set as analytic account the one created
for the SO and another one
Complete the expense flow
Check the SO
Issue: the expense line was added correctly but the quantity delivered
is set to 2
opw-3410712
closesodoo/odoo#135479
X-original-commit: 39f573eebd7af7f026ffdcb4957a47a0f699939f
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
After the bootstrap refactoring introduced in this commit cc349515a4923874067705267bbaa383276556e6.
The switch product view wasn't working anymore. This commit reintroduce
the logic behind the switch product view option.
Task-3500621
closesodoo/odoo#135431
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
*: pos_online_payment_self_order
Since 605943b5ea, the pay button is not always displayed in the self-order UI after clicking on the "Order" button.
The issue is due to the selected_attributes value received from the server, that can be "false", while the JS code of self-order UI is designed with "{}" as the empty/null value.
When the local order of the self-order UI is updated with the data from the server, the false value was saved instead of the {}, resulting in the line being considered as "modified" according to the isChange method which uses JSON.stringify for comparing changes.
The fix consists in correctly updating the local order selected_attributes value when receiving data from the server.
This commits adds some tests for the pay after meal self-order mode, to check that the pay button is visible.
closesodoo/odoo#133913
Task-id: 3489173
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This pr aim to improve the pdf of the expense report. we have changed the design
of the header of the report, the table and also added an annex with the
different attachments.
For the attachments, when it's a pdf it's simply merge to the actual pdf but
when it's an image we use a new template to display the name of the expense
link to that image.
closesodoo/odoo#133611
Task: 3443413
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Problem
---------
User want to search on journal items based on the amount. This is doable
through custom searches but that is not user-firendly.
Objective
---------
Add a search based on the amount of an journal item (in credit or in
debit) to make it more user-friendly.
*Secondary objective*: Add a similar search for journal entry amounts.
Solution
---------
Declare a computed field for journal entries that the search will be
based on and add this field in the search view of the journal items.
*Secondary solution*: Add amount_total in the search view of the journal
entries.
task-3439520
closesodoo/odoo#129990
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
The customer display loads very slowly in the RemoteDisplay mode.
This is in big part because of the large size of the bg image.
This image is loaded on every single update of the customer display.
This PR makes it so the bg image is loaded directly from the server,
in order for it to be cached on the customer display, thus improving
considerately the response time.
closesodoo/odoo#124998
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
The properties button has been moved to the contextual action menu.
The kanban view now shows partner locations and internal location directly under a view location
task 3444583
closesodoo/odoo#130509
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Allow users to subscribe to being notified when a new participation is
completed on a survey.
As surveys expecting hundreds of participants will not be followed in
such a way, we will only post these messages if there are any followers
on the survey.
We add a check on any subscriber belonging to group_survey_user
to further limit creating messages of which no one can make use.
A test of this feature is included.
Adding a `_sudo` for good measure while we're here, it does
not change anything.
Minor docstring change in `mail.followers` _get_recipient_data`.
Task-3389133
closesodoo/odoo#128922
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Follow-up of https://github.com/odoo/odoo/pull/135378
Commit above fixed a potential issue where guests may eventually have
many livechats, so finding the livechat thread just by
`type: livechat` is not enough. To be more specific, it relies on
livechat session stored in cookie.
However, when there's no livechat session, there's no id stored in
cookie. The livechat thread uses a `TEMPORARY_ID`. Fix above forgot
to handle this part, thus the getter was failing when there's no
persistent livechat session.
closesodoo/odoo#135442
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, the weighing scale was not working properly. This
was caused by commit 60f41b1f83, which modified the getAddProductOptions
function to return both the quantity and weight, instead of just the
quantity.
The "weight" value returned was not handled in the subsequent
"add_product" call stack, causing the weighing functionality to fail.
This commit fixes the issue by using the quantity value instead of
weight in the relevant code paths. In the point of sale context,
quantity and weight are interchangeable depending on the use case.
This commit fixes the associated tests to check the weight of added
order line.
Related to PR https://github.com/odoo/enterprise/pull/47211
opw-3487707
closesodoo/odoo#135432
X-original-commit: ab88f96de580250d1e8cad7e49833c51bd6749e7
Related: odoo/enterprise#47379
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Following the introduction of the `showWeekNumbers` prop on
DateTimePicker component (see commit 7552284e78),
the number of column (CSS custom property) wasn't properly defined in
the template.
This commit fixes it and adds related asserts in QUnit tests.
closesodoo/odoo#135427
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
In case of the user have no access to all account.payment, the record can be deleted.
closesodoo/odoo#135415
X-original-commit: 5086b39e44230a14a6c1c65bde4851f062f10e38
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Steps to reproduce:
- Install Knowledge App
- Create a sub-article and add them as many properties as you want.
- Go to search to get the list view and export the article, adding both
of the properties field (`article_properties`,
`article_properties_definition`).
- Now try to import the file we just exported.
At this moment this issue affects knowledge properties and crm, leads
properties (for reference see: #122817) but the proper fix is still not
applied, and since it's implementation is complicated we are going to
remove the properties from the export when we tick the
"I want to update data (import-compatible export)." until the proper fix
is done.
opw-3346642
closesodoo/odoo#135406
X-original-commit: 16912d7bfa2bc618f2f5cc40f915728fc7e62cb3
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
Steps to reproduce:
-------------------
For example:
- add a work permit file to an employee (private information tab);
- try to download it before saving;
Issue:
------
The old file is downloaded or a traceback occurs
if there was no file before.
Cause:
------
When downloading, we use the `/web/content` endpoint.
We will try to read the record in the backend via `_record_to_stream`.
The record is not yet saved in database.
Solution:
---------
Disable download button if record is dirty.
opw-3458842
closesodoo/odoo#135405
X-original-commit: 3557e66a410428b877213508104e9accbbfdaf20
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Prior to this commit the get_orders_by_access_token return always an
empty result. A tour has been added to make sure it won't reproduce again.
Steps To Reproduce:
- Open self order
- Click view menu
- Select a product and "Add to cart"
- Click review and order the product
- Click on My Orders
- There would be no product ordered
closesodoo/odoo#135372
X-original-commit: d1663f991af9ad4ce271c8e86ca51bd934363d96
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Loukas Wets (lowe) <lowe@odoo.com>
The Dynamic placeholder was not opening properly in mail template since the wysiwyg OWL conversion.
Fix it and also fix the tour that should have detected this error.
The tour itself was not running properly.
task-3495254
closesodoo/odoo#135275
X-original-commit: df8532cffc74038db0faef36b5f43758e1bbdf43
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
This commit adjusts the width of the domain selector to fill the entirety
of its parent so that its dimensions are not restricted by the flex
display
closesodoo/odoo#135228
X-original-commit: cae3a05904cc3fa7a2afadbb6f751f619021fd2d
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
* = account, base_iban, bus, calendar, crm_livechat, hr, hr_holidays,
im_livechat, mrp, project, sms, snailmail, test_mail,
test_mail_full, web, website_livechat, website_slides
Add support in `contains` for most operations that we use in tests.
Remove return value from `contains`.
Move into `web` module.
Remove import/export chains, directly import from correct module.
closesodoo/odoo#134652
Related: odoo/enterprise#47064
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
psycopg2.extras.execute_values was introduced in PR #101237
however it pypasses the override logic for cr.execute. As a result
1. --log-sql cannot log these queries
2. assertQueryCount cannot notice these queries
...
This commit create a new api cr.execute_values to support the same SQL feature
without losing the override logic for cr.execute
closesodoo/odoo#131190
Related: odoo/enterprise#47374
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
When creating a new report and assigning a root report, the filter fields are recomputed to take the same values as the root report by default. This is done to avoid silly mistakes from the user ; for example, when configuring a tax report, forgetting to set the only_tax_exigible field.
However, nothing similar was done with the sections, and that was very error-prone. Indeed, when a report is created as a section of some other report, and not to be used in any other case, it would be convenient that the report's maker (be it a a developer or a UI user) does not have to care about all the nitty-gritty details of the default values assigned to filters. Taking the same example, what was there before this commit makes it so we could very easily face the situation where a tax report is made with multiple sections for its different annexes, and one of them is missing a True value in the only_tax_exigible field (spoiler: this mistake happened on some development branch of ours).
To solve that, when we see a report only belongs to one single composite report, and if it's not callable alone (for this, we check the existent of an action opening it directly, or the presence of a root report fot it), then we compute a default value for the filter fields, using the composite report as source.
closesodoo/odoo#135259
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Steps to reproduce:
- Create an invoice
- Select a partner
- Add an invoice line (without a product): a default account will be computed
- Change the account
- Add a second invoice line (with a product)
- Change the account
- Select another partner
The account for the invoice line without a product will be recomputed, while
the account for the invoice line with a product will not.
The computation of the account should happen when the line is added.
If the account has been changed, it should not be recomputed to a default one
when changing the partner.
The behavior for aml without product should be the same than aml with a product.
opw-3474469
closesodoo/odoo#135411
X-original-commit: 2d5b4998e2b1c9111e7997b6174abf41dc2af02d
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
Issue:
------
When a leave is created, a notification is only sent
if a "Time Off Officer" is defined (`responsible_ids`).
However, if we choose the approval option with
the value: "By Employee's Approver",
the leave manager must be notified even if
there is no "Time Off Officer".
Solution:
---------
Give the option of creating notifications in all cases where validation
is required for the leave type.
opw-3412841
closesodoo/odoo#135310
X-original-commit: 1428505b0aaf6a1d3cf778bdb6137bea9ec6283e
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
When a user tries to signup in odoo and enters an invalid email address
a logger error occurs which creates noise in sentry.
Error: SignupError('Login must be a valid email address : tme')
The logger is updated to use the 'warning' level instead of the 'error' level.
This change reflects a less severe logging level for cases when SignupError
occurs while signup.
sentry-3933777844
closesodoo/odoo#135343
X-original-commit: b59d0ef1568adc3296534f2dc5542afc02e04b1b
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
To reproduce this bug:
- Open a record with a chatter
- Open a composer (send message or log note)
- Change record using the pager
- Now, you cannot mention anyone
This is because the chatter component is reused and the `useComponent` hook isn't
refreshed with the new data.
This PR fix the issue by forcing a re-render of the composer when the `threadId`
changes. This refresh the `useComponent` hook used inside the `useSuggestion`
hook.
task-3502720
closesodoo/odoo#135331
X-original-commit: 28dd108294606499799e1fd2a7b24de23730d098
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The livechat service thread getter relies on the thread type to find
the current livechat thread. Since guest could have many channels it
is incomplete, the id should also be checked. This PR fixes this issue.
closesodoo/odoo#135378
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>