Commit Graph
138130 Commits
Author SHA1 Message Date
Sébastien Theys 2a0bcd103a [FIX] mail, test_mail: fix channel_get result
- flush must be done before executing queries
- when the current partner is given, it shouldn't be checked twice
- when a channel includes the given partners but also has more partners, it
  shouldn't be returned
- query can be limited to 1 result, minor performance gain in the rare case
  where more than one canonical channel exists

task-2324119

closes odoo/odoo#56680

X-original-commit: b716dd9e62991997e03556f2d3e2483921fedef9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-27 15:12:50 +00:00
Andrea Grazioso (agr-odoo) 30f589f748 [FIX] l10n_ch: Print QR-bill button should be only on customer invoices
opw-2320456

closes odoo/odoo#56679

X-original-commit: 66f8ebd9b2c34994b76475f55e6e28917d42ec53
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-08-27 15:06:54 +00:00
Xavier-Do 7a97bde596 [IMP] base: remove duplicate warning
Upgrade scripts are now doing custom check on view/field/model unlink. This check
can be removed from odoo.

closes odoo/odoo#56657

Related: odoo/upgrade#1711
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-08-27 14:35:30 +00:00
Anh Thao Pham (pta) 05a226c659 [FIX] crm: fix undesired opportunities via partner's smart button
- Create a Contact named "Alpha"
- Create another Contact named "Mister X" with "misterx@alpha.com" as email
- Go to CRM and create an Opportunity for Mister X
- Go to Contacts and open Alpha
The Opportunities smart button shows 0, but when clicking on it,
Mister X's Opportunity is displayed.

The Opportunity smart button displays a "crm.lead" view with a filter on partner_id.
The filter applies an "ilike" with the Contact's name on several fields of "crm.lead",
including "email_from".
As Mister X's email address contains Alpha's name, its opportunity is wrongly retrieved.

opw-2320299

closes odoo/odoo#56667

X-original-commit: 547cc14d7fc4f39a00bf7a05b781c1edfa050cf6
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-08-27 14:06:06 +00:00
svs-odoo 09d9bf2a12 [IMP] stock: remove picking demo data strange origin
closes odoo/odoo#56659

X-original-commit: 9fc27e8232ae1f0d697fa1435a2902181661a24d
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-08-27 13:34:56 +00:00
svs-odoo acb6a15856 [IMP] mrp: table demo data
Renames the "Table (MTO)" into "Table" and adds it a reordering rules
with 0 as min and max qty.

X-original-commit: b96b72c24aa80b9cdcfc2ebaf54438f3af6b1d9e
2020-08-27 13:34:56 +00:00
svs-odoo 9b6ffca6db [IMP] purchase_stock: new demo data PO
Creates a new PO to have more data to display in the product's forecast
report. The purpose is to make the demo of this report easier.
Also, replaces some tabs by 4-space.

task-2058495

X-original-commit: 3c3bd85b14e937b56938c1bc41acb3f1082b617b
2020-08-27 13:34:56 +00:00
svs-odoo 416160ece8 [FIX] purchase: noupdate demo data
Before this commit, creation of demo data purchase order wasn't into the
`noupdate` tag. So, if one of these records is manually deleted, then
purchase is updated, the record will be created again.

X-original-commit: d514f8dbbbacef58ce7ec1981e5ed321f6cf3bb4
2020-08-27 13:34:55 +00:00
svs-odoo 90ad55df17 [IMP] sale_stock: create new SO
Creates some SO to have more data to display in the product's forecast
report. The purpose is to make the demo of this report easier.
Also, increases the inventoried quantity of the `product_product_10` to
compensate the SO as this product is also used by other app demo data.

task-2058495

[IMP] stock: increase product_product_10 inv. qty.

X-original-commit: cecdc27fdf095374e1e640c5bf04c42a014af663
2020-08-27 13:34:55 +00:00
svs-odoo e0f46f7497 [FIX] stock: increase acoustic bloc screens qty.
The purpose of this commit is to increase the acoustic bloc screens on
hand quantity, and in fact, it should be already the case.
But because of a duplicate demo data record's id, the inventory line
about the acoustic bloc screens was erased by an another inventory line.

task-2058495

