Commit Graph
136053 Commits
Author SHA1 Message Date
Martin Trigaux 6394c628fa [IMP] mail: make the template easier to translate
Don't try to save bytes, make longer sentences, easier to translate
instead of splitting it into small blocks of one word.

https://www.odoo.com/documentation/13.0/reference/translations.html#blocks

Courtesy of Erwin van der Ploeg for raising the issue

X-original-commit: 737ee6393cd99b0c41272f6cfa9a0acb68276744
2020-05-26 07:34:16 +00:00
Nicolas Martinelli 95bc27b1cb [FIX] point_of_sale: access to rounding
- Create a user with only Point of Sale / User rights
- Open a POS session

An AccessError is raised on `account.cash.rounding`.

We add he access right: the user should be able to read the cash
rounding configuration.

opw-2258719

closes odoo/odoo#51816

X-original-commit: 61915c33e4e0e7979d10dee01fa80a6511498f33
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-25 13:31:03 +00:00
Anh Thao Pham (pta) 12d77d271c [FIX] payment_stripe: fix "lower()" applied to bool with stripe payment
- Go to Website > Configuration > eCommerce > Payment Acquirers
- Activate Stripe
- Configure Stripe
- Go to Sales
- Create a quotation
- Send quotation by email
- Click on "Customer Preview" smart button
- On Website, click on "Sign & Pay" or "Pay Now" if already signed
- Sign it and confirm on "Accept & Sign"
- On payment wizard, select "Credit Card (powered by Stripe)"
- Validate with "Pay & Confirm" button
An error message appears.

opw-2262990

closes odoo/odoo#51815

X-original-commit: 3c5117eaac96604a3306c90480d106e0e36fed2f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-25 13:24:11 +00:00
Christophe Simonis 97d439ae9c [FIX] purchase: use fully qualified column named to avoid ambiguities
closes odoo/odoo#51819

X-original-commit: c79dc7b24c5892c714ccb78cec808edbe0574ce6
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-05-25 13:55:21 +00:00
Yannick Tivisse 12b526432f [IMP] hr: Display chat icons on employee kanban/form views
Purpose
=======

On the Employees App, we dont have a smart way to start a discuss
with a colleague or an employee.

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

Style for each button :
- use fa-comments
- use primary color/action color (green)

On private/public employees form/kanban views, add a button to
start a chat with the user

closes odoo/odoo#51484

