Commit Graph
142419 Commits
Author SHA1 Message Date
Raphael Collet d3a35a2f34 [IMP] core: add magic fields on the class that defines a model
This makes magic fields shareable across registries, and speeds up their
setup.  Also simplify concurrency fields (__last_update).
2021-05-03 12:33:29 +00:00
Raphael Collet f7c9cb2b60 [IMP] core: share fields by not duplicating them on model class
Also speed up the basic setup of fields that are always duplicated
top-level (on the model's registry class).  This saves time and memory,
as we also discard field.args and field._base_fields on toplevel fields
(those values are no longer useful after setup).
2021-05-03 12:33:29 +00:00
Raphael Collet 81ff2717cf [REM] core: remove optimization sharing fields across registries
The optimization will be reintroduced later in a different form.
2021-05-03 12:33:29 +00:00
Raphael Collet 960cd72774 [REF] core: add method get_currency_field() on Monetary to retrieve it
This replaces the setup of the attribute 'currency_field', which depends
on the presence of other fields on the model, and may therefore vary
from one registry to another.  This is necessary to make monetary fields
shareable across registries.
2021-05-03 12:33:29 +00:00
Raphael Collet 34d6f87d54 [REF] core: put field.depends on registry and make field.recursive explicit
The attributes field.depends and field.depends_context are problematic
for sharing fields across registries, because they depend on the model's
registry class, which may vary from one registry to another.  In order
to make computed fields shareable, we have to move those values away
from fields.

For the same reason, field.recursive should not be inferred, because its
value may depend on the registry, although it is generally not the case.
Moreover, the flag recursive=True is set on a field when field triggers
are determined (on the registry).  A compute method may be called before
the flag is set (if no update has been done yet), and that can lead to
incorrect computations.

This happened in test TestUsers2.test_reified_groups in module 'base'.
The user groups view was apparently determined without the flag being
set, and the view depends on the recursive field 'trans_implied_ids',
which was not correctly computed.

We thus force developers to be explicit about recursive computed fields.
The code now logs a warning when the flag is not set up properly.
2021-05-03 12:33:29 +00:00
Raphael Collet 1ca2c7e457 [REF] core: new field setup API
The basic setup of fields is now made in Field.__set_name__(), which
automatically makes this information shared across registries, because
it is done when importing Odoo modules.
2021-05-03 12:33:29 +00:00
Raphael Collet f934b29a8a [REF] core: speed up the retrieval of fields on models
Fields are no longer retrieved with inspect.getmembers(), which is
time-consuming.  Instead, the classes defining models automatically
collect their own fields (via Field.__set_name__()), and the field
retrieval is done by using those collections.  Also, a field no longer
needs to introspect its model class to find its field definitions.

A class that defines a model automatically determines its '_name',
'_inherit' and '_module' upon creation, and the fields determine their
'name', 'model_name' and '_module' via Field.__set_name__().

Loading a registry with 290 modules from scratch is now 25% faster.
2021-05-03 12:33:29 +00:00
Raphael Collet e5ded717f4 [IMP] core: clarify model definition and registry classes 2021-05-03 12:33:29 +00:00
Raphael Collet cc7fbb47ae [TMP] registry actual load time 2021-05-03 12:33:29 +00:00
Barad Mahendra f93e054050 [IMP] project: generic UX improvement for project configuration
Purpose of the task is to do a generic UX improvement in project

Specification:
--------------

1) Stages(project.task.type)

* List view:
  - move the 'folded in kanban' field to the right of the project_ids one
  - remove the description field from the list view
  - make the list view editable in batch
* Form view
  - rename 'stage name' into 'name'
  - move the sequence field below the 'rating email template' one
  - change the copy of the tooltips to: "At each stage, employees can
block tasks or mark them as ready for the next step. You can customize
here the labels for each state."
  - the tags should be colored according to the project's color
  - reduce the space in between the icons and the name of the states
  - add some space in between the legend_done field and the description
  - when creating a new mail template, set 'project.task' as model_id
of the template
* move the 'Stages' menu into below the 'Projects' one
* add the project_ids field to the kanban view
* search: rename 'Tasks Stages' into 'Name'