X-original-commit: 9d6b7af61d35b03d2ab1a55268829d8760570f67
2020-08-27 13:34:54 +00:00
svs-odoo 1ae94567fb [IMP] mrp: demo data
- Adds a MO for Table Top (2 units) to have a link between a consuming
  and a replenishing MO in the new product forecast report.

- Generates finished moves for the demo data MO, so they can be retrived
  by the forecast report.

- Changes date planned for the Table MO, so it will be planned after the
  Table Top MO.

- Calls the `action_confirm` on the MOs in batch.

task-2058495

X-original-commit: d6b0c3dcfb2f9f926cef1d22c96e4f09afe0d6c8
2020-08-27 13:34:54 +00:00
svs-odoo c1aa0d97bf [IMP] stock_picking_batch: internal -> delivery
Change the demo data to create pickings/picking batchs about deliveries
instead of internal transfers.
Made this change because multi-location is disabled by default so it
doesn't make sense to work with internal transfer with this config.
Also, renames these data records reference to avoid migration issue as
the pickings/picking batches picking type was changed.

Adds a second picking in the batch picking BATCH/00001 because it
doesn't make sense to have a batch picking for only one picking.

X-original-commit: ff2d4d77019a137008a7af5b0742c9ababeb5df9
2020-08-27 13:34:54 +00:00
svs-odoo 32852754d6 [FIX] stock: delivery WH/OUT/00005
The demo data creates a delivery with qty done but who can't be mark as
done because this picking has a move which has a move line (with qty.
done), but this move line isn't linked to the picking.
To fix that, this commit removes the manually created move line, calls
`action_assign` on the picking (this will create the move line and
correctly link them) then sets the `qty_done` on the move line.

Also, applies the same fix to done pickings who have the same issue (but
as they are done, it is less visible).

X-original-commit: 6732619941b9639897c00a3776429f50b38d1f9d
2020-08-27 13:34:52 +00:00
Antoine Prieels 3b5f0e198b [IMP] pos_restaurant(_adyen): Keep tab open
As long as the payment is not validated, the cashier can add products
to the order, even if the payment has been completed. The amount
authorized can be adjusted if the payment interface implements the
canBeAdjusted method.

closes odoo/odoo#56656

Taskid: 2117032
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-08-27 13:22:04 +00:00
Krupal Oza f0dccae14a [FIX] website: prevent manual creation of website visitors
Currently, admin and system users have the ability to manually create new
visitors from UI, which was introduced since ACL revamp[1] on visitors.
However, even admin should not be able to create visitors manually. Indeed
having a create button makes no sense as everything is managed through
frontend. Those menus are mainly present for reporting and displaying
information.

This commit fixes the behaviour by preventing manual creation of visitors
for all users including admin.

[1] - 5e605f5

Task ID-2288363

closes odoo/odoo#56651

X-original-commit: 1db514f8d2a9f1ba6861c89ced9a2a9f5dcf48be
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-27 11:34:06 +00:00
Andrea Grazioso (agr-odoo) 9fa270c70b [FIX] account: avoid long recomputation recursion
when creating the first bank statement on a journal. It will trigger
manual field recomputations:
https://github.com/odoo/odoo/blob/d19477f982e046ba563ce18706f0eab2b250738d/addons/account/models/account_bank_statement.py#L288-L297

previous_statement_id will correctly be False
The manual recomputation in create will recalculate all bank
statements that have a False previous_statement_id.
These bank statements are usually the first ones in a journal. When they get
recomputed it triggers recomputations for every bank statement that
follows it.

This commit try to limit this behavior by recomputing statements only in
the same journal

opw-2311173

closes odoo/odoo#56648

X-original-commit: e932df3b356752eb9c42164821acb6e2db7fe317
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-08-27 10:59:31 +00:00
oco-odoo b82723fb22 [FIX] l10n_ch: fix bad forward-port
closes odoo/odoo#56641

X-original-commit: 7c26020d874f09b632081563c27f075e19b8fd51
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-27 10:22:59 +00:00
Goffin Simon 3812bcf1dd [FIX] hr_timesheet: Access rights error with Timesheet Entries
Steps to reproduce the bug:

- Let's consider a user U linked to an employee E
- U has no right in Project and he is timesheet user
- Let's consier a leave type LT generating timesheets
- LT is linked to Internal Project IP and Internal Task for timesheet ITT
- IP has privacy "on invitation only"
- U makes leave request LR for leave of type LT
- His manager approves LR
- U goes to My timesheets list view and select the timesheet generated by the approval of LR
- U prints Timesheet Entries

Bug:

An access rights error was raised.

opw:2321040

closes odoo/odoo#56615

X-original-commit: 31a9faa7c83029386da5e1bac01dda0d124f8970
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-08-26 15:47:45 +00:00
Xavier Morel f051a2f969 [FIX] web: /web/binary/upload
Doesn't seem used since it's been broken forever on python 3:
base64.b64encode returns binary data, on which json.dumps chokes.

Still, removing the endpoint on old stables seems a bit brutal so just
fix it.

closes odoo/odoo#56650

X-original-commit: 7fc9bc28986d69184df5a4fdeefbe09e4b39b8f0
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-08-27 11:22:02 +00:00
Didier (did) bc5654f0a4 [IMP] mail, mail_bot: move notif request and OdooBot name into mail
task-2282334

closes odoo/odoo#56616

X-original-commit: bde23b82029507e525cf55d11b050af5f820a06b
Related: odoo/upgrade#1705
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-26 15:49:21 +00:00
Nicolas Martinelli 0c68958048 [FIX] mrp: prevent crash if no date_end
If there is no `date_end`, sorting will crash.

opw-2326262

closes odoo/odoo#56603

X-original-commit: e981c17dd93c756a5cf0384ab2dcc25ef58cb1b1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-08-26 14:32:37 +00:00
Tiffany Chang (tic) 1d67f0583e [FIX] purchase(_stock): make orderpoint qtys depend on POs
Before this commit, `stock.warehouse.orderpoint` `_compute_qty` didn't
depend on `purchase.order.line` (POL). This means when a relevant POL
was edited/cancelled, then the `qty_forecast` wouldn't correctly update.

To reproduce:
- Create a product w/ a vendor and buy route active,
- Go to replenishment report, create a reordering rule, and hit
  order for product (RFQ should be created)
- Cancel the RFQ and go back to replenishment report

The product should reappear in the list view, but does not because it's
`qty_forecast` has not updated and therefore has not updated
corresponding `qty_to_order` value.

Note string rename of `purchase_line_warn` 'Purchase Order Line' =>
'Purchase Order Line Warning' is due to repeat label use issue. It is
better to rename the poorly labeled `purchase_line_warn` than to give a
hacky label for new One2many field.

Task: 2285912
Manual forward port of: odoo/odoo#56580 due to migration test error

closes odoo/odoo#56625

Closes: odoo/odoo#56625
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-08-27 07:22:38 +00:00
Swapnesh Shah 9f609565a2 [FIX] account: use correct creation message on refunds
Before this commit, Creating a new Credit Note will log `Refund Created` into the chatter, and creating a new Vendor Refund will log `Credit Note Created` chatter due to wrong types given in `_get_creation_message` method.

With this commit, We use the correct type in this method.

closes odoo/odoo#56618

X-original-commit: 4d2d9f030d6a5a56657d30586ba6fc0bbd688fca
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-26 16:27:31 +00:00
Luis González 4debe9f1fa [FIX] tests: Handle attrs containing numbers instead of bool
The Form class already handles cases for attrs that contain boolean
values, e.g.:
`attrs="{'readonly': True}"`

But it doesnt for integers, e.g.:
`attrs="{'readonly': 1}"`

This commit changes the expected non-domain value from boolean to
integer, because both are valid cases and the former is a subset of the
latter.

[1] https://github.com/odoo/odoo/blob/b3d4938ba6b1/addons/repair/views/repair_views.xml#L54

closes odoo/odoo#56612

X-original-commit: 782534a429f10e7b114c838687d38aa4080a920c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Luis González [Vauxoo] <luisg123v@users.noreply.github.com>
2020-08-26 15:36:43 +00:00
wan 529d0e8e9f [FIX] account_edi: manage soft post
We don't want to send the EDI for documents set to be posted
automatically in the future.

closes odoo/odoo#56607

