Commit Graph
139600 Commits
Author SHA1 Message Date
Benoit Socias 317266d4e3 [IMP] payment, payment_test: missing payment token identifier
Before this commit payment tokens had no name for Test Payment Acquirer

After this commit tokens generated by Test Payment Acquirer have a name
that combines the last 4 digits of the card number and the card account
holder name

https://github.com/odoo/odoo/issues/50965

closes odoo/odoo#61848

X-original-commit: e20f0650acbd1a7a918375a70ec5c89606523a7b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-17 12:08:11 +00:00
Hiral Bhavsar 90546e4aaa [FIX] web: handle mail delivery exception
Before this commit:

When trying to send the notification for the user form, it shows a traceback.
This is happening after https://github.com/odoo/odoo/commit/ab4000fb3cf8fa54ba714ceceec391b78d73755e

After this commit:

Send the notification without any traceback as handle
the MailDeliveryException inside CrashManager

Task-2333121

closes odoo/odoo#61832

X-original-commit: 3aadcf1ad42e704c369910628a1549d1e777c959
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-17 10:40:46 +00:00
Jairo Llopis 012eec250a [FIX] website_slides: embed YouTube videos without cookies
Due to recent legal changes in EU, you cannot install tracking cookies in a user's browser without explicit consent.

Before this patch, Odoo embedded youtube videos were violating that law (AFAIK & IANAL).

With this simple patch, you benefit from YouTube's offering to embed videos without cookies. The UI remains the same, but no tracking is done.

@Tecnativa TT26153

closes odoo/odoo#61828

X-original-commit: a1a1169f28233b69cd70d01621d605b36517ac73
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-17 09:55:43 +00:00
Nicolas Galler f0232808c2 [FIX] sale, sales_team: fallback to partner's team
Behavior prior to the commit:

- when setting the customer (partner) on a sales order, the sales team
is set based on the partner's sales person.  If there is no sales person
on the partner then the team defaults to the first team in sequence for
the company.
- the team set on the partner is not used (by default, this field is not
visible, but it can be set from server action or added via studio).  In
Odoo 12.0 the team set on the partner was used as a fallback, but this
was removed in commit 242be00429

Behavior after the commit:

- the partner's team is used as fallback when the partner is updated
- when the salesperson is updated on the quote, we also use the current
team as fallback (since presumably this was set either from the partner,
or using the existing default rule, there is no reason to change it)
- in debug mode, the field `team_id` is shown on the partner view (under
the `Sales & Purchases` tab)

Note:
- Change in existing installation is expected to be minimal since it only
affects the customers who are making use of the partner.team_id field, not
populated or displayed by default, but there is a risk for a customer who:
   1. has that field populated on existing partners (maybe upgraded from
   an old install where it was displayed?)
   2. is relying on the new (as of v13.0) behavior of assigning the default
   sales team based on the sequence

opw-2351868

closes odoo/odoo#61827

X-original-commit: 7683e1907f6eb1fde4626927957df4eede49b8ca
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2020-11-17 09:49:35 +00:00
Jérémy Hennecart ffa891f713 [FIX] website_crm_partner_assign: fix condition to assign salesman
The first stage has not always its sequence equal to 1. So if the
probability was for example equal to 0, then the salesman will not
be set to the new lead.
Since when we create a lead, the default stage is the first one in
the sequence. We only need to check if the lead is not already won
when we create a lead and try to assign the salesman to it.

task-2329327

closes odoo/odoo#61816

X-original-commit: c5059aa151430eebd62e9f000fe43e87bdd89ff3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-17 08:55:18 +00:00
Goffin Simon 440e892ed7 [FIX] base_automation: traceback on updates
Steps to reproduce the bug:

1.Create an automated action with the following:
   - Model: Task (project.task)
   - Active: True
   - Trigger: On Update
   - Action To Do: Create Next Activity

2. Open or create a task in Project module
3. Edit
4. Change or set customer (partner_id)

Bug:

An error message was raised.

opw:2376492

closes odoo/odoo#61812

X-original-commit: b3415d9dd0bcc1053e47b8a0082c772ca4a8220f
Related: odoo/enterprise#14772
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-11-17 07:50:13 +00:00
root 76a969e1fd [FIX] l10n_ch: map tax report to right country
Before this commit the tax report links to Brazil while the chart of account is Switzerland.