2) Tags(project.tags):

- configuration > tags menu: change the helper to: "Tags are perfect
for categorizing your tasks."
- add an optional list view -> only the color field should be optional
and displayed by default
- new tags should be created at the top of the list

- Also removed some of the unused(deprecated) css which are not applied
anywhere in the project.

closes odoo/odoo#69636

Taskid: 2508642
Related: odoo/enterprise#17865
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-04-28 08:53:48 +00:00
Thibault Delavallée 6c7dd7501a [FIX] crm: do not reset action name in convert wizard each time an option changes
Currently ``name`` field that holds the action type is recomputed each time
duplicated leads are updated. However duplicated leads are often updated
notably each time customer action (create / link / do nothing) and chosen
customer are updated.

As ``name`` compute method is mainly present to replace a default value
its compute method is updated so that it nows compute only when not having
a value. Once having a value user choice is kept.

Task ID-2452777
COM PR odoo/odoo#68618

closes odoo/odoo#70254

X-original-commit: d75905f7acb1e7584d01792b4880fa76e6920d56
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-03 11:51:27 +00:00
Nasreddin (bon) 29398abb4e [FIX] crm: display right partner and action when converting lead
Issue
	- Create a partner with email 'aaa@test.com'
	- In CRM settings, activate 'Leads' feature
	- Go to CRM -> Leads and create a Lead:
	- Set email field to 'aaa@test.com'
	- Click on 'Convert to opportunity'

	Neither the action or partner_id field is set to the right value.

Cause

	Due to missing 'lead_id' field in template, the partner_id field
	is not recomputed since action is not recomputed.

Solution

	Add 'lead_id' field as invisible in form.

opw-2439722
Task ID-2452777
COM PR odoo/odoo#68618

X-original-commit: 6915d17f5f10737c03c820b69eded3a7c0151907
2021-05-03 11:51:26 +00:00
Sébastien Mottet (oms) 094c94fcd3 [IMP] website: change some wordings in configurator features screen
Some feature descriptions and titles have been reworded.
A sentence has been added below the title to indicate
that choices made on this screen are not definitive.

Task ID: 2451965

closes odoo/odoo#70252

X-original-commit: 63195ba03ccc1bf40b4682fc7c9aa4a1a55f1e43
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-05-03 11:40:09 +00:00
Sébastien Theys 7de0a02980 [IMP] mail: flag JS "on change" fields as such
There is currently a limitation with required fields because an "on change"
compute might trigger the check for "required" before all the actual computes
have been done, leading to the required field check incorrectly failing.

The main goal is to ensure the "on change" computes are done after all the other
computes and after the check for required fields.

A check has also been added to ensure no "real" compute can trigger update cycle
side-effects anymore.

Opportunity is also taken to prevent from checking for required fields on a
record that was deleted as part of the same update cycle.

Somewhat part of task-2278551

closes odoo/odoo#70204

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-05-03 11:52:26 +00:00
Adrien Widart d448db602a [FIX] point_of_sale: use lot's location for SML's location source
When selling a tracked product that comes from a specific place in the
warehouse, the module will ignore this information and set the parent
warehouse as source location.

To reproduce the error:
(Use demo data)
1. In Settings, enable "Multi-Warehouses"
2. Create a product P:
    - Product Type: Storable Product
    - Available in Pos: True
    - Tracking: By Unique Serial Number
3. Update its quantity:
    - Location: WH/Stock/Shelf 1
    - Serial Number: USN01
    - Qty: 1
4. Start a POS session
5. Sell P
    - Enter the same serial number
6. Go back to quantity update page for product P

Error: The quantity for "WH/Stock/Shelf 1, USN01" is still 1, it should
be 0. Moreover, a new line appeared: "WH/Stock, USN01, -1" which is
incorrect. The POS module considered that the product sold came from
WH/Stock instead of WH/Stock/Shelf 1.

OPW-2473002

closes odoo/odoo#70194