X-original-commit: 2e783a68b544515258af077e1cc63402f5b7f9c8
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-08-26 14:57:23 +00:00
Moisés López 732fd98bbc [IMP] models.py: Method search_read propagate kwargs to read method
Currently the method `read` uses by default the parameter `load='classic_read')`
  - `self.read(fields, load='classic_read')`

So, it computes `name_get` for all m2o fields for all records in `self`.

If you want to avoid computing the `name_get` to save time and process
You can use an empty string in load parameter:
 - e.g. `self.read(..., load='')`

The method `self.search_read` call to `search` and `read` methods
but `search_read` method is not possible to assign `load=''` argument
(or other arguments of the method `read`)
 - e.g. `self.search_read(..., load='')`

So, you need to use 2 lines of code:
records = self.search(...)
records.read(..., load='')

This commit changes `search_read` method to receive all keyword arguments of the method `read`
So, you can use `self.search_read(..., load='')` and the `read` parameter will be propagated

closes odoo/odoo#46391

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-08-19 17:08:52 +00:00
Mohammed Shekha e89423b2a6 [FIX] web: ribbon in form doesn't overlap kanban state
Have a project.task that is archived
Display it in form view and with the chatter on the side (big screen)
(though the issue happens at any viewport size, with slight difference is positioning)

Before this commit, the field kanban_state is under the ribbon, with no way
to interact with it.
It could happen with the title itself, or with any field that we'd put
on the right side of the form.

After this commit, the kanban_state field is visible.
In short, siblings of the ribbon now have some right margin in css.

task-2226237

closes odoo/odoo#56579

X-original-commit: d701317a6c3ba002e935f8b30ce160cc186c239a
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-08-26 11:40:57 +00:00
Nicolas Martinelli b7328770fa [FIX] mrp: prevent incorrect comparison
In case `date_planned_finished` is `False`.

opw-2326088

closes odoo/odoo#56578

X-original-commit: 5c7c6b42cc0e0fa5bdd78aeca48cdf4ba9f78cad
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-08-26 11:40:02 +00:00
std-odoo f3baf3816f [FIX] auth_signup: check user group in "signup_get_auth_param"
Task-2250264

closes odoo/odoo#56569

X-original-commit: 63d21db477e5b29c4c5173f18208348d6df617e0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-26 09:38:47 +00:00
Pierre Paridans 922d81dc9c [IMP] website_event_track: allow customization of the PWA's name
This commit adds a website-specific and customizable app name for the
Events' Progressive Web Application, configurable through the website's
settings.

Defaults to '<website_name> Events'.

closes odoo/odoo#56564

X-original-commit: 423076ddf1da0fc61d9a18dc19bbbbf900e3dad6
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-08-26 09:17:12 +00:00
Odoo's Mergebot f486696a1f [FW][MERGE] base, mail, fetchmail: make mail server configuration more user friendly
PURPOSE

Ease the configuration of external email servers by adding links to the
documentation and by making errors more user friendly.

SPECIFICATIONS

This is done by catching more exceptions when testing incoming and outgoing
mail servers. Some hints are given in the error message.

A link to the documentation is also added in mail: Settings > External Email
Servers feature: add a link to this doc: https://www.odoo.com/documentation/user/13.0/discuss/advanced/email_servers.html

Task ID-22736
PR #54176

closes odoo/odoo#56556

Forward-port-of: odoo/odoo#54176
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-26 11:18:57 +02:00
Bruno Boi 8f62b8ae98 [IMP] fetchmail: make incoming mail server configuration more user friendly
PURPOSE

Ease the configuration of external email servers by adding links to the
documentation and by making errors more user friendly.

SPECIFICATIONS

This is done by catching more exceptions when testing incoming mail server
connection and giving related hints.

Task ID-2273671
PR #54176

X-original-commit: f0ebeb96a05abc76d2acb77707a79f40e6999375
2020-08-26 08:15:48 +00:00
Bruno Boi 606bf9b51c [IMP] base, mail: make outgoing mail server configuration more user friendly
PURPOSE

Ease the configuration of external email servers by adding links to the
documentation and by making errors more user friendly.

SPECIFICATIONS

This is done by catching more exceptions when testing outgoing mail server
connection and giving related hints.