Taskid: 2252207
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-25 14:50:19 +00:00
Xavier Morel 7a7b5b5d9d [FIX] core: searching through o2m with auto_join
Replaces the auto_join scheme which is pretty fast but doesn't quite
work (it's *completely* broken for read_group) by a subquery which is
slower but has the same semantics as the ORM version.

Ideally we'd use `EXISTS (select 1 from ...)` but that has no support
inside the SQL compiler right now, so use `id in (select inverse_field
from ...)`.

Here are some measures of a `read_group` on a simple object with lines
filtered on line values, similar to

    read_group([('order_line.product_uom', '=', xxx)],
               fields=['total_amount'], groupby=['user_id'])

    +-------+-------+-------+--------+
    |       |   ORM |  join |subquery|
    +-------+-------+-------+--------+
    | large |   160 |    10 |     20 |
    +-------+-------+-------+--------+
    |  many | 36000 |    50 |    180 |
    +-------+-------+-------+--------+

* values of data fields (filtering, grouping and aggregating) randomly
picked between 10 different values
* "large" is 1000 objects with 1000~15000 lines each
* "many" is 1000000 objects with 1~40 lines each

closes odoo/odoo#48494

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-20 12:51:43 +00:00
Raphael Collet e950c395b7 [IMP] test_read_group: read_group with one2many auto-joined fields 2020-05-20 12:44:38 +00:00
Romeo Fragomeli 2adaeb589b [FIX] web: deadlines are not visible in day/week calendar views
Due to commit odoo/odoo@0150141756
when the widget calendar is initialized with date type record for
date_start and without all_day mapping events aren't shown on day/week
views. This is because all day zone isn't visible when all_day mapping
is not set.

After this commit, we show the all day zone also when the date_start is
a date type.

Steps to reproduce:
* Go to Project App
* Select/Create a project
* Select/Add a task with a deadline
* Return to project
* Select calendar view
* Select week view (of the deadline) => BUG

closes odoo/odoo#51818

X-original-commit: 1d83f4184e1b82db4dd4db54d98e509432340996
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
2020-05-25 13:54:55 +00:00
Goffin Simon e03a87ae08 [FIX] repair: Unable to end repair
Steps to reproduce the bug:

- Create a repair order RO for a product P1
- Create a part for a product P2 that needs a lot L
- Specify a source location for P2
- Process RO
- Click on 'END REPAIR'

Bug:

A UserError was raised saying: You need to supply a Lot/Serial number for product P2
even if a lot L was set to P2

opw:2251047

closes odoo/odoo#51797

X-original-commit: 1e3ed56332efd3f58ccd05f23c6af9cb23f1052f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-05-25 11:12:17 +00:00
Yannick Tivisse 45f3659305 [IMP] project,...: Improve list views with new widgets
Purpose
=======

Task 2195254 introduced many wonderful widgets to pimp the list view.
This task aims at implemeting them into the Services apps: project,
timesheets, helpdesk, expense, planning and field service.

Remaining days: https://drive.google.com/file/d/1o4Wn47445GxLqBkw-ifH9MgtFU_437xz/view
Avatar: https://drive.google.com/file/d/1yDwJWP0MZCUKZbqCa8hte1ziVTYRMMtb/view
Activities: https://drive.google.com/file/d/1e_rXH50eZq4zY2HOzw7_pfgiD39SoRIl/view
Field-specific decorations: https://drive.google.com/file/d/1WFnqJ-jkyDFftRHxWW4bgomoWrOpOuaY/view
More control on buttons

Specifications
==============

You will find below a list of which widgets to apply to which fields by
model. Some changes have to be done in the form/kanban views as well.

1) project.task

remaining days -> date_deadline -> list + kanban + form views
hide this field if is_closed is true
avatar -> user_id -> list view
activities -> 'next activity' field to be added -> list view
field-specific decorations
https://nimb.ws/ACewrY remove the current orange/red decorations we have
if planned_hours > 0, display the remaining_hours field in (list view):
red if progress is > 100%
orange if progress is between 80% and 100%
green if progress is <80%
display unit_amount in red if > 24:00 -> form view

2) rating.rating

display the rating in:
green = satisfied
orange = not_satisfied
red = highly_dissatisfied
list + form views

3) project.project

avatar -> user_id -> list + form views

4) account.analytic.line

avatar -> employee_id -> list view
display unit_amount in red if > 24:00 -> list + kanban + form view
https://nimb.ws/eIWa7E merge the timer and duration fields together

5) helpdesk.ticket

avatar
user_id -> list view
employee_id under timesheet_ids -> form view
remaining hours -> sla_deadline
activities -> 'next activity' field to be added -> list view
field specific decoration -> display unit_amount in red if > 24:00 -> form view

6) hr.expense

avatar -> employee_id -> list view
activities -> 'next activity' field to be added -> list view
badge -> state -> list view
draft = blue
reported = green
approved = green
done = green
refused = red
combine the unit_amount and the currency_id fields (see the total_amount field for reference) -> list view (idem for the expense_line_ids one2many on hr.expense.sheet)
display the total_amount in bold
move 'company_id' before 'amount'

7) hr.expense.sheet

avatar
employee_id -> list view
user_id -> list view
activities -> 'next activity' field to be added -> list view
badge -> state -> list view
draft = blue
submit = green
approve = green
post = green
done = green
cancel = red
display the total_amount in bold
move 'company_id' before 'amount'

8) planning.slot

avatar -> employee_id -> list view
decoration
display the allocated_percentage field in red if > 100% -> list + form view
display the forecast_hours field in red if > planned hours and if planned_hours > 0 -> form view
display the effective_hours field in red if > forecast_hours and if forecast_hours > 0 -> form view

9) misc