X-original-commit: 02a68278a9af2c477cc9a30716feabb0b533b7e7
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-04-30 15:22:10 +00:00
Djamel (otd) d413524dc8 [FIX] stock_landed_costs: use the correct split method landed cost
Steps to follow to reproduce the bug:
- Install Inventory and Purchase
- In the inventory settings, Enable the "Landed Costs" option
- Go to Purchase > create a Service type product
- In the Purchase tab > Enable "is landed cost" option and choose "by quantity" in the default split method
- Go to Orders > Requests for quotation > Create a new RFQ > add Any product and confirm the order
- Validate receipt of the product
- Create a bill > add the Service you created at the beginning
- Create Landed Costs

Problem:
we do not use the split method landed cost of the product, we automatically set it to "equal"

opw-2465753

closes odoo/odoo#70247

X-original-commit: 5da8c593353edcae4540bec696e259031f2d60f5
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-05-03 11:00:22 +00:00
Swapnesh Shah 2511100232 [FIX] mrp: allow to select product w/o bom
Without this commit, User was not allowed to create Unbuild Order
for the product without BoMs from Unbuild Orders menu.
But User was able to create Unbuild Order using 'Unbuild Order' button
on MO.

With this commit, We are allowing user to select Products without BoMs
to make this behavior consistent so user can create Unbuild Order from
Unbuild Orders menu.

closes odoo/odoo#70246

X-original-commit: eb332de42a36b7235d5578d39d345a5ff1df7759
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-03 10:58:11 +00:00
Florent de Labarre b6ad74e956 [FIX] stock : wrong float_compare
add the name of argument, if not precision_digits is used.

closes odoo/odoo#70242

X-original-commit: 2e7dfec50e9104adf8efbc64e0342359dc8947a7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-03 10:24:45 +00:00
Samuel DegueldreandTom De Caluwé 2cfb8658bf [FIX] web_editor: fix default shapes not reacting to palette changes
Previously, when toggling on background shapes, they always had the
default colours. In [1] we made it so that when you toggle on a shape on
a section, it would automatically reuse the colors of the surrounding
shapes if any.

Unfortunately, when the "implicit" colors were also the default colors,
they were still marked on the shape, and it got an explicit background
image that would no longer react to changes in the palette.

This was caused by the fact that the call to _getDefaultColors returns
an empty object when the section doesn't already have a shape-container,
this was not a problem before since we were not passing in any colors
when creating the initial shape previously, the the aforementioned
change made it so that we did.

This commit fixes the issue by creating the shape-container before
calling the method that will set the colors on the shape, this way
getDefaultColors works as expected, and the colors are not marked on the
section when they are the default ones, restoring the ability of the
shape colors to adapt to the palette

[1]: https://github.com/odoo/odoo/commit/875aca63f7dab287c61485ebe999b3b8dd89d91c

task-2500607

closes odoo/odoo#70054

X-original-commit: 63acc2b0d1957dedd40af2033722f9ea4ef2e597
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
2021-05-03 09:27:44 +00:00
Chong Wang (cwg) be2981324c [FIX] Calendar: fix avatar preview on hover
delete redundant '}' added by accident

The redundant '}' might be added by accident.
It makes the the correct avatar image cannot be found and shown as a default camera image when the user
* Open calendar
* Hover on on of the responsibles listed in the right side panel of the calendar view

closes odoo/odoo#69139

Taskid: 2504659
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-04-16 09:14:24 +00:00
Chong Wang (cwg) 85e1c447df [IMP] base: specify placeholder for company partners
set the specify placeholder for company partners from 'placeholder.png' to 'company_image.png'

After this commit, in the res.partner kanban view, if the company image of an individual is not set,
it will be shown as the 'company_image.png'(a company logo) rather than the 'plaeholder.png'(a camera logo).

closes odoo/odoo#68994

Taskid: 2491161
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-04-16 09:01:46 +00:00
Sébastien Geelen (sge) ed12ad006a [FIX] web_editor: update toolbar position on scroll
closes odoo/odoo#70221

X-original-commit: 044c047cee83c915b33d21aeddb08d1096ab8060
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-05-03 07:48:18 +00:00
Sébastien Geelen (sge) 7845a77c61 [FIX] web_editor: update odoo-editor lib to commit 77a1e98
X-original-commit: ea86110cc781b603a6665523cd4359a405f5babd
2021-05-03 07:48:18 +00:00
Pratima Gupta 0626ad78ef [FIX] mrp: suggest the qty to produce instead of 0 in workorders
Before this commit, if any workorder is stared to produce, qty
producing was 0. After this commit, if product tracking is none
then system will suggest the remaining qty of workorder to produce
when user is start it.