By changing the ref it now installs the tax report with the right country set.

closes odoo/odoo#61806

X-original-commit: 93e44b6d85564b6fde99053ccb16399e224477e3
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-11-16 17:51:35 +00:00
Didier (did) edc8f85c3a [FIX] mail: always hide the dropzone when something is dropped
Before this commit, when an invalid element was dropped (e.g. dragging a
mention) the drop area freeze and make the UI unusable.

task-2373971

closes odoo/odoo#61792

X-original-commit: 629b54dc1249c77d1e30240c0b5a91e22a1ae110
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-16 15:13:45 +00:00
Martin Trigaux e433bc57ff [FIX] *: rephrase, correct typos
Courtesy of Transifex's translators for reporting bad/unclear sentences.

closes odoo/odoo#61804

X-original-commit: f5d0f4a1ebf406583889e9e04912d40c0693343e
Related: odoo/enterprise#14769
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-16 16:47:28 +00:00
qsm-odoo b453663500 [FIX] website_form: allow to add form snippet inside columns
closes odoo/odoo#61799

X-original-commit: bcb22aca37aa6f7301bc92fa3ae52f53d1044d97
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-16 16:02:06 +00:00
Antoine Prieels e5ffccdb28 [IMP] hw_drivers: Add action data in IoT events
Add all the request data in events triggered by IoT actions.

closes odoo/odoo#61798

Taskid: 2320958
X-original-commit: a8c56602ba8301b6e901be7ffeaa219d77401f79
Related: odoo/enterprise#14763
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-11-16 16:01:22 +00:00
Antoine Prieels f3b5bf6b3f [FIX] hw_drivers: Lost IoT events
Events coming from the IoT Box were lost in two cases:

1. Create a listener for device 1
2. Send an action to device 1
--> If the action arrives before the listener the event is never sent
to the DB

1. Setup up two listeners for devices 1 & 2
2. After a few seconds, send two consecutive actions to devices 1 & 2
--> Everytime a longpolling request arrives, a new threading.Event
object is created. The first action sets the event, then, before the
new longpolling request arrives, the second action sets the same event,
which is overwritten once the new longpolling request arrives.

We now maintain a list of events, and when a longpolling request
arrives on the IoT Box, we make sure that all events that occured in
the last 5 seconds were received by the DB. If no events were pending,
we wait 50 seconds to check if a new one pops up.

Taskid: 2320958
X-original-commit: e3260712ce96a8d81bf807574c334d92c37c6ae4
2020-11-16 16:01:21 +00:00
Sébastien Theys 91bbdf41f4 [FIX] mail: fix race conditions, especially with scroll
The `_update` of some components must take place before the `_update`
of other (usually sibling) components that might directly influence their
layout. This is in particular the case for `_update` that are relying on height.

Prevent force save of scroll position if there are pending hints to adjust it,
and prevent pending hints from overriding new scroll value.

Prevent flicker with message date.

This should fix all known issues related to incorrectly saving or restoring
scroll position.

task-2344226
task-2358066
task-2369332
task-2372339
task-2373741

closes odoo/odoo#61791

X-original-commit: 2002c6a599a685f4a18fc670a9f7992c8d595c0f
Related: odoo/enterprise#14759
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-16 15:40:10 +00:00
Emilien Durieu (edu) c65e284dcc [FIX] web_editor: image overlay did not update with changes
The blue overlay on the snippet currently being edited did not update when the size or place of the element changed.
The overlay is now edited on each Jabberwock commit.

closes odoo/odoo#61716

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-13 12:16:22 +00:00
Aurélien Warnon a3aa45414b [FIX] website_slides: fix archive/unarchive slide.channel behavior
PURPOSE

This commit fixes the behavior of archiving and un-archiving slide.channels.

SPECS

When archiving a slide.channel, you could run into an issue where the
associated slide.channel.partners would be marked as "completed" even though
the related slides were NOT completed by the user.

This happened because when computing the completion, it's searching for
slide.slide.partners marked as completed, and then comparing it with the count
of slide.slides in the channel, which would always return 0 since all slides
are archived when the channel is archived.