A link to the documentation is also added in mail: Settings > External Email
Servers feature: add a link to this doc: https://www.odoo.com/documentation/user/13.0/discuss/advanced/email_servers.html

Task ID-2273671
PR #54176

X-original-commit: d30682f4d4aeaefa077ba284a60c93f3a020365f
2020-08-26 08:15:47 +00:00
Yannick Tivisse 3eec4d6a69 [FW][MERGE] resource,calendar,hr_holidays: Improve the performances
TL;DR
=====

Improve performances with nearly a factor of 2. Use case, call action_validate on hr.leave for 100 employees
- 1987 requests -> 844 requests
- 1300 ms -> 700 ms

Purpose
=======

The first purpose of this commit is to add a test ensuring the number of request while creating
a company leave for 100 employees, if 15 of them already have a leave during that period.

It includes, the mass leave generation, and the conflicts resolutions. (Cancelling/Splitting the
already existing one and adapting the dates accordingly).

The second one is to reduce the number of request for this test.

In term of requests, currently we have:
- 5154 requests without bypassing the mail tracking + the activities management
- 1987 requests when bypassing the mail post-process (this is the current value, the bypassing was
  already done several month ago)
- 844 requests with all the optimization done in resource/calendar/hr_holidays

In terms of execution time, we have a reduction from +- 1300 ms to call the method action_validate
to +- 700 ms

As the performances issues severity increases with the number of leaves to create and the real time access
to the database, on the production base, we reduced the execution time to generate more than 500 hr.leaves
from several minutes to 21 seconds. A fix to avoid deadlock was already made at
https://github.com/odoo/enterprise/pull/10740/files

Some contortions were made to avoid changing a signature method in a stable release and thus
introducing for each method a second one, with the "batched" implementation, to keep a retro-compatibility
for the existing custom code.

But surely this could be cleaned in the master version. The old one will be deprecated while waiting to be
removed in a few versions.

closes odoo/odoo#56534

Taskid: 2256705
X-original-commit: 8c96a887d3f05680c923dcd44f9c70c0e5e0bd32
Related: odoo/enterprise#12670
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-25 15:44:07 +00:00
Didier (did) 14d6393594 [FIX] mail: fix margin issue when an activity is marked done
task-2280172

closes odoo/odoo#56538

X-original-commit: 16f705d8c9434bbbdf8a8987edb2ba325aa9f307
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-25 16:21:51 +00:00
Mehdi Outagant 6efa2e23d3 [REF] crm, sales_team: allow multi edit on lead and opportunities tree views
In this commit we set tree view of leads (both as leads and opportunities)
as multi edit enabled. Onchanges has been removed in CRM application. We
can therefore allow multi edit as computed fields work as intended.

Add domain on user_id fields to prevent selecting portal users as Salesperson
or Team leader from list views.

In crm.lead, onchange is only used to get formatted phone numbers when their
values changed or when country_id & company_id updated. This behavior will
only work in form views. It is not blocking so multi edit is not an issue.

Do not allow multi edit on name as it makes no sense.

Specifications: Contact (res.partner): base.view_partner_tree
    phone
    email
    company_id
    city
    state_id
    country_id
    category_id
    date_review_next
    grade_id
    user_id (+ add a limitation to not share users)

Specifications: Opportunities (crm.lead) : crm.crm_case_tree_view_oppo
    partner_id
    email_from
    phone
    city
    state_id
    country_id
    stage_id
    probability
    partner_assigned_id
    user_id
    team_id
    planned_revenue
    company_id
    campaign_id
    medium_id
    source_id
    tag_ids
    priority

Specifications: Opportunities (crm.lead) : crm.crm_case_tree_view_leads
    contact_name
    partner_name
    email_from
    phone
    city
    state_id
    country_id
    partner_assigned_id
    user_id
    team_id
    company_id
    probability
    campaign_id
    medium_id
    source_id
    tag_ids
    priority

Specifications: Sales Teams (crm.team) : crm.team.tree
    user_id
    company_id

Specifications: Stages (crm.stage) View : crm.crm_stage_tree
    is_won
    team_id

Task ID-2200674
PR #56378

closes odoo/odoo#56533