TaskId - 2480775

closes odoo/odoo#70207

X-original-commit: 5bbc234d43a415be18fcfa42dad33b1577644719
Related: odoo/enterprise#18086
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-04-30 17:48:13 +00:00
tsb-odoo 27ad0755b6 [FIX] l10n_fr: assets update on account.account.template.csv
425000 current assets rather than current liabilities.

closes odoo/odoo#70200

X-original-commit: 60b97ff46a790c2c6c490d78f6d1be103ff3182f
Related: odoo/enterprise#18081
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-04-30 16:07:40 +00:00
Samuel Degueldre 557a24e4f4 [IMP] web: allow lazy-loading asset bundles' templates
Previously, lazy-loading xml templates was only possible by fetching the
xml file directly, this meant that it was impossible to lazy-load an
entire bundle's templates with a single request. Additionally,
requesting the xml files directly meant that no inheritance was applied,
causing the need for a separate inheritance system using t-jquery on the
client-side.

This commit alters the /web/webclient/qweb route so that it now takes a
bundle id, meaning that it is now possible to lazy-load the xml from
arbitrary bundles.

task-2497943

closes odoo/odoo#70084

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-05-03 07:25:20 +00:00
Andrea Grazioso (agr-odoo) 830a28b6ad [FIX] sale_margin: avoid purchase price reset on order confirm
- Create a service product with cost 0
- Create a sales quotation
- Add the service product, change the cost to a positive quantity
- Save and Confirm.

Purchase Price (cost) will be reset to 0

opw-2481564

closes odoo/odoo#70036

X-original-commit: 8a8ff03f6111f377bcd9c2b0f584c450b82a4182
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-04-28 14:50:22 +00:00
Francois (fge) c1abb1841e [DOC] web: export an object containing a comment is not supported
closes odoo/odoo#69407

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-04-23 10:01:41 +00:00
Andrea Grazioso (agr-odoo) cfdd7c3b5e [FIX] stock: allow destination address change in transfer
- Create SO with deliverable product, confirm
- Change delivery Address on SO and on Transfer
- Inventory > Stock moves (debug mode)
- Group by > Picking and Destination address

The address shows is the original and not the updated one.

opw-2429018

closes odoo/odoo#67407

X-original-commit: c813655074b3b83bdf9345ef12399b0b96feaf71
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-03-08 10:49:02 +00:00
Djamel (otd) 92d87907e8 [FIX]repair: fix invoice deletion
Steps to follow to reproduce the bug :
- Install the Repairs and Accounting application
- Create a new user and give him only access to Accounting
- Connect with this user
- Create a draft invoice
- Try to delete it
- Access rights error is triggered.

Problem:
When we delete an invoice and the Repairs app is installed, we check if it is not an invoice related to a repair.
But the user does not have access to “repair.order”, so we can not check the field "repair_ids".

opw-2507867

closes odoo/odoo#70095

X-original-commit: b5588246a0e032c92b8443e67875ff4146858fe8
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-04-29 10:59:14 +00:00
Antoine Guenet a502bb7223 [FIX] web_editor, note: autofocus the editor on load note form view edit
On creating a new note, the focus was automatically set into the "tags"
field. This was inconvenient and was replaced with an autofocus on the
note itself so we the user can immediately start typing.

closes odoo/odoo#70195

X-original-commit: 8fe89c5ebc138cb517938dbd6d975b8bec4eaf4d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-30 15:23:36 +00:00
Achraf (abz) 5b3010a3a0 [FIX] l10n_in_sale: Set automatically GST Treatment on invoice creation
What are the steps to reproduce your issue ?

    1. Create a contact and set 'VAT' to "20AAACT2803M2ZO". The 'GST Treatment' will be automatically set correctly.
    2. Create a sale order for this new contact. GST Treatment is automatically filled in correctly.
    3. Confirm the order.
    4. Create an invoice.

