Commit Graph
151076 Commits
Author SHA1 Message Date
Randall Castro 8930aa08ab [FIX] base: state codes for Costa Rica fixed
According to Costa Rica INEC (Instituto
Nacional de Estadística y Censo) governmental
institution entrusted with the running of
censuses and official surveys in the country
and Ministerio de Hacienda (Government Ministry
of Costa Rica in charge of governing the fiscal
policy on public resources, according to the
principles of economy, efficiency and
effectiveness).

INEC reference:
Topic 3. Codificación detallada de la DTA,
calificación de grado de urbanización y
región de planificación.
[Codificacion y Clasificacion](https://www.inec.cr/sites/default/files/documetos-biblioteca-virtual/meinstitucionalmcgfecr.pdf)

Ministerio de Hacienda reference:
[Codificacion](https://www.hacienda.go.cr/ATV/ComprobanteElectronico/docs/esquemas/2016/v4.1/Codificacion,canton,provincia,distritoybarrio.pdf)

closes odoo/odoo#87034

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-03-23 11:00:07 +01:00
Benjamin Vray 29eda89bc7 [FIX] web_editor: fix scrolling the page while dragging a snippet
Since the commit [1], it's no longer possible to scroll the page while
dragging a snippet thanks to its thumbnail.

This is because for mass mailing the scroll element is not the same and
to check it we were looking for a class in the DOM. For that we did a
jQuery 'find' but without a 'length', the jQuery 'find' is always
truthy.

[1]: https://github.com/odoo/odoo/commit/29c6c80ac7009aa5068c763778342f7c6b115fad

task-2798872

closes odoo/odoo#87021

X-original-commit: d4b231222c5baf726332deddfe6d4c5e3e7865db
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-23 10:59:55 +01:00
anhe-odoo bc27fffb27 [FIX] delivery: use pricelist to compute shipping cost
Expected Behaviour

When adding a shipping cost in a SO, with the shipping method being
associated to a product, the price should be calculated according to
the price of the product in the order's pricelist if available

Observed Behaviour

When adding a shipping cost related to a product, with a fixed price,
the public price of the product is used instead of the price defined
in the SO pricelist

Reproducibility

1. Create a product "Test Shipping" with a public price of 10
2. Create a shipping method "Test Shipping" associated with the
"Test Shipping" product
3. Create a pricelist "Test Pricelist", where the product "Test
Product" has a cost of 15
4. Create a contact "Test Contact" associated with "Test Pricelist"
5. Create a So for the "Test Contact" with "Test Shipping" as shipping
method -> Shipping cost will be 10 instead of 15.

Fix Description

The issue here was that the price computed by the delivery carrier didn't
took into account the selected pricelist. We tried to then change it in
the delivery chooser wizard, but some issue with particular case (i.e.
when the shipping cost should be 0 if the SO total is bigger than X)
appeared, leading us to add the fix directly in the delivery_carrier
classe.

Related Issues/PR

- opw-2754482

closes odoo/odoo#87028

X-original-commit: bb778cd7be835706f54e9e0f342eecf3e5e4e904
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
2022-03-23 07:06:06 +01:00
Denis Ledoux 3625b1d761 [FIX] auth_totp_portal: revoke trusted device selector and model
The selector `.fa.fa-trash.text-danger` is not enough precise,
it could select another element using the same classes,
as it's the case in #85682,
and at the binding the event `RevokeTrustedDeviceButton` `_onClick`
event on that other element.
I would have used a dedicated class directly on the element,
such as `o_auth_totp_remove_trusted_device`,
but since we are in stable and cannot rely on the template
being updated, there is no other choice than using what we
currently have without the update.

In addition, the `remove` method must be called on the model
`auth_totp.device`, as since the revision
https://github.com/odoo/odoo/commit/2dee29a7dc6db5cd1f9cc62989b905cff5466f3b#diff-6ea780b2956bc89552a57dd3e711fdd7191d1599c246cc9c887bcc38fa7eabacR11-R12
`auth_totp.device` has been added,
inheriting from `res.users.apikeys` but with a different `_name`
and they therefore do not share the same IDs.
Meaning you would end asking the deletion of the `res.users.apikeys`
record using the same ID than trusted device record.

closes odoo/odoo#87033

X-original-commit: 0aeb0030752e3634218ce7dd3d394447715d403b
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-03-23 01:26:13 +01:00
Akim Juillerat 7de9403a9e [FIX] hr_recruitment : send interview to duplicated applicant
Steps :
Install Recruitment and Surveys.
Recruitment > Settings > Enable Send Interview Survey.
Recruitment > Any Position > Create an Application,
click on Send Interview and then on Send.
Duplicate it, click on Send Interview end then on Send.

Issue :
ValueError: Wrong value for survey.user_input.applicant_id.

Fix :
This is initially caused by the fact that the applicant's response
is also duplicated. As it shouldn't be, copy=False.

opw-2751975

closes odoo/odoo#87023

X-original-commit: bc9dc1d710cee2808e0823bb96064c0f87beee78
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-23 00:29:36 +01:00
Goffin Simon bc40f57fec [FIX] website_slides: Missing translation
opw:2765730

closes odoo/odoo#87012

X-original-commit: 5982d2e9d31bd56c517bd11ff9d3ebdf5a430f70
Signed-off-by: Simon Goffin <sig@odoo.com>
2022-03-23 00:29:30 +01:00
Sébastien Theys 57ac4a4dca [IMP] mail: prevent useless render of message view
Avoid observing the last message view just for checking the state of self.

task-2800990

closes odoo/odoo#87003

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 00:29:26 +01:00
Ipsita Borisagar 1043c6c65c [FIX] mail: do not allow guests for group restricted channels
Before this commit:

When user shares the invitation link of the channel(groups restricted), guests
are allowed to access it.

After this commit:

Guests will not be allowed to access channels that are restricted to groups.

Task-2679184

closes odoo/odoo#87004

X-original-commit: ea3232c111546ec636f543db912bf0e2a7ed345b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-23 00:29:22 +01:00
roen-odoo 741d2fe9ef [FIX] mrp, sale_mrp: Avoid merging stock move different bom_line_id
Current behavior:
When using a product kit that have a product kit in his BoM some move line where merging when they shouldn't.
Because of this the delivered count wasn't correctly updated in any sale order using this product

Steps to reproduce:
- Create product B to manufacture with a BoM (type Kit) using component A and component B
- Create product A to manufacture with a BoM (type Kit) using product B and component A
- Create a sale order with product A
- Confirm the sale order and validate the delivery
- The delivered count of product A on the sale order stays at 0

opw-2777810

closes odoo/odoo#87000

X-original-commit: 0e6480811e2144a1034f1347a816a0bd052c4516
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-03-22 23:31:03 +01:00
Abdelouahab (abla) 7b366a8895 [FIX] auth_ldap : add system parameter to disable referral chasing
To reproduce
============

- Using ldap server with Microsoft Active Directory
- Set up ldap authentication on Odoo
- Trying to log with a username/password from ldap on Odoo doesn't work

Purpose
=======

Because referral chasing is enabled by default, python-ldap ends up requesting
a completely different unrelated server.

Specification
=============

To solve the issue, a system parameter `disable_ldap_chase_ref` must be created
to have the possibility to disable referral chasing by setting its value to `True`.

opw-2724800

closes odoo/odoo#86993

X-original-commit: f40a98ee9b020782d0097372066c555909253768
Signed-off-by: Olivier Dony <odo@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2022-03-22 23:30:59 +01:00
Adrien WidartandBruno Boi e966caca76 [FIX] web: ignore numpad for hotkeys
To reproduce the issue:
(Need a Windows machine)
1. Install Stock
2. Inventory > Products > Products
3. Try to write the diameter symbol (ALT + 155) in the search bar

Error: When pressing the key '1' on the keyboard, the page is redirected
to the Inventory Overview page

Because of hotkeys, it is not possible to use the Windows feature that
allows users to write ASCII characters with ALT+[numerical code from
keypad].

OPW-2731632

closes odoo/odoo#86981

X-original-commit: a0f419c40a8089571839c2f5a6c50d506faf9a0b
Signed-off-by: Bruno Boi <boi@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2022-03-22 23:30:55 +01:00
Jérémy Hennecart e1118a13db [FIX] base: use tz in time only datetime field qweb
We should also use the tzinfo to display only the time of a
datetime.

task-2458013

closes odoo/odoo#86967

X-original-commit: 49604185d04a3f9d7772d2a60771f0e777720eef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-22 23:30:52 +01:00
Fabio Barbero 8ed0c6f54f [FIX] mail: add check valid email address
Purpose
=======
The method find_or_create of res.partner overwritten in mail does not
take into account the parameter assert_valid_email. This commit adds a
simple check and test.

Task-2799577

closes odoo/odoo#86943

X-original-commit: 7a07b365370d03e963aa7f7d9d19df7ee33e8a1c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-22 22:13:04 +01:00
qsm-odoo c6812eed1a [REV] mass_mailing, website: simplify s_numbers snippet
This reverts commit [1] (in master only since XML change) which was a
temporary fix. Indeed, the proper fix was merged at [2] since then.

[1]: https://github.com/odoo/odoo/commit/886af1f328a9f1664b0d3e204bf984bfee28b215
[2]: https://github.com/odoo/odoo/commit/5e3c466e1b6a23a76807ab4f4d81bcf70105eedb

closes odoo/odoo#86935

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-22 22:12:59 +01:00
Antoine Guenet 6b9ca81e76 [FIX] web_editor: replace oe-zws-empty-inline with new data attribute
This adapts new code which uses `oe-zws-empty-inline` to use the new
name `data-oe-zws-empty-inline` instead.

closes odoo/odoo#86930

X-original-commit: c8d892496e78beea804c80091f4b06dc2e858b59
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-22 22:12:56 +01:00
Antoine Guenet 6cd42319fa [FIX] web_editor: properly clean zero-width spaces inserted for formats
When inserting a format with a collapsed selection, we need to insert a
zero-width space. It should not be saved so we need to isolate it and
put the "oe-zws-empty-inline" attribute on its parent so it gets cleaned
up by the sanitizer.

X-original-commit: 4ce274ba39cd8046b9ef4e0b99df66913375f993
Part-of: odoo/odoo#86930
2022-03-22 22:12:55 +01:00
Antoine Guenet f41c3e4a42 [FIX] web_editor: unformat only if full selection is bold
Take `<p>a<b>bcde</b>f` and select the whole paragraph. If you click the
"bold" button, you would expect the whole paragraph to become bold. Only
if you only select "bcde" do you expect to unbold it. This is the
behavior of other editors. Odoo-editor so far was unbolding as long as a
part of the selection was bold.
The same applies to other formats.

Currently the format buttons are active when the closest start container
is that format but it should be active when pressing it would undo the
format, ie when the whole selection is that format. This harmonizes it
with the browser defaults.

task-2754127

X-original-commit: 69c5db26f81ace1a9a032b2ef7f488c997be00ad
Part-of: odoo/odoo#86930
2022-03-22 22:12:55 +01:00
Antoine Guenet 18ca8b44cd [FIX] web_editor: properly detect background color in toolbar
When a background color is applied on an ancestor, while it's visibly
there, `getComputedStyle` doesn't know. Because it did depend on it,
the toolbar showed the wrong color in these cases.
Eg: `<span style="background-color: red;"><b>a[]bc</b></span>` was
showing no background color.

task-2778416

X-original-commit: a125933b34500d51183bc5eb02a531fb3b293de5
Part-of: odoo/odoo#86930
2022-03-22 22:12:55 +01:00
Antoine Guenet 0f1071d309 [FIX] web_editor: properly toggle active link button
The link button was toggling its active state on every update of the
toolbar because we weren't passing the toggle function a boolean. and
if the element we were passing it was `undefined`, it triggered the
default behavior which is to just toggle. Instead we want it to be false
if the element is `undefined`.

X-original-commit: 7aecd36a169033a89defeb00ba0ae53cd64cdcd5
Part-of: odoo/odoo#86930
2022-03-22 22:12:55 +01:00
Antoine Guenet ab37804400 [FIX] web_editor: properly apply/unapply underline and strikeThrough
Underline and strikeThrough styles are special beasts in that they both
are applied to the `text-decoration-line` property. Unlike `font-weight`
or `color`, They behave like a border: setting
`text-decoration-line: none` to an element won't undo the value of the
parent and therefore the text will still show the decoration applied to
its parent. Similarly, nested decorations will apply over each other:
a text node whose parent has an underline decoration and whose
grandparent has a line-through decoration will be both underlined _and_
struck through.
Consequently, we can't treat these styles the same way we treat bold,
italic and colors:
1. To undo the style, we have to split the text from its styled ancestor
2. To apply eg underline to a struck through text, we have to insert a
   new span.

task-2778416

X-original-commit: 93102a7dcb3e2c1a5803ab99f2f924b0b24e44c2
Part-of: odoo/odoo#86930
2022-03-22 22:12:54 +01:00
Antoine Guenet fa417893a4 [FIX] web_editor: handle arrow keys next to zero-width spaces
Consider the following situation: `<p>a[]b<span><zws></span>c</p>`,
where `<zws>` is a zero-width space and `[]` is the collapsed selection.
On pressing the `ArrowRight` key, we want to enter the `<span>` so we
don't press once to be after the "b" then once again to be before the
`<zws>`. The cases with a non-collapsed selection, and with the left
arrow are analogous. This is what this commit allows us to handle.

X-original-commit: 8e1d5ff3f3bdef8ca2f0eb069c62140260aad3f6
Part-of: odoo/odoo#86930
2022-03-22 22:12:54 +01:00
Antoine Guenet 6844ff5a3f [FIX] web_editor: apply format, font-size and color collapsed
When the selection is collapsed it was impossible to set a format (bold,
italic, underline, strikethrough), a font-size or a color. This makes it
possible by inserting and selecting a zero-width space first, then
placing the caret to its left when we're done.

task-2778416

X-original-commit: b4eb0fe69bce5ca18d8450cd7118740f1d31f780
Part-of: odoo/odoo#86930
2022-03-22 22:12:54 +01:00
Antoine Guenet 3164697a7e [FIX] web_editor: ensure all formats use spans
The bold format is overridden to use inline style on a <span> rather
than a <b>. The other formats (italic, underline, strikethrough)
continued to use the default browser behavior. This harmonizes them.

X-original-commit: ce59bbd1c13d7fd4cc6971b89cc95386d95fcd75
Part-of: odoo/odoo#86930
2022-03-22 22:12:53 +01:00
Antoine Guenet 7411fc970b [FIX] web_editor: use styling commands on shortcut too
When pressing the italic or underline buttons, we pass through a command
in the editor. Their corresponding keyboard shortcuts however were not
intercepted by the editor and were therefore triggering the default
browser behavior. As a result we had different behaviors when using the
buttons and the shortcuts.

X-original-commit: 2e3c3b3a15fa6ff4fa209fc7dbac10864f8898a2
Part-of: odoo/odoo#86930
2022-03-22 22:12:53 +01:00
Kevin Baptiste 9caf5ed06a [FIX] hr_expense: correct context on tax_ids
Newly created taxes were missing the correct type_tax_use and
price_include values, thus making them not working properly.

closes odoo/odoo#86883

X-original-commit: 161208315c2bb6e49fae243ead680710c040b872
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-22 22:12:35 +01:00
Alexandre Kühn e1d48634d7 [IMP] mail: guard ComposerTextInputComponent
Task-2797754

closes odoo/odoo#86798

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 22:12:31 +01:00
Alexandre Kühn 1de8348e5a [IMP] mail: guard ComposerSuggestionListComponent
Task-2797754

closes odoo/odoo#86796

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 22:12:27 +01:00
Alexandre Kühn a00e016692 [IMP] mail: guard ComposerSuggestionComponent
Task-2797754

closes odoo/odoo#86795

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 22:12:23 +01:00
Alexandre Kühn ae4b370768 [IMP] mail: guard ComposerSuggestedRecipientListComponent
Task-2797754

closes odoo/odoo#86794

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 22:12:18 +01:00
Alexandre Kühn fd0d024419 [IMP] mail: guard ComposerSuggestedRecipientComponent
Task-2797754

closes odoo/odoo#86793

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 22:12:14 +01:00
Alexandre Kühn 86c5dd63a8 [IMP] mail: guard ComposerComponent
Task-2797754

closes odoo/odoo#86792

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 22:12:10 +01:00
Alexandre Kühn 6fe7c48e86 [IMP] mail: guard ChatterTopbarComponent
Task-2797754

closes odoo/odoo#86784

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 22:12:06 +01:00
Alexandre Kühn 5678c5f862 [IMP] mail: guard ChatterComponent
Task-2797754

closes odoo/odoo#86783

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 22:12:02 +01:00
Alexandre Kühn 5be9dc3429 [IMP] mail: guard ChatWindowHeaderComponent
Task-2797754

closes odoo/odoo#86782

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 22:11:57 +01:00
Alexandre Kühn 5cc021663d [IMP] mail: guard ChatWindowComponent
Task-2797754

closes odoo/odoo#86779

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 22:11:52 +01:00
Alexandre Kühn 493d4a28a3 [IMP] mail: guard ChannelInvitationFormComponent
Task-2797754

closes odoo/odoo#86777

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 22:11:48 +01:00
Samuel Degueldre d2f8eb2b6b [IMP] web: update underscorejs to v1.13.2
closes odoo/odoo#86875

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-03-22 21:20:55 +01:00
tsm-odoo 320323503c [FIX] mail: fix mock server mail channel write
Mock server's mail channel write method is incorrect. It assumes
the id of the channel will always be 20 while it could be anything.

closes odoo/odoo#86860

X-original-commit: 96e732f6bbc7622d50c3a969f5c2bb44c85c2b48
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-22 21:20:51 +01:00
tsm-odoo 6ee2a71d6f [FIX] mail: correct res fake model
The res.fake model has a partner_ids fields which
is a many2one but is used as a one2many.

closes odoo/odoo#86849

X-original-commit: 02b34c6b252c6a1d5a474c6de4e88f714a384286
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-22 20:31:53 +01:00
Louis Wicket (wil) bb1003893f [MOV] mail: move component hooks up
Task-2759571

closes odoo/odoo#86802

Related: odoo/enterprise#25434
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-22 19:39:44 +01:00
Yolann SabauxandIucapad 701293dbd8 [FIX] web: allow user to scroll horizontally
Steps to reproduce:
- create a contact with a very long name
- create a quotation
- in customer, type the first letter of the very long customer's name
- try to use the horizontal scroll bar

Issue:
close window on horizontal scroll

Solution:
Discriminate an horizontal scroll from a vertical scroll
A test has been added as well as the triggerScroll utility function
to allow proper tests when scrolling on elements

opw-2777443

closes odoo/odoo#86744

X-original-commit: e0b26496196bd4ee39fa06e1a3274982d2c7fb12
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Iucapad  <luvi@odoo.com>
2022-03-22 19:39:40 +01:00
Denis Ledoux 5b078f2a77 [ADD] portal: manage api keys in portal
Add the possibility for portal users to manage API keys
in the frontend portal interface.

- Allow for portal users to manage their API keys if the system parameter
  `portal.allow_api_keys` is set.
  A settting in `res.config.settings` is added in order
  to enable or disable the feature (to add/remove the system parameter)
  through a compute field,
  to avoid adding a new database column in standard
  (as this revision targets stable 15.0).
  The setting appear only in debug mode.

- Display the API keys in the portal in debug mode only
  (as in the back-end for regular users, in their profile)

- The flow in the frontend is a mimic of the flow from the backend,
  the wording and the look and feel is from the back-end.

closes odoo/odoo#86915

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-03-22 15:17:08 +01:00
Raphael Collet 67f343ba6a [FIX] base: record count on ir.model defined by query
Models can be defined by an SQL table, an SQL view or an SQL query (with
attribute _table_query).  Counting records makes little sense when the
model does not correspond to a table, and actually fails when it is
defined by an SQL query.

We fix the compute method by counting records only for models where
_auto=True.

closes odoo/odoo#86913

X-original-commit: 956a0a1cc22f3f35fc128e32cb267e2baa793fb9
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-22 15:17:04 +01:00
Pierre-Yves Dufays fc604d9334 [FIX] website_event_track: displays unpublished track warning for event manager
Correction that enables the display of the "unpublished" red label next to the
track name that are not published for the user of the group event manager only.

Task-2692907

closes odoo/odoo#86907

X-original-commit: 4d5f07dc5b393f15dc7c82e8af7da2cfeaf7720c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-22 15:16:59 +01:00
Victor Feyens 19ceece675 [FIX] sale_management: SO company change should not reset all lines
unless there is another template to apply by default

closes odoo/odoo#86899

Task-id: 2798588
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-03-22 15:16:55 +01:00
tsm-odoo 357eafea73 [FIX] website_slides: correct model definitions setup
website_slides was relying on a model that belongs to a module
it does not depend on. This makes the single module builds fail.
Moreover, it appears this model was not even used during tests.

closes odoo/odoo#86876

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-22 15:16:49 +01:00
Benoit Socias a042851853 [FIX] web_editor: fallback on URL search when shape not found from slug
Since [1] illustration shapes are only obtained from their slug. Before
they were obtained from their URL.

After this commit the old behavior is restored as a fallback in case the
illustration shape cannot be found from its slug.
This is needed to allow importing shapes into the system from data
files.

[1]: https://github.com/odoo/odoo/commit/bde8abcfeb57c74438943e44215a7c8cb822329f

task-2793073

closes odoo/odoo#86858

X-original-commit: 91f2a989ddd7961f92a377b1bf74cc741dcbd3d0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-03-22 13:36:56 +01:00
Nicolas Bayet 1428fe9542 [FIX] web_editor: set border and width of the table upon paste
task-2793106

closes odoo/odoo#86859

X-original-commit: e07a40f98999560aaa494bf2561811894e7775f7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-03-22 12:00:45 +01:00
oco-odoo ef9e2d9f8b [FIX] account: proper tax repartition for tax lines when using a writeoff reconciliation model with taxes
When creating the results of a writeoff button for the manual reconciliation widget, debit and credit are actually inverted with regards to what will actually get created (final inversion is then done here to bring them back to the right sign: https://github.com/odoo/enterprise/blob/15.0/account_accountant/models/reconciliation_widget.py#L986). Because of that, the conditions defining whether or not the compute_all should compute refund repartition need to be inverted as well.

Note that it wasn't the case for bank reconciliation widget, for which the sign was directly right.

Before that, compute_tax_tag_invert computed a different value for the tax_tag_invert field on base and tax line (as the tax line uses the repartition type of tax_repartition_line_id, and the base line depends on debit/credit and the tax type). Hence, the tax_tag_invert values between those two lines where inconsistent, and the tax report was wrong (since we did * -1 on one of them, but not the other).

OPW 2769586

closes odoo/odoo#86870

X-original-commit: fdf448ef226ecf27685675ea4a49a4501d4f9263
Signed-off-by: Laurent Smet <las@odoo.com>
2022-03-22 09:37:56 +01:00
Manuel Gómez - https://www.vauxoo.com/ 2f4ac2a035 [FIX] website_sale: the pricelist is reset when the address is edited
Expected behavior : The pricelist must be the one chosen by the customer on the website.

Current behavior : The price list is reset when the address is edited

Steps to reproduce the error :
First of all, you need to setup 2 pricelists on the website:
~ The first in dollars
~ The second in euros
~ Removes the group of countries from both

1. Create an order with the second price list (EURO)
2. Set your address
3. Edit your address
4. The pricelist will be changed to dollars

When you set the address for the first time, It redirects to /shop/confirm_order which
executes sale_get_order(update_pricelist=True) to correct the price list.

But when you edit the address sale_get_order(update_pricelist=True) is not  executed

closes odoo/odoo#83061

closes odoo/odoo#86764

X-original-commit: e5a76880320ce0606e6a0fc2a6ba776f79ce126e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-03-22 09:37:50 +01:00