X-original-commit: 369375a69adc20a92075a89ef9557bf6b46cd605
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-25 15:43:45 +00:00
Mehdi Outagant 14198a25cb [REF] base: allow multi edit on partner tree view on a subset of fields
In this commit we set tree view of partners (contact) as multi edit enabled.
As some fields still rely on onchange, they are kept readonly in tree
view, notably state_id / country_id, parent_id, is_company.

Email has an onchange used only in form view. It enables gravatar. As it is
not really business critical multi edit on phone is available.

Specifications: Contact (res.partner): base.view_partner_tree
    phone
    email
    company_id
    city
    state_id
    country_id
    category_id
    date_review_next
    grade_id
    user_id (+ add a limitation to not share users)

Task ID-2200674
PR #56378

X-original-commit: 5b87603b7620da1badd860abb97d5bcacfc96ad5
2020-08-25 15:43:44 +00:00
Mohammed Shekha 954fd0e75e [IMP] web: do not resize quick create form on window resize
The quick create form view is explicitly given the o_xxs_form_view
class at initialization but resizing the window sometimes changes that
class on form element in enterprise.
To avoid this in the quick create case, the method _applyFormSizeClass
has been overriden in QuickCreateFormRenderer in order to do nothing
when the window is resized, so that the class and the related style stay
the same as expected.

Task ID: 2317807

closes odoo/odoo#56521

X-original-commit: f9c605ea578267de17e6c1dcc69dfd179d5d95fe
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-08-25 13:45:01 +00:00
Hardik PrajapatiandMohammed Shekha 9879f738f5 [FIX] web: open list optional fields dropdown position to right place
before this commit,
when there are too many fields on list view and list view has horizontal scroll
opening optional dropdown does not open on right place, instead it opens bit
left side from the right.

this commit fixes the issue by appending dropdown div inside table element, as
scrollbar comes inside table element, so appending dropdown element inside
table just after dropdown toggler.

task-2307248

closes odoo/odoo#56516

X-original-commit: 5a044593ba1f8f08f72de502d77823a8dd5175a0
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-08-25 13:02:29 +00:00
Romain Estievenart 846fb4c892 [IMP] website_event_track_online: PWA's custom offline page
This page will be used in case of lost connection. The web page will be
automatically fetched when you are back online.

We also use this page when it's not possible to use the cache due to a
redirection.

closes odoo/odoo#56514

X-original-commit: a7c5cadc7467bd2c2423cd3e803cad3677961521
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-08-25 12:51:13 +00:00
Mitali Patel d30bbaa2e5 [FIX] web: reload from attachment not working properly with basic layout in reports
when user create a report using basic layout and at download time, it gives warning that
the template doesn't contain the attributes 'data-oe-model' and 'data-oe-id' on
the div with the 'article class name so this issue is fixed in this commit.

closes odoo/odoo#56511

X-original-commit: c58400a1d27f0994a620108af476813bf654e879
Related: odoo/enterprise#12658
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-08-25 12:42:12 +00:00
qsm-odoo 7647151b78 [IMP] website: implement body image as a SCSS variable
This is unfortunately replacing old hacks by new ones but using SCSS
variables for this is more consistent with the rest of our website
customization possibilities.

The hack here is for the UI which is controlling two SCSS variables at
the same time (body-image and body-image-type). This has to be improved.

closes odoo/odoo#56496

X-original-commit: 6b400c433b352d7dbba0d3770600857df4872c50
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-25 10:43:41 +00:00
Goffin Simonandagr-odoo 4f10dfa527 [FIX] sale, sale_management: add tax on options (portal)
Steps to reproduce

Enable optional products in sale order
Make a sale order with optional products for a portal customer
with taxcloud fiscal position. Validate the order.
Tax will be calculated on the sol.

Access the sale order as the portal user.
Add the optional product, verify the order and pay.

The optional product will get the taxcloud data
AFTER the order has been verified and possibly paid. As this should not
occur this add the override to calculate taxcloud data right after
adding the optional product

opw-2310614

closes odoo/odoo#56110

X-original-commit: a7a91d5de55817b7580f3cd3d262a9dcce7496e7
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Co-authored-by: agr-odoo <agr@odoo.com>
2020-08-24 16:11:12 +00:00
Antoine Prieels a7bbcd1360 hw_drivers: Stop devices threads on disconnect
The threads of devices were still running after `disconnect` had been
called. We add a `_stopped` flag that is set when the thread should be
stopped.