What is currently happening ?

    The related invoice does not fetch the 'GST Treatment' automatically

What are you expecting to happen ?

    The related invoice must set the 'GST Treatment' automatically.

opw-2499503

closes odoo/odoo#70131

X-original-commit: 36582d08dee3688ea6e839bccfeaf8877e812122
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2021-04-29 17:16:19 +00:00
Ivan Yelizariev adec68caa7 [FIX] attachment_indexation: fix error "cannot contain NUL (0x00)"
To reproduce:

* install python package ``pdfminer.six``
* install module attachment_indexation
* upload special attachment

BEFORE:

Error in client:

> TypeError: relatedTemporaryAttachments is not iterable

Error in logs:

> ValueError: A string literal cannot contain NUL (0x00) characters.

AFTER:

No errors

---

opw-2506038

closes odoo/odoo#70205

X-original-commit: 172b88fdd955ba591a9bdd5a93bf7285ce0e6520
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-04-30 17:04:38 +00:00
Richard deMeester a0887c6a48 [I18N] account_check_printing: translate in en_AU
Use Cheque instead of Check (American spelling)

closes odoo/odoo#70196

X-original-commit: 58966deb956ba87b3475cf3d359d732907331563
Related: odoo/enterprise#18079
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-04-30 15:26:07 +00:00
Nicolas (vin) 3973f766cc [IMP] account_reports: carryover improvements
Implements various small improvements in order to make the carryover
functionality a bit less hidden, with a cleaner UX.

Task id #2500684

closes odoo/odoo#69762

Related: odoo/enterprise#17908
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-04-30 15:37:35 +00:00
Jacky (trj) bb11164de0 [FIX] point_of_sale: create only one picking when validating order (if the option is activated)
closes odoo/odoo#70190

X-original-commit: 77267c265e6769cd90e8bc61d634b765e04a6829
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-04-30 14:34:18 +00:00
Nicolas Lempereur 849e0a5690 [FIX] im_livechat: 'Visitor' translated in livechat
Make translation work for "Visitor" that was appearing in livechat
session to the visitor.

opw-2504461

closes odoo/odoo#70175

X-original-commit: 3b199007bd5a472d57f823a63b2b77841b14c7fc
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-04-30 14:00:17 +00:00
Sébastien Theys 8f6603db45 [IMP] mail: compute messaging menu counter with dependencies
It was the last remaining usage of the deprecated `_updateAfter` which is
therefore removed too.

Part of task-2258617

closes odoo/odoo#70170

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-04-30 12:02:20 +00:00
Rémy Baranx (bar) 5a1905ee7d [FIX] gamification: apply res.users ir rules when retrieving badge owner info
When retreiving the list of badge owners in `_get_owners_info()`,
we should apply `res.users` ir rules to be sure to respect multi-company
rules.

upg-7081

closes odoo/odoo#70182

X-original-commit: d75deff4791702e1f085b2b16247d7f7c5335720
Signed-off-by: Christophe Simonis <chs@odoo.com>
2021-04-30 13:33:42 +00:00
Sébastien Geelen (sge) 86dbb2f4ae [FIX] web_editor: prevent linktool destroy on autocomplete click
closes odoo/odoo#70167

X-original-commit: 3acf90df2f70793554ff13e262cb4ad0e38308bd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-30 11:31:23 +00:00
Nicolas Lempereur 1f14a6b8ed [FIX] website{,_livechat}: 'Website Visitor' translated
Make translation works for "Website Visitor" that was appearing when a
logged-out user open a livechat session.

note: list comprehension has to be removed since translation only search
language in direct calling method closure.

opw-2504461

closes odoo/odoo#70146

X-original-commit: 7d28f32d9be1590764883f4621df04e04c4e1f12
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-04-30 08:45:00 +00:00
Adrien Widart c175652762 [FIX] point_of_sale: post journal entries of cash in/out
When closing a POS session, if there was no sale, the journal entries of
cash in/out will not be posted.

To reproduce the error:
(Need account_accountant)
1. In Point of Sale, open Shop's settings:
    - Enable "Advanced Cash Control"
2. Start a new session:
    - Open POS
    - Close, Confirm