Marking channels as completed when they should not triggers undesired
side-effects (karma increase, completion email sent, ...).

Now, when the slide.channel is not active, we don't mark associated
slide.channel.partners as completed anymore.
The ordering in which we archive channel and slides was also altered, see
method docstring of 'slide.channel#toggle_active' for more info.

A new test ensures the correct behavior of archiving.

LINKS

Task 2170708

closes odoo/odoo#61773

X-original-commit: f7795f85ed66fcebaf8a96bf4e550b069fcf1e83
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2020-11-16 13:40:47 +00:00
Andrea Grazioso (agr-odoo) 060175cc07 [FIX] mrp: fix backorder quantity uom
Activate units of measure and workcenters (work operations)
Create Product C, uom Kg
Create Product F, uom Kg
Create BoM for F, 2000g manufactured from 5000g of C
Set 1 operation/work order in the BoM: processing
Create MO to produce 2kg (change the uom in the MO) of Product F
from 5000g Product C
Confirm MO and go to the work order put the quantity of Product F to 1 Kg
then click Record Production/Mark as Done

The manufacturing backorder is automatically created but is not
showing the components.

This occur because of a mismatch between the uoms, `move._split` expect the
parameter `qty` to be based on the product uom, instead it is the quant uom
because the BoM was created using a different UoM than the one defined
in products

opw-2376217

closes odoo/odoo#61782

X-original-commit: 8b32e558fde3cb3aaa1deb40acb07488d04d343e
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-11-16 13:10:31 +00:00
Jorge Pinna Puissant 6e594f9537 [FIX] account,point_of_sale: increment customer supplier rank to commercial partner
Before this commit, if a customer/supplier has an invoice address, when
creating an invoice/bill it's the invoice address that will be
identified as the customer/supplier and that will have its rank
increased and not the commercial partner.

Now, the rank increment is done to the commercial partner as well.

opw-2377870

closes odoo/odoo#61778

X-original-commit: dbf042611ccb134a220704d6b775aab650364ca2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-16 12:25:34 +00:00
Aurélien Warnon 46cc27cc6e [FIX] web: improve the hit box of the kanban quick_create
When the user clicks outside of the kanban quick create element, it's closing
itself automatically.

However, the "hit box" of this behavior is not entirely accurate and clicking
on the very edge of the box would also close the element.

This commit fixes the click behavior and allows clicking anywhere inside the
quick create element.

Task 2373095

closes odoo/odoo#61763

X-original-commit: 72ed82489daa2b82628dfdefeb06262e17e6548e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2020-11-16 09:58:10 +00:00
nie c767ed9380 [FIX] base: print modal stays open after PDF download
Steps to reproduce the bug:
- Install invoicing
- Create an invoice and confirm it
- Click Send & Print above the invoice
- Click Send & Print again in the modal

Bug:
The modal stays open after having downloaded the PDF

Explanation:
`close_on_report_download` was cleaned out here: https://github.com/odoo/odoo/blob/2fd4e48cbb673175323fb866d87e654c5c9e05ac/addons/web/controllers/main.py#L332-L337 and wasn't forwarded to the frontend.

opw:2375920

closes odoo/odoo#61757

X-original-commit: f5abe6626fcd14f18cd84af7adf48f327ee9ed6d
Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-11-16 09:15:20 +00:00
Jeremy Kersten 1669bf81eb [FIX] google_recaptcha: remove autoinstall on google_recaptcha
You can enable it in base_setup when you need it.

Depends of base_setup and not ir_http or website because you need to
be able to enable it for login form e.g.

closes odoo/odoo#61520

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-09 09:27:23 +00:00
Aurélien Warnon 4ebe8ccf00 [FIX] website_slides: fix slide.channel mail completed
PURPOSE

Fix the 'multi' behavior when sending completion emails for slide.channels.

SPECS

There was a typo in the 'slide.channel#_send_completed_mail' method that
prevented it from correctly working in "multi" mode.

A new test was introduced to ensure the fix is working.

LINKS

Task 2170708

closes odoo/odoo#61004

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-30 10:30:18 +00:00
Priyanka Kakadiya 94a6d8d7c9 [IMP] survey: improve UX of survey session code page
This commit improves the UX of the page responsible for joining live
quiz session. Few of the improvements are

  - Increase size of the input tag related to code
  - Display proper error message based on type of error
  - Move the error message below the code input
  - Improve few strings