closes odoo/odoo#56500

X-original-commit: 639a4e4fc72567a9655599eef150fabefaf1ff2e
Related: odoo/enterprise#12651
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-08-25 11:24:56 +00:00
Antoine Prieels 72681dc53f [IMP] hw_*,point_of_sale: Cleaning IoT Box
- Split driver.py to multiple files
- Remove hw_proxy module as most of its routes were not used and
  move remaingin routes to a controller in hw_drivers
- Add missing coding and license lines at the beginning of files
- Reorder imports and remove unused ones
- Rename device_id to device_identifier for clarity
- Rename screen to display for consistency
- Other minors improvements

Taskid: 1973956
X-original-commit: 841c016913a87133bf7257c62ae5f6bf7d99e06d
2020-08-25 11:24:56 +00:00
Antoine Prieels 703178f09b [FIX] pos_six: Wrong amount sent to terminal
The Six TIM API considers all round amounts to be in minor units while
decimal amounts are considered actual amounts.

In #df01c71, we changed all payments to minor units, but we still had
problems with floating point precision.

E.g. Starting a payment of 4.60€ was converted to 460 in minor units
but due to floating point precision, the actual amount sent to TIM
was 460.00000000005. The terminal then started a payment of 460€
instead of 4.60€.

closes odoo/odoo#56495

X-original-commit: 00cc3ce75dd2efa60ad93b6ad6535020fa517781
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-08-25 10:35:14 +00:00
Joseph Caburnay 8ada65ee22 [FIX] point_of_sale: random runbot errors due to NumberBuffer abstraction
The new randomly occurring runbot errors in pos/* can be reproduced by
performing quick successive clicks in numpad widget with the following form:

    1. Press 'Price' button.
    2. A number input.
    3. Press 'Qty' button.
    4. A number input.

The goal of the above steps is to set the price of the selected orderline
followed by setting the quantity. The result however is that the price
isn't changed but the quantity is changed to combined digits of the price
and quantity inputs. This is due to the implementation of the `NumberBuffer`
singleton which is used to abstract and take into account different sources of
user inputs -- via numpad widget, keyboard and barcode scanner.

Barcode scanner performs fast successive keyboard presses. To differentiate it
from normal keyboard input, we used `eventsBuffer` field of `NumberBuffer`
and store keyboard events there. Fast keyboard presses that stores more than
2 in the events are neglected by the buffer and is considered a barcode input.

In this commit, we save the `handler` that handles the keyboard events saved
in the `eventsBuffer`, then instead of only letting it to be invoked by the
setTimeout object, we allow the manual invoking of `handler` using the introduced
`capture` method. This method is called when the numpad mode is changed
(pressing Price, Discount or Qty button).

Additionally, we remove the use of 'useState' to prevent unnecessary rerender
of the component that uses the `NumberBuffer`.

closes odoo/odoo#56493

X-original-commit: a48d5a3599bff8f9f1446a5f7ad0ac9be0723478
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-08-25 10:33:02 +00:00
Didier (did) db0e95e368 [FIX] mail: reduce vertical spacing for tracking messages
task-2282385

closes odoo/odoo#56492

X-original-commit: c80ed69bb5b06d3df18a6491c1b889fcdb0de741
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-25 10:31:52 +00:00
Antoine Prieels 871029e445 [FIX] pos_epson_printer: Error message on print success
The POS showed an error message even when the print succeeded because
`send_printing_job` didn't have any return value so it was considered
falsy.

closes odoo/odoo#56482

X-original-commit: 532b1e11560481176b12c49a927c548c2b0fc9a9
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-08-25 09:49:56 +00:00
Didier (did) 3b4d26e9b8 [FIX] mail: reduce space in activity
The Wysiwyg editor put `<p><br></p>` even without a note on the activity. To
reduce the size in the UI, We compute the note to replace these almost empty
note by an actual empty value.

task-2282324

closes odoo/odoo#56481

X-original-commit: bf441dbc66439137c3a19093a6b524545ae94cee
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-08-25 09:49:36 +00:00