calendar.event -> avatar -> user_id -> form view
mail.activity.type -> combine the delay_count and delay_unit fields together -> list view
note.note -> 'next activity' field to be added -> list view
crm.lead.mining.request
combine the lead_number and lead_type fields together -> list view
display the name in bold
badge -> state
draft = blue
done = green
error = red
planning.slot.template -> display the duration field in red if it is = 0

closes odoo/odoo#51271

Taskid: 2248351
Related: odoo/enterprise#10605
Related: odoo/upgrade#1252
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-25 12:44:14 +00:00
Yannick Tivisse f27baf0c94 [FIX] crm: Fix singleton error 2020-05-25 12:44:14 +00:00
svs-odoo 46b70e8ef3 [IMP] purchase: hide date_planned if empty
Also, makes `date_planned` readonly when PO in "Purchase Order" state.

task-2181611

closes odoo/odoo#49835

Related: odoo/enterprise#10073
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-25 11:08:04 +00:00
svs-odoo 3e984aac75 [IMP] stock: log message instead of activity
When rescheduling a stock document, logs a note about the new scheduled
date instead of create a new planned activity.

task-2181611
2020-05-25 11:08:04 +00:00
svs-odoo 6b15eab7e1 [IMP] stock: don't auto. assign backorder
Before this commit, when a backorder is created, it was automatically
reserved. It is no more the case. Now user have to reserve it manually.

The reason is, when a user doesn't delivery all expected quantities, it
could be because there is no enough quantity in stock, or the user
doesn't want to delivery all. In these cases, it doesn't make sense to
reserved it directly.

task-2181611
2020-05-25 11:08:04 +00:00
svs-odoo 6501713d9a [IMP] maintenance,mrp,repair,sale: text changes
task-2181611
2020-05-25 11:08:04 +00:00
svs-odoo 4b588cf9f2 [IMP] stock: domain on orderpoint product_id
When user creates a new order point, if he/she comes from a template or
variant product page, adds the product id or the product template id in
the `product_id` field domain in the `stock.warehouse.orderpoint` model.

task-2181611
2020-05-25 11:08:04 +00:00
Thanh Dodeur 681306d4e7 [FIX] web: add access group to the pdf js template.
This commit adds the `base.group_user` access group to the `pdf_js_lib`
template so it can be lazy loaded in the JS.

closes odoo/odoo#51804

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-05-25 12:14:57 +00:00
Josse Colpaert 55b06152bc [FIX] l10n_cl: backport from master
* avoid doing super where we removed the super method: Was done in adapting l10n_cl to do without the methods in l10n_latam_invoice_document
* journal name to create
* at least fix for the document type itself
* making it work like before with shared sequences

closes odoo/odoo#49095

closes odoo/odoo#51496

Related: odoo/enterprise#9699
Related: odoo/enterprise#10654
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-05-19 07:23:41 +00:00
Laurent Smet 38fcc79c34 [FIX] account: Fix taxes amount by group with group of taxes
- Create a vendor bill with a line having a group of taxes

An additional tax line is displayed under the bill total with a 0 amount
because the created group of taxes has a zero amount.

closes odoo/odoo#51802

X-original-commit: adb02066f7cbead66eca21185f2ad142b46298a8
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-05-25 11:58:03 +00:00
Nicolas Martinelli 9d758fa2e1 [FIX] stock: do not copy package_level_id
- Activate 'Delivery Packages', 'Storage Locations'
- Open Inventory → Configuration → Operation Types
- Create a new one with:
  name: Pack Transfer
  Default source location: Stock
  Default destination location: Stock
  Move Entire Packages: True
- Open product [FURN_7777] Office Chair
- Use button 'Update Quantity' to create a new inventory:
  Choose 'Shelf 1' as location
  Create a new package 'PACK0000001'
  Set any quantity
- Go to Inventory → Transfers
- Create a new one (WH/PT/00001) with:
  Operation Type: Pack Transfer
- Shipping Policy: When all products are ready
- Create a Package line (package level) to move the package
  'PACK0000001' to Shelf 2
- Reserve the transfer WH/PT/00001
- Duplicate WH/PT/00001, which produces WH/PT/00002