Along with that, this commit also interchanges the position of
'Add a question' and 'Add a section' options question tabs
of the survey form view.

Task ID-2345907
closes #59060

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-16 10:10:43 +00:00
Benjamin Vray b42ad68c2c [IMP] web: redesign toast
Remove the icon of the toast elements. Remove the header and move the
title in the body, as simple text. Move buttons at the bottom instead
of at the right side.

Note: this will be refactored with OWL anyway but this is a first step
towards more consistent tips across backend and frontend.

task-2311554

closes odoo/odoo#61756

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-16 09:05:34 +00:00
Odoo's Mergebot 3a5f7140fa [IMP] web: change status bar dropdown stage color when disabled
Before this commit we didn't notice when the dropdown buttons were
disabled or not.
Now, we do the same as on desktop:
The text color is gray when you aren't able to change the stage.

Task ID: 2348528

closes odoo/odoo#61679

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-11-16 11:03:08 +01:00
Adrien Dieudonne 55a458ae9b [IMP] web: change status bar dropdown stage color when disabled
Before this commit we didn't notice when the dropdown buttons were
disabled or not.
Now, we do the same as on desktop:
the text color is gray when you aren't able to change the stage.

Note that the previous css selector didn't worked because
we are in a dropdown on mobile.

Task ID: 2348528
2020-11-16 09:01:53 +00:00
Adrien Dieudonne 09e1028944 [FIX] web: statusbar: border color for disabled buttons
Before this commit, the intent was to change the border color
of the first button that appears when the status bar is disabled.

The problem was that this added a border for all buttons and
not only the (visually) first one.
2020-11-16 09:01:53 +00:00
Laurent Smet 6d03583a82 [FIX] account,l10n_: Restore journal liquidity account hook
The overrides in l10n_ modules are broken since 14.0 because the hook no longer exists.

closes odoo/odoo#61610

X-original-commit: 1fe852e032876f2f3212a43fc3115e49f4de618d
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-10 16:55:31 +00:00
Goffin Simon 6051e9f71e [FIX] payment_paypal: Test paypal_compute_fees
Add a test for the computation of the Paypal fees

opw:2369557

closes odoo/odoo#61750

X-original-commit: 8bedef042bd7be5830de92ae9a6976c9e17fb792
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-15 23:08:46 +00:00
Goffin SimonandAdrienHorgnies eb8beffbe9 [FIX] payment_paypal: Paypal Acquirer fees
The variable fee (Var) and fixed fee (Fix) indicated by paypal must be subtracted from the transaction amount (Am).

So let's consider that Am = 100€, Var = 2.9% and Fix = 0.3€

Total fee = 100€ * (2.9/100) + 0.3€ = 3.20€

So in this case, the merchant will get 96.80€ and Paypal will get 3.20€

This computation can be verified with the simulator here:  https://salecalc.com/paypal?p=100&l=us&r=0&e=0&f=0&m=2&c=0.

So the idea here is to compute Am such that the merchant will get 100€ if he set his price to 100€

fees = amount_fees_included * percentage / 100 + fixed
fees = (amount + fees) * percentage / 100 + fixed
fees = (amount * percentage / 100 + fixed) / (1 - percentage / 100)

if the merchant needs to keep 100€, Am will be equal to 103.30€.
That way, paypal takes 103.30 * 2.9% + 0.30 = 3.30 and the merchant takes 103.30 - 3.30 = 100

opw:2369557

X-original-commit: 6850e638dfa652ab3fe8065ea09e23cb07648d7a
Co-authored-by: AdrienHorgnies <aho@odoo.com>
2020-11-15 23:08:46 +00:00
qsm-odoo f8df10dd01 [IMP] web_tour: review tour tips design
We noticed users may have difficulties noticing where the tip is in the
page, even when searching explicitly for it. This commit reviews the
design and improves the scss: the tip shape is now made of an unique
transformed element with a white border all around. The box shadow was
also made more visible. The visibility over white elements stays the
same as before but it is now way more visible over dark content (like
the website editor panel).

task-2357170

