Before this commit, when the admin had set his unsplash credentials in
the media dialog, he could search for unsplash images in the backend
(website builder, optimize SEO, html fields), but not on the frontend
(from the website_forum reply section for example). This was caused by a
wrong assets management for the media dialog views.
This commit reworks the assets_media_dialog introduced in [1], that were
not correctly defined. Until now, a web_editor.assets_media_dialog
bundle including js, scss and xml files was included in both the
web.assets_frontend and web.assets_backend bundles. It was built that
way, because the frontend only takes the views defined in the
web.assets_frontend bundle.
Two mistakes were made with that approach:
- The views defined in web.assets_backend are not added to the
webclient's templates list. Only the ones defined in web.assets_qweb
are. It was only working because web.assets_qweb was globally taking
every component view, defined as /component/*/*.xml.
- The qweb extensions templates for web_unsplash were defined in
web.assets_qweb (therefore, not included in web.assets_frontend and not
added to the frontend's template list).
To change that and include the web_editor and web_unsplash media dialog
views both for the frontend and the backend, a
web_editor.assets_media_dialog_templates is added, with the xml files
from the web_editor.assets_media_dialog bundle. But this time, this new
views-only bundle is included in web.assets_frontend and
web.assets_qweb.
When the public root's assets management is reworked and when it fetches
the templates from assets_common, these bundles should move to
assets_common, as discussed in [2].
Also, the extension template that adds the unsplash records is reworked:
the t-if is separated from the t-foreach, and set using an id instead of
the qweb instruction that it was using before, as it is more robust.
Finally, the isFetching getter was not set on the unsplash ImageSelector
patch, leading to a visual glitch ("No images found" was displayed while
querying unsplash). It is added in this commit.
task-2687506
[1]: https://github.com/odoo/odoo/pull/89223/commits/a154ee7ad6fd3ebdd38943e1439badae11c3151d
[2]: https://github.com/odoo/odoo/pull/89223#discussion_r895627061closesodoo/odoo#94572
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
In expense flow the taxes are calculated as included in price.
Prior, to guarantee it, we had domain - ('price_include', '=', True) on taxes.
That could be inconvenient from user's point of view, as they first needed to
define taxes with price_include = True. That led to users duplicating taxes
between included/excluded just so that they could use taxes in expense.
Now we force taxes to act like price_include = True. This way, user does not
need to define taxes just for expense's purposes and still taxes will be calculated
as it supposed to be - included in price.
task - 2850882
closesodoo/odoo#94392
Signed-off-by: Kevin Baptiste <kba@odoo.com>
When generating an alternative request for quotation from a dropship
purchase, the delivery address is not copied
Steps to reproduce:
1. Install Sales and stock_dropshipping module
2. Go to Settings > General Settings > Users > Manage Users, open user
Mitchell Admin and in the Access Rights tab enable 'Manage Multiple
Stock Locations'
3. Go to Settings > Sales > Quotations & Orders and enable Customer
Addresses
4. Go to Settings > Purchase > Orders and enable Purchase Agreements
5. Go to Sales > Products > Products and edit a product (e.g. 'Acoustic
Bloc Screens')
- In the Inventory tab enable routes 'Buy' and 'Dropship'
6. Create a Sale Order for this product with a different Delivery
Address then the Customer and confirm it
7. Go to the purchase order
8. In the Alternatives tab create an alternative
9. The Dropship Address is not repercuted on the new RFQ
Solution:
Add a method `_get_alternative_values` which sets the dest_address_id
and is extended in `purchase_requisition_stock` to add the
picking_type_id
opw-2880042
closesodoo/odoo#94109
X-original-commit: a7ef5d93650c262497d3a02b934284829cfc5021
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
15.3 introduced a new setting in the website to force users to sign
in/up whenever they try to buy something from the store.
This commit adds the mechanism to redirect the "process checkout" page
to the login page whenever the option is enabled and the user is not
logged in.
TaskId-2844980
closesodoo/odoo#90901
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
*:
hr_contract
hr_work_entry
hr_work_entry_contract
This commit changes several views and methods to improve general usability of the payroll application
TaskID #2783013closesodoo/odoo#89311
Related: odoo/enterprise#26466
Related: odoo/upgrade#3534
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps to reproduce:
- Create a sale order
- Set a very long message in the chatter
- Clink on the customer preview
Current behavior:
There is a empty space in the top right corner
Expected behavior:
The preview is a usual
Explanation:
The very long word in the chatter created at the
bottom of the page a very long message that increased
the page width, modifying the usual view. To fix that
we allow long words to broken to keep the same width.
opw-2880050
closesodoo/odoo#94802
X-original-commit: 775290e186f5dfdaae8a5b28e9ed20c6b307429e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
Order discount do not take into account the discount on order lines so
the discount amount will be wrong
Steps to reproduce:
1. Install Point of Sale
2. Go to Settings > Point of Sale > Pricing and enable Coupons &
Promotions
3. Go to Point of Sale > Products > Promotion Programs and edit program
'Code for 10% on orders'
4. Change the Promo Code Usage to 'Automatically Applied'
5. Open a new session in Point of Sale 'Shop'
6. Add a product (e.g. Acoustic Bloc Screens, the discount is applied
with value 29.50$)
7. Apply a discount of 20% on the product, the discount value doesn't
change (it should be 23.60$)
Solution:
When computing the amount to discount, take into consideration the
discount already applied on the order line
opw-2883724
closesodoo/odoo#94791
X-original-commit: afb3e5516e43e831bec1fd6b6bc3aaa18fe3fde2
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Slightly improve `_compute_website_order_line` by reducing the
complexity when `website_sale_delivery` or `website_sale_loyalty` is
installed.
TaskId-2786691
closesodoo/odoo#90025
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Current behavior:
When returning a delivery that had a quanity lower than 1
the inventory valuation showed a value of 0 for the return
Steps to reproduce:
- Create a product that use "m" (meters) as UoM
- Change the configuration of the product Category
and set Costing method to FIFO and Inventory valuation to Automated
- Create a SO for this product with a quantity of 0.15
- Validate the order and validate the delivery with full quantity
- Now click on return and make a return for the delivery
- Validate the return and go in the inventory valuation
- Show the inventory valuation for the created product
- The return has a value of 0 when it should have the same value
as the delivery
opw-2880153
closesodoo/odoo#94827
X-original-commit: 9bc3d5ebef234aa1d77f1d467746837a5cadc037
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
Release notes:
https://github.com/odoo/owl/releases/tag/v2.0.0-beta-11
Details:
[FIX] fix some issues with t-out with falsy values, and with default values
[REF] app: slightly simplify the create component path
[IMP] compiler: add support for binary operators
[IMP] add support for t-call-context directive
[FIX] properly get component reference instead of context
[FIX] blockdom: fix crash when class object key has leading spaces
closesodoo/odoo#94798
X-original-commit: 4dc5ff6569f658ccf525e9078b8a776ca5c0f159
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
Steps to reproduce (in slow 3G):
- Go to the website app,
- The "Optimize SEO" menu is not available while the iframe is loading,
- Wait for the iframe to be laoded,
- Go to another app (discuss for example),
- Go back on the website,
- This time, the "Optimize SEO" menu is already available,
- Click on it, it crashes.
The website metadata from the website service were not correctly cleaned
when leaving the website_preview client action. When going a second time
on the client action, the "Optimize SEO" isDisplayed method was based on
outdated metadata.
This commit resets them when the pageDocument is set to null (when
leaving the client action).
task-2687506
closesodoo/odoo#94631
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit fixes a race condition happening when clicking on the "Link
Tracker" menu of the website, when the website_preview client action's
iframe is not loaded yet.
That menu uses the iframe's contentWindow.location (taking it from the
website service), which was not set before the "load" event of the
iframe.
With this commit, the contentWindow is set at the website service level
when setting the pageDocument, as it can be taken from it
(document.defaultView), and the link tracker is displayed only when
there is a contentWindow at the website service level.
task-2687506
Part-of: odoo/odoo#94631
This commit warns company from countries not supported by Stripe to
activate Stripe from the settings page.
This commit also enable the Stripe Connect Onboarding from the website
settings page.
task-2789227
closesodoo/odoo#87562
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Ensure the link are visible enough in the editor.
task-2855712
closesodoo/odoo#94760
X-original-commit: 5d598e4269431222ae28ac2196ff6f1f45466734
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
*: im_livechat, website_livechat.
The autoOpenDiscuss parameter was used but is deprecated for a while now.
This PR removes it.
closesodoo/odoo#94716
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, the `major_amount` was rounded before the conversion
to the minor currency unit, leading to an approximation error when
multiplying a float.
After this commit, the conversion of the `major_ amount` to the minor
currency unit is done before the rounding, ensuring no float approximation.
closesodoo/odoo#94698
X-original-commit: 4a4e0129c09e2db11c46a90a07704dc37cb4fb20
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Steps to reproduce:
1- install sales
2- allow warnings on sale orders
3- set a warning w with multiple lines on
sale order on customer c
4- try to add c to a sale order
5- w will be shown in one line
Bug:
the html is escaped and the proper styling is missing
Fix:
add the proper style
OPW-2847660
closesodoo/odoo#94730
X-original-commit: 36546f39ca44f6d5691e3b1d8a7d1eb2da4a7b51
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
Purpose
=======
When a public user fill a form on Website (e.g. /contactus), an email
will be sent. The email filled in the form will be used as the "email
from", but if no mail server match this email address it will be
encapsulated into "`notifications@mycompany.com`" (see odoo/odoo#61853).
Even though the email is still present in the "Reply-To" header, we
want to add it at the end of the email, so the receiver has this
information easily.
Task-2833093
closesodoo/odoo#94728
X-original-commit: a57944cc387a0b2f0eb6450a14a14e149c720181
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Current behavior:
When using IoT-scale device to determine the weight of a product in PoS
if the product was tracked by lot the weight would always go back to 1
Steps to reproduce:
- Have PoS installed and activate PoS IoT
- To simulate the IoT you can modify the weight on this line
https://github.com/odoo/odoo/blob/ff58fb0fb588092f1d02500cd000d20a3f8b67b7/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js#L140
(e.g. change weight with 5)
- Create a product with UoM in Kg, and tracked by lots
- Start PoS session and add the new product to the order
- The quantity is not correct
opw-2862429
closesodoo/odoo#94727
X-original-commit: 6b37b0e3a0a82e8bbc51993d84257e0d71ab961d
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
* Use div name/id instead of dummy classes for xpath references
* Use clear variable name (picking instead of i in the t-foreach)
* Use t-elif/t-else when useful to reduce python evaluations of
exclusive boolean values
* clean xml indentation
closesodoo/odoo#94704
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
In base, when the group "group_partner_manager" is created, user_root &
user_admin are already specified as group users.
Therefore, it's useless to add them again in the data of the crm & sales
modules.
Part-of: odoo/odoo#94704
Default value for attachment_ids / tokens is None. However a check method consider those
as lists and check their length. When calling chatter_post without giving at least a void
list there is therefore a crash that can be easily avoided.
closesodoo/odoo#94695
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce
------------------
1. Create two partners A and B.
2. Create a shareable record, e.g. a sales order, and set A as the customer.
3. Share the record with B.
4. Use the share link sent to B and comment on the record.
5. Your comments will be sent with A as the author.
Expected behavior
-----------------
Share links sent to a customer should make you comment as that customer.
Task-2883044
X-original-commit: df162acc589b74b0e3c1e9687ce6a1980233f5f1
Part-of: odoo/odoo#94695
The bank reconciliation widget is using the 'not matched' filter excluding the already reconciled statement lines and the lines marked as 'to_check'.
This commit aims to adapt the accounting dashboard to the same behavior.
This avoid having "RECONCILE 5 ITEMS" and display only 4 of them when opening the wizard.
This happens when a statement line is not reconciled but marked as 'to check'.
X-original-commit: f78192b5e12cad8b4c5a0109e7194abab29097fe
Part-of: odoo/odoo#94287
The test is incorrect because a search is made on all product variants
instead of getting only the previously-created product variants
The SO action_cancel function returns a wizard that is not processed,
so the so was never canceled. we should call the private function
instead
closesodoo/odoo#94742
X-original-commit: c4e6562e669881047802f25866f3c2c19bf2394a
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
This fix displays the price with tax included on the product screen and not only on the order.
This commit also move the compute all function to models.js.
We allow the retrocompatibility with the compute all functions from older versions.
closesodoo/odoo#94717
X-original-commit: c837be6556cc49928e1b90cb1de29a2dff7dcd82
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Steps to reproduce the bug:
- Create a new transfer, e.g: internal transfer is fine
- Click on add a product > select any product > Save & close
- Click on the product that was just added
- change the product1_uom_qty
- Click on "Discard" button (Do not use the "Save & Close" nor the
"Save & New").
- On the picking, click on save.
Problem:
A user error is triggered, because when creating the `stock.move`,
we try to save the `product_qty` while it is a technical field:
https://github.com/odoo/odoo/blob/ba3bb9b701a382c4052ddb57392baeee32625937/addons/stock/models/stock_move.py#L375
When we modify the `porudct_uom_qty`, a compute is triggered to
calculate the `porudct_qty`:
https://github.com/odoo/odoo/blob/ba3bb9b701a382c4052ddb57392baeee32625937/addons/stock/models/stock_move.py#L278-L279
But when we click on the discard, the changes are not cancelled,
and as the kanban view does not have the information from
the form view that the field `product_qty` is readonly,
so the `product_qty` is sent in the vals to the server when we save
the picking
opw-2638906
closesodoo/odoo#94586
X-original-commit: 289d0d845df092eeae6ce0598ffef9158978ad30
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Before this commit the multi_lang parameter
was not properly retrieved from the server on the JS side.
closesodoo/odoo#94743
X-original-commit: 9dfdb1d0ded4b8739f93756987f61aa09658a840
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
*: website_livechat
This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.
Task-2896237
closesodoo/odoo#94722
Related: odoo/enterprise#28913
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: website_livechat
This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.
Task-2896237
Part-of: odoo/odoo#94722
Since the access_token is used in the videocall_location route, it makes sense
to create an index on this column to allow faster lookup. This commit adds the
index to this field since it's creation in 15.3.
closesodoo/odoo#94714
X-original-commit: 3b753dc2f5fcac03f719cd16e9c0216bae83e9b7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
Follow-up of https://github.com/odoo/odoo/pull/92786
Commit above make external livechat not working due to
`info['available']` being `True`, and `True` is not
a valid javascript keyword. The correct value is `true`,
starting with a smaller case.
closesodoo/odoo#94711
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Sale orders' amount in POS are displayed in the POS currency but they
can be in another currency making it possible to settle the wrong amount
Steps to reproduce:
1. Install Point of Sale and Sales
2. Go to Settings > Invoicing > Currencies and activate another
currency (e.g. EUR)
3. Go to Settings > Sales > Pricing > Pricelists and create a new
pricelist for the new currency
4. Create a new Sale Order with the EUR pricelist and any product and
confirm it (do not invoice)
5. Open a new session in the POS Shop
6. Go to Quotation/Order
7. The new SO is displayed with the amount in EUR but the currency
symbol is USD
Solution:
Add a filter on the POS currency to the domain of the rpc call
search_read on sale orders
Problem:
The field `amount_total` is used to display the price but this field can
be in any currency
opw-2865371
closesodoo/odoo#94710
X-original-commit: 0ebe29c794813a0854c7a6f433088a919a52cbbc
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Use case
--------
A sale user convert a lead to an opportunity, this lead has duplicates.
The wizard will convert and merge the lead. At the end of the process
the duplicated lead are delete.
Issue
-----
Before this commit the user get an access error because he cannot delete
leads
Since they can merge lead using the action "Merge" it's not consistent
and sales user should be able to merge lead during the conversion
as well
closesodoo/odoo#94699
X-original-commit: 3b79867460d9a407fba094fe1cd719d8d52011ef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
Before this commit, when the user creates a private task
and assign another user to that task and then removes
himself and save the task, the current user should no
longer access to that task since the task becomes this
private task of the other user assigned on it.
So when the current user changes anything in that task,
it will have a `Access Error`.
However if the user tries to remove a follower on that
task he will also have a traceback because no thread is found.
The reason why no thread is found is because the user has
no longer access to the record and so he has no longer
access to the chatter.
This commit checks if a thread is found before continuing
the process. If no thread is found then the user has no
access to the chatter instead of throwing a traceback
because no thread is found.
task-2857229
closesodoo/odoo#94665
X-original-commit: 2c68e397b3c12657024e70016808183c89260168
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
Improve link tracker tests :
* add missing test for trace tracking in mass mailing. We generate a trace
and find a short link in it, in order to test the tracking in mass
mailing;
* add tests for side effects of mass mailing routes: update of trace status,
clicks, ...
* wrap base url locally instead of globally in MockTracker class to ease
specific setup in classes;
Prepares Task-2150462 (Mass Mailing: Unsubscribe flow improvement)
closesodoo/odoo#94660
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
TestMail holds a tool to create test records in batch, notably with inline
partner creation. Allow its usage in some sub modules and tests depending
directly from the base mail test class. This allows notably usage of this
tool in performance tests (see enterprise PR).
Also explicitly set some test data to ease sub tests writing.
Prepares Task-2150462 (Mass Mailing: Unsubscribe flow improvement)
Part-of: odoo/odoo#94660
Render safe option was used with Jinja rendering to tell Jinja that content
was safe and was not expected to be escaped. This was used notably in subject
as characters like ``&`` was escaped in email subject (e.g. `R&D News`).
This is now supported directly by the "inline template" rendering engine that
is used to render text-based templates since Odoo v15 [1]. This option is not
supported by code anymore anyway and leads to nothing.
Task-2088884 (MailComposer: Onchange to editable computed stored)
Task-2710804 (MailThread Api Cleaning)
[1] See odoo/odoo@68182baff4
Prepares Task-2088884 (Mail: Composer Onchange to Editable Computed Stored)
Part-of: odoo/odoo#94660
This commit mainly fixes an override of ``_message_compute_author``. It is
done with an incorrect default parameter value for raise_exception defaulting
to False instead of True). By the way we also fix parameter naming in order to
ease understanding.
Part of Task-2710804 (Mail: Clean Mail.Thread API)
Part-of: odoo/odoo#94660
Since createMessageComponent helper is gone, the qunitTest field
of the message model is unused. Let's remove it.
closesodoo/odoo#94676
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The `o_web_client` class was removed from the target in the test
utils because some scroll tests were failing. Now that those tests
have been fixed, we can remove this hack.
closesodoo/odoo#94675
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>