From there, WH/PT/00002 seems empty, no apparent move, move line or
package level. However the new transfer is misbehaving, for instance:
- Add a new operation in WH/PT/00002 for 3 "[E-COM10] Pedal Bin"
- Mark as todo and check availability

The move for "[E-COM10] Pedal Bin" is reserved and the transfer
WH/PT/00002 is "Waiting" while it should be "Ready".

When the `stock.move` are duplicated, the value of `package_level_id` is
copied, linking the new `stock.picking` to the wrong package.

There is no need to copy the `package_level_id`. When not copied, the
list of products is correctly added to the new picking, without taking
packages into account.

opw-2252969

closes odoo/odoo#51798

X-original-commit: ecf726ae8221e6871c1e391294c633d8b6bcaa9a
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-25 11:14:36 +00:00
Pratima Gupta cb71a75b12 [FIX] stock_batch_picking: unable to vaildate batch picking
Before this -
unable to validate batch picking if - any of picking from
batch is manually done.

Fixes-2238699

closes odoo/odoo#51791

X-original-commit: 4123809a56c0aadc752cd9a9c331cccee34c0889
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-25 10:40:59 +00:00
Anh Thao Pham (pta) 71fb04ea3c [FIX] mail: fix error when clicking on follower icon in chatter
- Go to any page where there is a chatter
- Click on the followers list icon to display all followers
- Click on the icon (not the name) of a follower
This generates an error.

The redirect is executed in JS by retrieving the model and the id added to the <a> element.
When clicking on the follower icon, we are not clicking on the <a> element but on a child.
The model and the id have to be retrieved from its parent element.

opw-2256795

closes odoo/odoo#51790

X-original-commit: 11c4a2907e635662216ebc0e745f0ce9d16771cb
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-05-25 10:37:37 +00:00
Nicolas Martinelli 58f80b60bf [FIX] mrp: BOM in wrong company
- Create 2 companies C1 & C2
- Creae a product P
- In C1, set the routes as MTO + Buy, add a supplier
- In C2, add a BOM in kit for P
- Go back to C1 with C2 as an allowed company
- Create a SO for 1 unit of P, confirm

The PO for P is not created.

It occurs because the BOM of C2 is retrieved when running the
procurement, while it shouldn't be.

opw-2260945

closes odoo/odoo#51779

X-original-commit: 96b0dcf9e51f5a924e2cbf618c2ee5462cc1f03f
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-25 09:52:09 +00:00
william efc96b223f [ADD] l10n_id_efaktur: e-invoiceinc for taxes in Indonesia
Task 2005158
Manage the e-faktur numbers, create the required csv file to send to the
tax office, and mark invoices taken care of manually.

closes odoo/odoo#51767

Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-05-25 08:30:29 +00:00
william bfc17152fc [FIX] base: IDR currency precision from 0.01 to 1.00 and ID vat label
Although the precision is officially of 0.01, the precision used is
actually 50.0.

Change the VAT label for indonesia to NPWN
2020-05-25 08:30:20 +00:00
william 09a6a4da11 [IMP] account: add inverse of reversed_entry_id
We often have to know if an entry is reversed (i.e. if it has a reversal
move_id), not if this is the move that is the reversal of another move.
2020-05-25 08:30:12 +00:00
Andrea Grazioso (agr-odoo) 8eefb69252 [FIX] sale_coupon: correct discount application values from view
Create a coupon program following these steps:

- Set name
- set 'Discount Apply On' to 'On Specific Product'
- Add specific product
- Set 'Apply Discount' to Fixed price
- Input the fixed price
- Save

Generate a coupon and try to apply it on a quotation.
Error will popup because Not all conditions are met.

The field discount_apply_on (invisible with fixed price) keep the
application "specific_products". Fixing by checking the values in the
backend.

opw-2257783

closes odoo/odoo#51574

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-25 07:44:35 +00:00
Simon Lejeune fadaf8b748 [FIX] stock: _check_backorder
Check backorder is divided in 3 blocks:
1) quantities on move lines linked to a move
2) quantities on move lines without moves nor products but with a
package
3) quantities on move lines without moves but with a product

1) added quantities in the move's uom, 2) added quantitis in the product
uom, 3) doesn't seem to be used (and shouldn't be). Clarify all of that.