closes odoo/odoo#61731

X-original-commit: dbf966f6f012ccf5aa9b501586e2aa0fde05be5d
Related: odoo/enterprise#14735
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-13 16:55:39 +00:00
jev-odoo 6f1405b59d [FIX] point_of_sale: Select only allowed payment method
Before this fix, in the pos.payment form, you were able
to select any pos.payment.method. Saving with a
pos.payment.method that is not allowed in the
pos.config of the session caused a traceback.

opw-2372025

closes odoo/odoo#61728

X-original-commit: ff648a0ace9cf72274211662707e7ee33fc73252
Related: odoo/enterprise#14731
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-13 15:59:47 +00:00
qsm-odoo 3c53748d7a [FIX] web_editor, *: ease understanding of snippet drag, not click
*: web, website

Make the empty oe_structure messages "wizz" when the user clicks on a
snippet to drag instead of dragging it.

Note: also rename the "_onSnippetMouseDown" handler to not confuse it
with this new "_onSnippetClick" and add the missing documentation
comment for it.

Part of https://github.com/odoo/odoo/pull/60837
Related to task-2363616

closes odoo/odoo#61724

X-original-commit: bdfddace29b16404c06a7ebfc0cc242463a0e768
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-13 15:36:43 +00:00
qsm-odoo dc1ebbafde [FIX] web_editor: encourage to use snippets in empty oe_structure (wizz)
Make the draggable snippets "wizz" when the user clicks on an empty
oe_structure.

Part of https://github.com/odoo/odoo/pull/60837
Related to task-2363616

X-original-commit: 3ed3537abd416ebc35f8bc2ee65f209840c071bf
2020-11-13 15:30:42 +00:00
IELandRomain Derie 64f1017491 [FIX] payment: prevent changing checkout options
STEPS:

* install website_sale
* setup few delivery options
* setup online payment (e.g. paypal)
* at website add products to cart and proceed to checkout page
* slow down internet speed
* click "Pay now"

BEFORE: while it's loading, you can change delivery option. So, you have SO
changed, while in payment page you see old total amount

AFTER: it's not possible to change delivery options through UI

Note that it is not possible to pay less that what you should at anyway.

opw-2324543

closes odoo/odoo#61723

X-original-commit: eb3ed89f8440050fc32f9a7b29fb2b6ab8fd6b59
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Co-authored-by: Romain Derie <rde@odoo.com>
2020-11-13 14:38:18 +00:00
yhu-odoo 0b4f9124f1 [IMP] stock: impove replenishment empty screen
1. change the empty image
2. move the image upforward to the middle of the screen

closes odoo/odoo#61701

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-11-13 08:36:05 +00:00
Nicolas Lempereur 35809389a6 [FIX] crm: show newly created meetings in calendar
When clicking on the stat button "Meetings" on a contact:

- before dac91bc18 (November 2019): only meetings with participant
  matching contact name are shown

- after dac91bc18 (November 2019): all meetings are shown => this was
  because the view was used to create new meeting, so it makes sense to
  see other meetings and not have a conflict.

- after 16206d72 (August 2020): only meeting of the contact are shown

- after 7449c8a6 and d11fb611 (November 2020): more complicated logic
  that will also show partner events, and child partner events.

Since August 2020, when you create a new event, since we are showing a
list of IDs at the time the button was clicked, the new event will not
appear unless you go back to the contact, then click on "Meetings" anew.

With this changeset, we still show a list of IDs, but add an alternative
to also show the events of the current partner (that should be in the
list of IDs, but will match new events).

opw-2374021
closes #61490

closes odoo/odoo#61690

X-original-commit: eb6e03908bfb6ed8bbe231da2a4422ec2e149834
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-11-12 17:41:06 +00:00
alt-odoo d7221236d2 [FIX] stock: allow all transfers of packages with specified owner
When validating a picking of an entire package (e.g. internal transfer)
that has an associated owner, we are looking for a quant matching
stricly all criteria, including the owner. However, the owner is not
filled in on the move lines and is only inherited from the picking item.

As we do not find the existing quant, we are creating a new one, and
we logically have the error message "You cannot move the same package
content more than once in the same transfer or split the same package
into two location."

