When displaying the price of a shipping method, if its type is "Fixed
Price", the option "Tax-Included" is not considered.
To reproduce the issue:
(Use demo data)
1. In Settings:
- Product Prices: Tax-Included
2. Create two shipping methods:
- SM01:
- Provider: Fixed Price
- Set a customer tax of 15% on the associated delivery product
- Fixed Price: 100
- Published: True
- SM02:
- Provider: Based on Rules
- Set a customer tax of 15% on the associated delivery product
- Pricing:
- If weight >= 0: Cost = 100 + 0 * weight
- Published: True
3. Open the eShop
4. Add the Customizable Desk to the cart
5. Process checkout
Error: When displaying the delivery methods, the price of SM01 is
incorrect: $100 instead of $115. In other words: the tax is not in the
price, as it should according to the settings. (The price of SM02 is
correct: $115).
The displaying of the shipping method price depends on the shipping
method type:
https://github.com/odoo/odoo/blob/68b08164e5de353ea0c48de92d0c0e028b49bc52/addons/website_sale_delivery/views/website_sale_delivery_templates.xml#L35-L46
If the type is `fixed`, we display the `fixed_price` field of the record
(that is the value encoded on the shipping method form, so it does not
include any tax)
If the type is different, we just display a text: "Select to compute
delivery rate". And, when loading the page, a JS widget gets and
displays the rate for each shipping method (including SM01!)
https://github.com/odoo/odoo/blob/204a2bb5553a275e785fbb9ccefbe26b06ef4ba1/addons/website_sale_delivery/static/src/js/website_sale_delivery.js#L38-L47
And in that case, the rate returned by the RPC includes the tax (if
needed):
https://github.com/odoo/odoo/blob/bc2615d8ab5135f21c488c5a260c59605b0da498/addons/website_sale_delivery/controllers/main.py#L57-L60
That is the reason why the displayed price of SM02 is correct.
When the widget gets the prices, it uses the classes to find and replace
the rate with the one returned by the server:
https://github.com/odoo/odoo/blob/204a2bb5553a275e785fbb9ccefbe26b06ef4ba1/addons/website_sale_delivery/static/src/js/website_sale_delivery.js#L95-L105
However, if the shipping method type is `fixed`, it does not have the
class `o_wsale_delivery_badge_price`, so the SM is not found and its
type is not updated (that explains why the displayed price of SM01 is
not correct).
Because the widget gets the rate of all shipping methods, we should take
advantage of that and let the widget apply the result on each method,
even if the type is `fixed`
OPW-2854341
closesodoo/odoo#96657
X-original-commit: ba210fe1dbcfe3026e6f34b94a5defd2fb4cd15d
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
_description of the `hr.payroll.structure.type` should be "Salary
Structure Type" instead of "Contract Type"
closesodoo/odoo#96653
X-original-commit: 49ecc72b2971edc57f85d4bea50901021b4f3f7b
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Since odoo/odoo@2dd37982e6 , Kanban
column's width is flex based. But sadly two types of columns were not
adapted properly:
- Kanban small column didn't reduce the column width
- Quick create kanban column shrinked too much
This commit fixes both these issues by properly setting the flex-basis
size for one and disabling shrinking for the other.
closesodoo/odoo#96650
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When navigating backward to step 2, the website purpose is reset in
order for the navigation to not automatically advance to step 3.
Because of this, when navigating to further steps with the browser's
forward button, that field remains empty. This ultimately produces
an error when the configurator state is extracted to generate the
website.
After this commit the former selected purpose is kept when no purpose
is selected anymore. It is then used when collecting the configurator
details if there is no selected purpose.
task-2789075
closesodoo/odoo#96640
X-original-commit: d874958aa44c0bd96ab7b84f7066c9b8d28642d6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
With the conversion of views to the new webclient, the o_xxl_formview
class was no longer applied as expected, which broke the layout and the
width calculation in embedded list views (as the chatter would take up
more space than intended during the width computation). This commit
fixes that by adding the class when needed.
This commit also moves the css rules relative to that class which are
mainly used for the side-chatter, from enterprise to community, as the
side chatter has been made available in community as well.
closesodoo/odoo#96627
Enterprise: odoo/enterprise#29803
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
As the `color-contrast` function provided by BS5 basically fulfill the
same need as the custom `o-get-most-contrast` function and the later one
isn't used, we can safely remove the custom one.
closesodoo/odoo#96626
Note: last (and only) usage was in mrp_workorder's tablet view.
Related: odoo/enterprise#29802
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Steps to reproduce:
- Create a leave request for multiple employees
- Go in the employee list
Current behavior:
The leave request is not visible in the list view
Expected behavior:
The leave request is visible in the list view
Explanation:
Previously a domain on the list view restricted the
records to the one that had an employee_id with the
right company but this condition was never met by the
the multi_employee leaves as they have no employee_id.
To solve the issue we add to the domain a condition to
accept multi_domain employee that have the right state
and the right company.
opw-2917291
closesodoo/odoo#96625
X-original-commit: f1c7c3737d3420a1356fd8e24d7970edcdb571c6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Purpose: Allow users to make product 'expense available'
(or the opposite, unset them as expense products) by making the
field 'can_be_Expensed' available in the base product view.
task - 2909067
closesodoo/odoo#96619
Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit refactors the way we handle the "<>" case in domain
evaluation, for the sake of consistency with the "==" case. Indeed,
we tried to avoid using JSON.stringify as it could have an unwanted
behavior (e.g. it could crash, or it could have been overridden on
the value we manipulate).
closesodoo/odoo#96614
Signed-off-by: Géry Debongnie <ged@odoo.com>
By enabling the method '_employee_values_sync' the original behavior is
keep. Furthermore, by overriding the method now is possible to decide
either a field is synced or not into employee.
closesodoo/odoo#96609
X-original-commit: 46c12cc0f72b2a6aba907fe903a255aed61a1695
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Since the revamp of the Kanban View in mobile and the migration of the
Settings view to the OWL views, the jQuery.touchSwipe library is not
used anymore.
closesodoo/odoo#96608
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- A user has accounting permission but no employee permission, when that user creates a payment in spending it gives an error that does not have access to the bank_account_id field
- This commit allows the user to read the bank_account_id field when creating a payment
closesodoo/odoo#96607
X-original-commit: 8045780cbf2dc36d533dbfd3315bab31a229351d
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit, the records created in grouped kanban view via
the quick create feature were displayed in the bottom of the column
where they had been created. They should be on top. This commit
fixes that issue. Note that this only concerns the state of the
kanban view before the next reload, as from that moment onwards,
the default order on the model is used.
Issue introduced by the conversion of the kanban view to owl.
closesodoo/odoo#96606
Signed-off-by: Samuel Degueldre <sad@odoo.com>
When using _prepare_analytic_distribution_line, it would take
the company for the line from the distribution, then the env.
This would cause multicompany issues in some case, creating the
line for the wrong company. By using current the move line to
get the company before falling back on the env, we can avoid such
an issue.
OPW-2900827
closesodoo/odoo#96465
X-original-commit: 8c10324f062e4cd239494545cdfce7cde7ffadbb
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
*: calendar, im_livechat, survey.
Following @ged-odoo review, the multi tab service has been improved:
- multi_tab_service.js has been moved to the correct location.
- _callLocalStorage method has been removed and replaced by
getItemFromLocalStorage/setItemToLocalStorage.
- underscore.js calls have been removed.
- multi_tab_service is now using function closure style instead of class.
- multi_tab service is now using its own bus instance.
- service name is now in snake case as per convention.
- tests have been added.
- multi tab service now handles setting/removing/getting values
shared between all the tabs.
closesodoo/odoo#96386
Enterprise: https://github.com/odoo/enterprise/pull/29694
Related: odoo/enterprise#29694
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Adapt the wording since the edit button is not always on the top
right corner but can also be on the top left one. Also make the
info alert non editable, and add a placeholder to indicate the
editable area.
Task-2924229
closesodoo/odoo#96371
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
The purpose of this component was not helpfull
as it has no real use case and was only used
by the BinaryField component.
Instead of using an entire component, we only
keep the DOM that is now used directly in the
BinaryField template.
closesodoo/odoo#96357
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit fixes the wrong implementation of the
field. It was not functional and is now using the
FileInput component.
Before the commit, it was not possible to upload or
delete files from the list. Test has been adapted to
those changes.
Toast notifications were also missing, and a new
test has been added to check that a notification is
correctly displayed when the server responds with a
error message for a given file.
Part-of: odoo/odoo#96357
Since [1] and even after [2] when replacing a media by a media of a
different type only classes were cleaned - but all inline styles were
copied.
This commit filters the inline styles when replacing a media by a media
of another type.
Steps to reproduce:
- Drop a "Text - Image".
- Replace the image by an icon.
- Apply solid colors for the foreground and the background.
- Replace the icon by an image.
=> The applied colors were kept in the inline style of the image.
[1]: https://github.com/odoo/odoo/commit/7fd0698cf765a79959566b51e33cb76bff83d344
[2]: https://github.com/odoo/odoo/commit/9ca349bbdb75505e8dbd31898f05ba8d694e7953
task-2687506
closesodoo/odoo#95853
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Since [1] when replacing a media by a media of the same type or that has
some extra classes in common, those classes were removed instead of
being kept.
This commit makes sure only the classes that do not exist in the newly
selected media type are removed.
Steps to reproduce:
- Drop a "Text - Image".
- Replace the image by an icon.
- Apply a circle effect and colors on the icon.
- Replace the icon by another icon.
=> The applied effect and colors were lost.
[1]: https://github.com/odoo/odoo/commit/9ca349bbdb75505e8dbd31898f05ba8d694e7953
task-2687506
Part-of: odoo/odoo#95853
Commit [1] moved the editor in the backend introducing changes to the
way some options interact with the website. This unfortunately broke
the header position option, the header background option and the footer
visibility option.
The header position option would loop indefinitely, the header
background color option would not display the correct preview colors and
the footer position would trigger a traceback.
This commit fix those bugs:
- The header position option had a callback that was never called, it is
now called.
- The copy of styles introduced by [2] is now less implicit. Only styles
that are defined in web_editor/common/utils:
[EDITOR_COLOR_CSS_VARIABLES] are copied on the snippet menu, and only
those variables will be used as background colors for the preview
elements. (Allowing for every other colors like black and white to be
used with classes).
- The footer visibility option had a broken line of code that was copied
from past code. It is now fixed and working.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
[2]: https://github.com/odoo/odoo/commit/212a8bfdd21269b18054200b9e2585e1c95540d6
task-2687506
closesodoo/odoo#94949
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Since this commit [1], when you select the Header position option and
set it to "Over The Content", the change is not saved if you did not
edit something else in the page too.
Indeed, now that the "save" works correctly (and that it no longer saves
the page every time). It does not detect the change made by this option
which is to add a class on the '#wrapwrap' element. (The editor looks
for changes inside the wrapwrap but not on it).
This commit checks if any page option is dirty on save on top of
checking if the content of the page has been modified.
Additionally, this commit fixes a bug that would occur on Firefox based
browsers where the hidden input used to display the status of these
options would be auto-completed by the browser in some conditions.
(https://bugzilla.mozilla.org/show_bug.cgi?id=520561).
This could result in an incorrect state being displayed.
To reproduce:
- Change the option, click on cancel, start the editor
- the incorrect state is displayed
A test is also added by this commit to verify that all the page options
works correctly.
[1]: https://github.com/odoo/odoo/commit/bab673488e185ddd7792aedecc3870663290fed3
task-2871426
X-original-commit: ea7a69b344d970cc2b31555f4cd8fd7c5e2fc6d2
Part-of: odoo/odoo#94949
In SearchModel, the calls to search_panel_select_range and
search_panel_select_multi_range were done without using the global
context (e.g. the action context), contrarily to what is done in the
legacy SearchPanelModelExtension. We fix that.
closesodoo/odoo#96458
Signed-off-by: Géry Debongnie <ged@odoo.com>
During the BS5 migration, the .text-body class wasn't properly ported.
As it is a standard Bootstrap class and useful to override component's color with the one used by the body (ie. set a heading color the same as the content).
This commit restores it.
closesodoo/odoo#96173
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
When receiving more than expected, we try to redirect the SM thanks to
the putaway rules. This can lead to undesirable behaviors.
To reproduce the issue:
1. In Settings, enable 'Storage Locations'
2. Create a storable product P
3. Edit the operation type "Receipt":
- Show Detailed Operations: True
4. Create and confirm a planned receipt for 1 x P
5. In the Detailed Operations:
- Set the done quantity to 3
- Set the destination location to Shelf 1
6. Validate the receipt
Error: The destination location of the SML has changed: Stock. It should
still be Shelf 1
When validating the SM, because the done quantity is more than the
demand, an exra-move is created. During such a process, the extra move
is confirmed and assigned, so it leads to the destination redirection
thanks to the putaway rules (that's the reason why the destination Stock
will be selected and defined on the SML).
In such situation, we should not try to apply the putaway rules.
OPW-2900283
closesodoo/odoo#96124
X-original-commit: 0183298293192538a801f52262c047ea34a1b76a
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
The alert block content and style for the transaction status after
payment were computed in two different places: In the dedicated
`payment.transaction_status` QWeb template, and in the
/payment/confirmation` route's controller which, for some reason, was
re-inventing the wheel instead of relying on the dedicated template.
This commit combines the slightly different behaviors in the template
and gets rid of the duplicated logic in the controller to:
- Handle the states 'draft' and 'error'.
- Always show the transaction's state message, and not only when the
transaction was in a state for which there exists no pre-defined
message (`draft` and `error`).
task-2924873
closesodoo/odoo#96348
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
==== Short version ====
Google is deprecating Universal Analytics in July 2023 and Google
Sign-In in March 2023. Google Analytics Embed API is based on Sign-In,
meaning it won't work anymore. It actually already doesn't work anymore
for accounts created somewhere after mid-2020 apparently.
There is no plan for now for Google to allow Analytics 4 dashboard to be
embed in external website.
We therefore can't do anything to keep the Google Analytics dashboard in
Odoo.
In previous stable version, it was kept but is displaying a warning
about it (as until mid 2023 old accounts can still embed it).
All this is about the embed dashboard, not the tracking in itself for
which Odoo is already adapted in Odoo 15.0 for Analytics 4.
==== Detailed version (following short version, read it first) ====
- Universal Analytics EOL July 2023, see [1].
- It will be replaced by Analytics 4 for which Odoo is already ready and
actually using it since version 15.0 with [2].
- Google Sign-In EOL March 2023, see [3]. Analytics Embed API was based
on it, it won't work anymore.
- There is no plan (for now) for Google to allow Analytics 4 to be able
to be embed in external websites. They seem to just have dropped the
"feature".
This was confirmed by Google here [4] and indirectly here [5] in the
DOC:
`Note: This API does not support Google Analytics 4 (GA4) properties`
- While the EOL is planed for 2023, the dashboard integration is already
not working anymore for new accounts.
- Old projects/keys/accounts can still embed their analytics dashboard.
The threshold seems to be somewhere mid-2020, according to [6].
It seems to be accurate as my own key from 2018 still works, while my
keys from 2021 do not.
==== Fix ====
- In stable, warn user about it in their Odoo Analytics dashboard (this
PR) and also add a warning about that on the doc.
- In master, simply drop the whole google analytics dashboard
integration and remove the doc about it, see [7].
==== Useful links ====
[1]: https://support.google.com/analytics/answer/11583528?hl=en
[2]: https://github.com/odoo/odoo/commit/78bc86cbeccfc5df16218aee2b0d7c501e5c05b5
[3]: https://developers.googleblog.com/2022/03/gis-jsweb-authz-migration.html
[4]: https://issuetracker.google.com/issues/233738709?pli=1
[5]: https://developers.google.com/analytics/devguides/reporting/embed/v1
[6]: https://support.google.com/analytics/answer/11583832
[7]: https://www.odoo.com/documentation/15.0/applications/websites/website/optimize/google_analytics_dashboard.html
Finally, note that it means that from July 2023 to Octobre 2023, while
Odoo 14.0 is still supported, Google Analytics won't work anymore in
that version as it will still be designed for Universal Analytics and
not Analytics 4.
opw-2710910
opw-2855405
opw-2881515
opw-2892370
task-2790245
task-2820890
closesodoo/odoo#96280
X-original-commit: d065595f77790fb5ab9480f6de5b88549352324b
Related: odoo/enterprise#29666
Related: odoo/upgrade#3698
Related: odoo/documentation#2499
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Filter product templates search result if there are any possible attribute
combination to get/create a product variant regarding the searched attributes.
For example if the combination (A, B) is excluded, filtering on (A, B)
will filter that product out of the result.
task-2558970
closesodoo/odoo#89018
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit adds the possibility to define a maximum payment amount that
a given acquirer can process. If the payment amount exceeds the value,
the acquirer is filtered out of the available acquirers listed on the
payment forms.
While we're at it, the field `country_ids` is renamed to
`available_country_ids` to better depict that it is not a property of
the acquirer, but a configuration option. It will also be coherent with
the field `available_currency_ids` that is expected to be added soon.
Task - 2162165
closesodoo/odoo#82411
Related: odoo/enterprise#24412
Related: odoo/upgrade#3703
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Steps to reproduce:
1- install POS in multicompany env
2- create a customer c from POS UI
3- c doesn't belong to the active company
Bug:
the company_id is not set when the customer is created
Fix:
set comapny_id to current active company for new customers created from
POS
OPW-2881551
closesodoo/odoo#96073
X-original-commit: 3aa03eb65d431cb9749a2b31a9a09d6b41cd34a4
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
Have a legacy list view, click on a record to open it in a new (WOWL) form view
Before this commit, the pager was wrong, as we never passed the list's current resIds
to the form.
After this commit, the pager of the wowl form view is correct.
closesodoo/odoo#96123
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The "plain text" template instantiated the regular web_editor.wysiwyg
rather than its specific override for mass_mailing. As a result, it
didn't include certain customizations like commands that should be
overridden for mass_mailing.
task-2715295
closesodoo/odoo#94434
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Previously, we were using the bootstrap 4 function "color-yiq" to choose
a text color depending on the background color. Since the migration to
BS5, color-yiq is no longer valid, and color-contrast should be used
instead, but the wowl-views migration was maintained in parallel from
the BS5 migration and some instance of this function call were added
back with it. This commit fixes those.
Functionally, this fixes the text color in the m2m_tags field.
closesodoo/odoo#96598
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
These rules no longer apply because they use a direct descendant
selector which no longer matches since field widgets now have an extra
div. These rules also already exist in the statusbar_field.scss file.
Part-of: odoo/odoo#96598
After the bootstrap migration, the enterprise badge in the settings view
were the wrong color because the class bg-primary was not adapted. This
commit fixes that.
After the wowl views merge, the badge has become hidden behind the
navbar, because it can no longer modify the DOM of its label as it is
managed by owl. When there is no label, the widget appends the badge to
its own $el, and uses position: absolute to position it. This didn't
work because the closest parent that was positioned was the view itself.
This commit fixes that by giving a position: relative to the settings
box.
closesodoo/odoo#96580
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The css rules for the settings view should be in the corresponding css
file, not with the generic form view rules. This commit moves these
rules to the proper files and unnests some rules when the selectors are
specific enough, which generates less CSS.
Part-of: odoo/odoo#96580
Windows uses /r/n as newlines and the split parameter was not taking
that into account, thus inserting the /r character.
task-2742071
closesodoo/odoo#96422
X-original-commit: 90e565f811523968c297f0254f4aa7046c4e710e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit solves 2 problems in the list view:
- incorrect label for a column
- the label in the optional column dropdown can be different than
the label of the displayed column
When converting the list view, we used the displayName of the widget
and not its label.
In order to improve the consistency between the labels in the optional
column dropdown and the associated columns, we decided to use the same
label.
closesodoo/odoo#96408
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the subtypes are not correctly ordered when
none of the subtypes have a parent model. while it should be
order by parent model, then by sequence.
So in this commit, we will first check if both their parent model
are falsy then we can't order them (A = B). Then we will consider
their sequence, and they will be useful to determine the proper order.
task-2904015
closesodoo/odoo#96402
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit when multiple instances of the same product
were selected in a PoS session, `can_be_merged_with` checked if they
had the same price before merging them in a single order line. However
the order line prices were not rounded. In the case of a floating
point error in order line price calculation, this behavior resulted
in multiple order lines for the same product.
Steps to reproduce the issue:
1. Create a product
2. In the pricelist, create a formula of -10% discount based on cost,
and set the cost as 136.35 $
3. Open a POS session, add the product multiple times
4. The products are not combined in one group, each creates their
own order line
To fix this issue, we need to round the order line prices in this
function.
opw-2854304
closesodoo/odoo#96410
X-original-commit: 254521d302b31acd5b6f6cfbf49c184035b30eb0
Signed-off-by: Masereel Pierre <pim@odoo.com>
This commit fixes the profiler datetime usage by properly using the
'real_datetime_now' as a callable.
This was breaking the output json file when profiling.
closesodoo/odoo#96456
X-original-commit: 5fec27e42b033f79933afb3d0c85b142360981f9
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>