task-2239964

closes odoo/odoo#49790

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-25 09:50:11 +00:00
std-odoo 38b2c9e8f8 [FIX] portal: fix attachments upload as portal
Bugs
====
On e-commerce, the portal user is not able to upload
attachment with his comment, under a product.

On website blog, the portal user is not able to upload attachment with
his comment, in the discussion of the blog.

And, in `website_crm_partner_assign`, portal user is not able to upload
attachment with his comment, under the lead/opp.

Issue
=====
In the create method of the mail message, we check is the user can
read the attachment. If he can't, we raise an error.

But, the method that make the verification doesn't care about the access
token. So, when a portal user want to upload an attachment on a "public"
record (without a token on the record to sudoed it) the error is raised.

The portal user give an token for the attachment, so he should be able
to attach it to the message. This verification is done with
`_portal_post_check_attachments` so we can sudo write the attachment
after the creation of the mail message to bypass the verification.

Task-2214795

closes odoo/odoo#51772

X-original-commit: d59f8f62dbc7771fee51c3593f89f9b6832bb7ec
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-25 09:15:10 +00:00
Nicolas Martinelli ad5ac19218 [FIX] stock_account: return with limited access rights
- Create a SO, add a product with automated valuation
- Validate that SO
- Validate the picking
- Generate the invoice and validate
- As a limited user with only 'User' Inventory access rights, return the
  picking
- Validate the return

An `AccessError` is raised on `stock.valuation.layer`.

A regular user should be able to make a return, but not access the
accounting information. Therefore, use `sudo` where appropriate.

opw-2256074

closes odoo/odoo#51764

X-original-commit: c819a7e2fccbecce344ac74a33f0653eb8ba1027
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-25 08:11:36 +00:00
Pratima Gupta 835dac49c3 [IMP] *: update list view
This commit adapts several views to make them use newly defined
widgets, the new decoration-xxx mechanism on fields, and to adapt
them to the new design of buttons.

used following widgets and designs -

1) decoration-bf
2) many2one_avatar_user widget
3) badge widget

Task-2248231

closes odoo/odoo#51074

Related: odoo/enterprise#10528
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-20 12:08:49 +00:00
Damien Bouvy 1ecdaa3491 [FIX] payment_stripe: fix ideal fiximp
Revision 29b3b67a16 introduced payment with iDeal but accidentaly
introduced an issue where some payments did not go through (in fact,
some cards could not be saved, preventing the payment to occur).

This fix prevents this issue from happening by clearly differentiating
between returns from the Checkout process and from the Elements process;
in the case of a Checkout flow, the 'card' key is always present in the
data dict but can be equal to None if a non-card payment method was used
(e.g. iDeal) while in the case of an Elements (payment from Odoo) flow,
the 'data' key is never present and the card information has to be
downloaded using a get request to the Stripe API.

opw-2253269

closes odoo/odoo#51269

X-original-commit: f0ba15cda070e968699cf77ac0ba58234dbdaf51
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-05-14 13:39:51 +00:00
Samuel Degueldre f5e0727ca5 [FIX] web, *: fix keyboard overlay staying active when alt-tab/clicking
*: website

The keyboard navigation mixin was initially only used in the web-client,
because of this, some of the logic for hiding the overlay was put inside
of the web-client. We recently made keyboard navigation available on
website [1]. The handlers that would hide the overlay when alt-tabbing
or clicking on the page were not registered. This commit fixes that by
making the keyboard navigation mixin register the overlay-hiding
handlers itself.