To allow all transfers of packages, we should add the owner of the quant
when creating the move lines when setting the package level as done.

closes odoo/odoo#61697

X-original-commit: 2ac8dec4967c50ddaf4b4d0260d32f6f1afe979e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-11-13 07:59:09 +00:00
Nicolas Martinelli 3c96abe38b [FIX] website_sale_delivery: free delivery with free product
- Install eCommerce
- Website > Products
- Create a product with a Sales Price of 0 and publish it
- Website > Configuration
- Enable "Shipping Costs"
- Go to Configuration / eCommerce / Shipping Methods
- Create a new method with a fixed price of zero
- Go to the ecommerce
- Add the free product of in the cart
- Process Checkout

A traceback appears.

It happens because the 'Pay' button:

https://github.com/odoo/odoo/blob/b64a7924044f012da49db178b6c02fdf9b47bc5c/addons/payment/views/payment_templates.xml#L149-L158

is replaced by:

https://github.com/odoo/odoo/blob/b64a7924044f012da49db178b6c02fdf9b47bc5c/addons/website_sale/views/templates.xml#L1401-L1409

Since `$payButton.data('disabled_reasons')` is `undefined`, a crash
occurs.

We make the code more robust by using the same logic than:

https://github.com/odoo/odoo/blob/b64a7924044f012da49db178b6c02fdf9b47bc5c/addons/website_sale/static/src/js/website_sale_payment.js#L30-L32

opw-2380774

closes odoo/odoo#61693

X-original-commit: 3ba37c70c84b8651a544fbaf45dbfb5bc85bdbed
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-12 18:03:20 +00:00
qsm-odoo eaf0d9f8ed [FIX] website: prevent traceback on countdown bg color reset
When the layout background color was reset using the colorpicker of the
countdown option, a traceback occurred. This was because the countdown
widget relies on having a set color. The text and progress bar colors
were working with unset colors but with inconsistent behavior. This
commit fixes the traceback and makes the widget consistent: using the
reset button on any color tells the countdown widget "use the color
you want" and our countdown widget will simply set it to black.

Thanks to @dwa-odoo and @jpr-odoo for original investigation.

task-2227149

closes odoo/odoo#61682

X-original-commit: abbf88770442bded27b5e490ce3d3e1a7025dc04
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-12 17:39:45 +00:00
Nicolas Martinelli f2da5e0ef1 [FIX] l10n_bo: failing installation
- Create a DB without demo data
- Install `account`
- Install l10n_bo

The tax report loading fails.

This is caused by the missing country.

opw-2378095
opw-2379117

closes odoo/odoo#61678

X-original-commit: f954687d3a78be5e6fb5b9270805ecfb1081d38d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-12 14:46:27 +00:00
Romain Derie 262db6079c [FIX] website_rating: display correct title and tooltip on star
Title and tooltip had no sense since every star would have its own tooltip
"One star" instead of having a single tooltip on the whole star container which
could show the exact rating "5 stars on 5".

Plus, one of the title were set on a t-foreach which does nothing.

Closes #51743
task-2369420

closes odoo/odoo#61673

X-original-commit: 6ef7d6fd8474cbf9685bf8e8c3520233c1403cfd
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-11-12 13:18:30 +00:00
IEL dcf3519a64 [FIX] *: Change some terms to unambiguous ones
WHY: odoo translation framework still cannot properly handle terms that have
different translations, so we need to avoid english terms with double meaning.
Also, this improves term understanding for translators.

---

closes odoo/odoo#61668

Discussion: #60765 #61272
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-12 12:44:07 +00:00
Jorge Pinna Puissant 7fac9ee599 [FIX] stock: default state
In the case of none of the conditions is fulfilled, the stock page level
will have not a state. This will raise an error when it's open.

opw-2375250

closes odoo/odoo#61664

X-original-commit: e5b8015d66e1d3d81148a5663a9c934d4baf6c78
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-11-12 11:54:33 +00:00
Hardik Prajapati 584c9fe5cc [FIX] registry: transitive dependencies of custom fields may not exist
Currently in 13.0 when creating a new model through studio and convert
the x_name field to a computed fields with a dependency set on a
custom field from a native model, user get a Key_error when upgrading
or installing a new module