3. Close session
4. Click on "End of Session"
5. Add a "Cash In/out"
    - +$10
6. Set Closing Cash
7. Close Session & Post Entries
8. Accounting > Cash

Error: The $10 line is present but its status is "New". It should be
"Processing".

Since there was no sale during the POS session, the module ignores all
the accounting part. When the session is closed, the accounting part is
ignored because there were no sales. As a result, it does not post the
cash in and out.

OPW-2456395

closes odoo/odoo#70160

X-original-commit: 985f1bf5b187513f71e65ab7d2b68e25ff1bfdf1
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-04-30 10:29:22 +00:00
Sébastien Geelen (sge) 0c5c4664f6 [FIX] web_editor: fix icon replacement when using toolbar replace button
closes odoo/odoo#70143

X-original-commit: b5ed6558185bb4686d6be6e8c1c4e8c4573c6e14
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-30 08:06:32 +00:00
Sébastien Geelen (sge) d54959bd9d [FIX] web_editor: fix icon link edition
X-original-commit: 8bb7610e8893cad692cf9ad2f5a89a503a6175ef
2021-04-30 08:06:31 +00:00
Olivier Dony d08db821bc [IMP] web: simplify font loading code
Can be simplified a bit by using the newer features of
`tools.file_open()` and `tools.file_path()`.

Let's do it since the PR is touching these lines anyway
for the change of resource paths.

closes odoo/odoo#69614

Related: odoo/enterprise#17855
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-04-29 07:34:40 +00:00
Simon Genin (ges) ecfe85db84 [REF] web: static/src/(img|fonts) => static/(img|fonts) 2021-04-29 07:34:40 +00:00
fw-bot f6c03b7097 [FIX] calendar: improve calendar recurrency creation performances
Turn off calendar.attendees notification during synced_events creation
to improve performances. The calendar notification are only computed
once after all the synced events have been created.

Add a flag in google_calendar.js to avoid retriggering synchronization
while navigating the calendar view if the past synchronization is still
pending.

opw: 2450259 + fixes/adaptations to 14.3 branch

FW of https://github.com/odoo/odoo/pull/69619

closes odoo/odoo#70035

X-original-commit: 28ccb2b88a7793058c81aabffb43071165886f40
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-04-30 06:47:00 +00:00
Yannick Tivisse fa90f97627 [FIX] hr_holidays: Add method to allow inheritance
closes odoo/odoo#70125

X-original-commit: 12ba83ce60c74a8dcfb773a2c21bbf31b681ab30
Related: odoo/enterprise#18044
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-04-29 16:56:17 +00:00
david f27111e767 [FIX] mail: tracking_value_ids field group
Give a coherent group as otherwise we could have access errors. Simple
case: an Admin Rights user goes into a mail message form which is only
available in debug mode which sets `group.no_one` into such user. This
model is only readeable by `base.group_sytem` so an AccessError will
raise.

closes odoo/odoo#70119

X-original-commit: 8930e08213d0b6805e6fc91fa07561107ef43acc
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-29 15:05:12 +00:00
Romeo Fragomeli 7a40d528e7 [FIX] web: pdfjs: hide buttons that doesn't work in webviews
Some features of the PDF.js library doesn't work in the
webview of the mobile apps.

Initially 'window.print' is defined as an empty function in
webviews unlike browsers where it is already ready.
After that, PDF.js needs to monkey patch 'window.print' and
saves a reference to the original definition, which is not
yet fulfilled in by the mobile app (Java part).
So the print of PDF.js doesn't work in webviews and end
users will need to download the file before printing it.

Regarding the Download button, the 'download' attribute is
not supported by the webview as you can see in:
https://bugs.chromium.org/p/chromium/issues/detail?id=432414
As there's many ways to download a file in Odoo it's not
a big deal to simply hide it in PDF.js.

Because it's quite complicated to fix this, we decided
to hide the features that don't work (Download / Print)
or don't make sense (Open file).

Note that a refactoring is already in progress in order to
avoid to patch this library in master.

closes odoo/odoo#70110

Task-id: 2200168
X-original-commit: 39225827035efe11cdc90b2a7f1ae1f24a54b136
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
2021-04-29 14:27:31 +00:00