[1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660

closes odoo/odoo#50122

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-25 08:41:49 +00:00
Stéphane Debauche 2244961314 [IMP] mail,tools: clean tags to kill list in HTML sanitizer
Some tags are not necessary in the HTML template and we can remove them to
have a proper HTML output.

Task 2171753

closes odoo/odoo#51757

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-25 07:28:19 +00:00
jvm-odoo a19684af95 [FIX] website_sale_coupon_delivery: traceback when going back
Issue

        - Install eCommerce, Delivery Costs & Delivery Coupon
        - Add a delivery method for US only
        - Publish the delivery method
        - Logout
        - Order something, select your delivery method
          and pay with wire transfer
        - When it's done, click 2 times on the browser
          back button

	Traceback

Cause

	When going back, the order is empty and
	we are doing self.ensure_one() on it
	when looking for free shipping lines

Solution

	Check if the order is not empty before
	looking for free shipping lines

OPW-2243736

closes odoo/odoo#51756

X-original-commit: 7b37c9d8ac1ccb1b6684308cf4dedf3a4b6bed11
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-05-25 07:31:06 +00:00
jvm-odoo 0e7102587e [FIX] website_sale_delivery: traceback when going back
Issue

	- Install eCommerce & Delivery Costs
	- Add a delivery method for US only
	- Publish the delivery method
	- Logout
	- Order something, select your delivery method
	  and pay with wire transfer
	- When it's done, click 2 times on the browser
	  back button

	Traceback

Cause

	When going back, the address is incorrect
	(public user address).

	So since you have 2 delivery methods and
	your address have only one, an assert
	cause a traceback

Solution

	This is the right behavior but I think
	it's better to give a clear error message
	instead of a traceback.

OPW-2243736

X-original-commit: 0222b727c143593debaf40a4ab54bda2f6b42213
2020-05-25 07:31:05 +00:00
Samuel Degueldre be54b82afd [FIX] web_editor, mass_mailing: fix assets template unable to load
View rendering from javascript has recently been made to check
permissions (See commits 64d0dab0a6
through ccc98e0169). Some assets required
by the iframe editor are rendered in JS so that they can be injected
into the iframe, but their permissions had not been updated, causing a
crash when trying to create or edit a mass_mailing campaign.

This commit fixes that by adding groups="base.group_user" to the
required templates.

closes odoo/odoo#51598

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-20 13:36:19 +00:00
Loan (lse) c62c33cd60 [FIX] website_sale: code displayed in product name in "recently viewed product"
Before this commit:
The `display_name` of the product was showing the code in the "Recently viewed products",
the code value isn't needed to be seen in the website.

After this commit:
More user-friendly product name is shown

OPW-2258774

closes odoo/odoo#51719

X-original-commit: be4d0d58081bea1b75ceee8f90372ed8cedbee2e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-22 15:49:02 +00:00
Ignacio Ibeas - Acysos S.L 1879e9b7a9 [ADD] l10n_es: products not subject to tax and Canary, Ceuta and Melilla Fiscal Position
closes odoo/odoo#51600

X-original-commit: 343d888c10af3d8d6a360d7857a6fb7903acbf24
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-05-20 10:00:30 +00:00
svs-odoo 4ec07602aa [FIX] product_expiry: update quantity on hand
Before this commit, when the user tries to create a new quant, even if
the product doesn't use an expiration date, he/she will not be able to
create the quant.
The issue was as `removal_date` field is added by `product_expiry` in
the quant list view, the field is on the values used to create a new
quant but not in the list of accepted field for quant creation.
So, it raises an UserError.

task-2260085

closes odoo/odoo#51482

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-18 15:35:08 +00:00
fja-odoo 049745c5ff [FIX] web_editor: fix _view_get infinite recursion
The _view_get function is a recursive function used to retieve all the
views related to a view (inherited or t-called).

The issue is that by an odd set of circumstances it is possible to have
a loop in the view graph. Resulting in the recursive function being
called until a "maximum recursion depth exceeded" error occurs.

Example of a loop: A t-call B and A inherit from B

This is possible on an update of a view that has been forked by website:
If the view A was doing a t-call on B and is has been duplicated with
the arch modified.
When we update with the changes A now inherit from B instead of t-call B
Since the arch was modified it will not be updated so A will still
t-call B but the inherit_id of A is unchanged so it will be updated to
reference B resulting in a loop.

closes odoo/odoo#51620

X-original-commit: 63e1e84ebd7e609d6e06d83dc0f0092688b013eb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-20 13:20:35 +00:00
qsm-odoo e3b4f3ddf4 [FIX] website: prevent infinite loop in header animation code
Bug introduced by [1]. When the header starts being animated, the main
padding-top of the page is adapted automatically with JS... but that
JS was actually starting a never-ending loop. This is fixed now.

[1]: https://github.com/odoo/odoo/commit/3defe35a0e4e2097115633797df6898ac2724c66

closes odoo/odoo#51726

X-original-commit: 07ed02608b8f4e3744c5e69c2651aa3df8bdd943
Signed-off-by: bvr-odoo <bvr-odoo@users.noreply.github.com>
2020-05-23 10:17:27 +00:00
Swapnesh Shah 2c9029c682 [FIX] website_sale: respect configuration for new shipping address
Before this commit, block for adding new Shipping address was always visible even if It is disabled/Not needed.

With this commit, We respect website configuration (Website --> Configuration --> Shipping Address) to display this block.

closes odoo/odoo#51732

X-original-commit: da9d9d039bfd0ca2a7e27671ac61a0b557d531d5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-23 16:10:01 +00:00
Lucas Lefèvre ef793cb5b2 [FIX] mail: Load record form view with user id
fixes #45425

closes odoo/odoo#51717

X-original-commit: a210d68af04490c0daa535e3151ed5edbd431898
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-05-22 15:15:21 +00:00
Romeo Fragomeli 15eaba09a7 [FIX] mail: avoid scrolling "NavBar" when dropdown open
Before this commit, when a SysTray dropdown is open the user can scroll
the element behind the dropdown.

After this commit, we disable the scroll until we close the dropdown.

Steps to reproduce:
* Open Odoo on "Mobile"
* Open the Activity SysTray
* Scroll the "NavBar" menu (=> Bug)

Note this fix is also applied in Desktop, as for me the "NavBar"
shouldn't never scroll on Desktop.

Task ID: 2231956
Task ID: 2234042

closes odoo/odoo#51716

X-original-commit: 7bb155991b9daec37edf73ef90cbad26268d76bb
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
2020-05-22 15:15:01 +00:00
Florent de Labarre c1bb241772 [IMP] base: allow to archive res.partner.bank
closes odoo/odoo#51662

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-05-22 07:56:53 +00:00
Andrea Grazioso (agr-odoo) 01a39bfd22 [FIX] sale_stock: Customer Reference field in Delivery Slip report
- Confirm a Sale Order with a Customer Reference ('client_order_ref'
field) set;
- Validate the Delivery Order;
- Print the Delivery Slip report;

The display area of the Customer Reference field is not correct on
the printed pdf report

opw-2260756

closes odoo/odoo#51701

X-original-commit: 4f3a9a59394cac425e23b81b3fe811a592c6dae2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-22 12:58:13 +00:00
Nicolas Martinelli 224db766e7 [FIX] mrp: view decoration
Complement of commit eee89db38819e58e55201f06de3394f8c01f9cf8

opw-2236916

closes odoo/odoo#51699

X-original-commit: d18af634d02bbcdf57de8afbe2fd971c7779eb1e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-22 12:57:01 +00:00
Andrea Grazioso (agr-odoo) 2bb9e779d1 [FW][FIX] sale_coupon: free product quantity in promotion
Create a promotion program with conditions:
- Minimum purchase in currency (ex 100$ tax excluded)
- Auto apply
- On current order
- Unlimited use

And reward:
- Free product
- 1 Quantity

Go to website shop. Fill an order with amount above the minimum
required by the program. The promo will apply and add the free
product.
Increasing the order amount will eventually make the free product
quantity increase, eventually overcoming the reward product
quantity.

Fixing by calculating the reward quantity using both minimum quantity
and minimum amount and using as cap the to reward product quantity
currently in cart

opw-2246138

closes odoo/odoo#51680

X-original-commit: 02331a34cf66117b27cfa1e96078b4721cbd1e70
Related: odoo/enterprise#10722
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-22 10:51:47 +00:00
Nicolas Martinelli da19d486ea [FIX] sale: incorrect decorator
The `@api.model` decorator prevent the call to the method from a button.

opw-2262445

closes odoo/odoo#51686

X-original-commit: 7de8420f2b645849a953376d6b1d8d663f3c8aa2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-22 11:35:17 +00:00