due to the custom field with an invalid depends raise error through a
transitive dependency.

The loading of the registry completely fails,
because the loading of the field custom_field raises a `KeyError` exception
in `def transitive_dependencies` @ `dependencies[field]`
it happens here because the custom_field was skipped at
`dependencies[field] = set(field.resolve_depends(model))`

task - 2366502

closes odoo/odoo#61663

X-original-commit: 92f6908bae4a6678f76a3ce9e29ac3907803ceb2
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-11-12 11:54:11 +00:00
Luce Pasquini abd8707f63 [IMP] base: add vat_label for French Polynesia
closes odoo/odoo#61656

X-original-commit: cd19e836f82576f7754d99ca537efbab41a43870
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-12 11:16:10 +00:00
Thibault Delavallée c819223e88 [REV][FIX] mail: Send mail with correct access link
This reverts commit fbd30f4266d86b53aa4b13b72a93bccee0d7eb69. Indeed kwargs
are used to build a link, meaning message value are given to some links when
using message_notify.

A better fix will be provided soon. Reverting to avoid issues in stable.

closes odoo/odoo#61632

X-original-commit: e861f7294a7bd6bde056b987f15e48df4b0ab877
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-12 09:18:44 +00:00
Antoine Prieels 72ae524301 [FIX] point_of_sale: Error on successful print
An error showed when sucessfully printing receipts with the IoT Box in
Community.

Closes odoo/odoo#59059

closes odoo/odoo#61647

X-original-commit: 3e026392cf90373103f1278d8ba1930b4afb60af
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-11-12 10:48:24 +00:00
Nicolas Martinelli 5701ac779c [FIX] account_payment: incorrect badge
- Allow online payments for invoices
- Create an invoice and assign it to Joel Willis. Post the invoice.
- Connect as Joel Willis and pay the invoice

In the `/my/invoices` view, the invoice is set as 'Paid' and 'Reversed'.

It should not be labeled as reversed.

The issue is probably a wrong copy-paste of the line above:

https://github.com/odoo/odoo/blob/478ebc74554f6609a1414726ee1f35fe5dcd6a81/addons/account_payment/views/account_portal_templates.xml#L28

Indeed, the `last_tx.state` has no impact on the fact that the payment
is reversed.

opw-2373146

closes odoo/odoo#61627

X-original-commit: 2fd4e48cbb673175323fb866d87e654c5c9e05ac
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-12 08:16:11 +00:00
Samuel Degueldre c5a2652c9b [FIX] web_editor: fix gap between transformed shape and next section
Previously, when flipping some shapes vertically on chrome, and
vertically or horizontally on firefox, there was a gap of 1px or less at
some screen widths. This is caused by the way these browsers render
backgrounds on transformed elements. It seems like firefox will round
the size of the element to render the background image on it if the
element is transformed, while chrome will always render the background
at the correct size (or render it at a larger size and clip it to the
correct size after the fact), but will round the coordinates of the
symmetry point, causing only the vertical flip to have this issue, and
only if the background image would not extend beyond the bounds of the
element (on firefox, even shapes that would extend beyond the bounds of
the element would showcase a gap, eg origins 1)

This commit fixes that by applying the transform to the SVG rather than
to the element, by use of the shapes controller.

task-2369560

closes odoo/odoo#61609

X-original-commit: 42b3ad10e0b32b7fc72f801e2c67d6baf938c566
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-10 18:27:45 +00:00
Martin TrigauxandXavier Morel 49838338e0 [FIX] *: sanitize action content reading
The open_action_with_context was not using _for_xml_id, producing an
error when reading the action content.

In open_action, the action_name was taken from the context and needs
sanity checks. Ensure only actions from the account module can be
read and only if the user has access to the target model.
This is a limitation of the previous behaviour but, at the moment, all
known calls are made refering to an action from the account module.
Limit the scope of this method while the 14.0 is still early to avoid
having a door open to ready any action, and difficult to close later.

Remove old action fetching from the context in create_move that is no
longer used.

closes odoo/odoo#61602

X-original-commit: a39e94f7e4dc74e850650ac90bbc5f85af130bc8
Related: odoo/enterprise#14695
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Xavier Morel <xmo@odoo.com>
2020-11-10 16:04:29 +00:00