Commit Graph
147686 Commits
Author SHA1 Message Date
yhu-odoo 8e599caf7a [FIX] mrp: trigger RR after change product qty
In 1e93c161ca454313436b65427542db961f6ddcdd we trigger RR when
confirming a MO. Same thing should be done if we changed the product qty
for a confirmed MO.

Task-2653116

closes odoo/odoo#79332

X-original-commit: 22eb5c38ff45f4e5cd5d2025d31960efa051ad6b
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-11-04 10:22:02 +00:00
Andreas Perhab cc4b2b2ffd [IMP] readme: use https urls
For status images

closes odoo/odoo#79297

X-original-commit: e2bccd33e157542c37528ce159577e1574b63fdc
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-04 10:21:58 +00:00
svs-odoo 15f27dde29 [REV] repair: fix repair mail template
This reverts commit 3b3a47f0d3414ae5bee159f6ec4644e64441040f.

task-2667207

closes odoo/odoo#79333

X-original-commit: 09cb77ebf6915e6a98bc3d36869b71f5b495d878
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Steve Van Essche <svs@odoo.com>
2021-11-04 09:39:50 +00:00
Géry Debongnie 2cf87ea02f [IMP] web: update owl to 1.4.8
Release notes: https://github.com/odoo/owl/releases/tag/v1.4.8

closes odoo/odoo#79337

X-original-commit: bfbd0d956f3a7a22a22dfb4c466b7a6f0a916a7d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-11-03 19:00:46 +00:00
Nicolas Pierre 1f00ffb0f2 [FIX] stock: inventory adjustments fixes
- When locations are activated, fix not being able to add a quant for tracked products just after
creating one from the 'update quantity' window due to Inventory Adjustment location being auto-selected [since it is the last quant]
 - Fix quant not properly making fields invisible after confirming from the stock track
confirmation window

closes odoo/odoo#79338

Pr: https://github.com/odoo/odoo/pull/78768
Task-id: 2674732
X-original-commit: ff26704e7afaa537530c0e092a88b73ee791775f
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: npi-odoo <npi@odoo.com>
2021-11-03 17:28:55 +00:00
Sébastien Geelen (sge) 66851b042c [FIX] web_editor: fix the beforeunload warning
The warning shown on beforeunload when quiting a page during edition
was missing since the new editor merge.

task-2666177

closes odoo/odoo#79325

X-original-commit: 6a7fa263e72de45d2e92c436321c01c4b70870a8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-03 16:44:40 +00:00
Hubert Van de Walle (huvw) 5f2c143623 [FIX] web_editor: don't show the active style entry if absent
Steps to follow

  - Edit a report with studio
  - Add an inline text element
  - Select it
  - Select the text in the sidebar
  -> An error is raised

Cause of the issue

  firstButtonEl is undefined because the style section is not always
  present in the toolbar

opw-2674302

closes odoo/odoo#79335

X-original-commit: 45b590d8961d56f8d207c22efbf1ba7188a3b1fa
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2021-11-03 16:02:11 +00:00
Tiffany Chang (tic) dd1ea09f34 [FIX] mrp_subcontracting, stock: don't change loc when dupe SN
Previous task: odoo/odoo#61287 improved warnings for when using a
duplicate SN, including an auto-update of the source location when
appropriate. Unfortunately the auto-update is too risky when registering
a subcontracting SN tracked components.

Instead, we no longer update the source location when in a
subcontracting situation and update the warning message to match the
expected flow to fix the issue.

closes odoo/odoo#79334

Task: 2669180
X-original-commit: a430c4d7d6e2a02ef9b3905b554a779fc1643bcf
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-11-03 16:02:07 +00:00
roen-odoo 76b556fd3c [FIX] purchase_requisition : PO Agreements wrong qty ordered
Current behavior:
If you have 2 time the same product in the agreement and you confirm an order with just one line of this item
the 2 lines in the agreement will have the quantity.

Expected behavior:
Only the ordered item should have the quantity applied. In this case the products are compared with the price and
product ID. If you modify the price in the PO the first line of the agreement will have the quantity by default.

Steps to reproduce:
1. Create a new Purchase Agreement
-Add two lines with the same product
- First line has a scheduled date and price that are different from the second line
2. Generate RFQ and confirm PO with only the first product line and a set quantity
3. Once the PO has been confirmed, going back to the Purchase Agreement, the ordered quantities on both lines will be the same, although the PO was generated for only the first line.

opw-2627898

closes odoo/odoo#79322

X-original-commit: c09a16fb2483e8cec4c9c9e6a936ae2bcc490646
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2021-11-03 14:12:46 +00:00
Audric Onockx (auon) 5c09a8d9f7 [FIX] purchase : Account analytic default changed by user is reset in invoice
Reproduce :
1. Add a default analytical rule: if Coin Gourmand partner then Administrative analytical account
2. Create a PO at the Coin Gourmand supplier, add a product, and select the Internal analytical account.
3. Bill for this product.

Result :
Internal analytical account has disappeared from the invoice line. It has been replaced by Administrative.

Issue :
AccountMove.create() computes an account in the move and this causes the analytic account to be reset at its default value from the rule.

Fix :
Since the account pocalypse in 13.0, account.move is making magic things during the creation of the invoice to create dynamically the invoice lines like account.invoice did before this huge refactoring.
The create is making a 'New' record to simulate the onchange but this code is a hack triggering unexpected recomputation like the analytic account.
To avoid that, we ensure to assign the minimum number of fields to preserve fields like the analytic account.

closes odoo/odoo#79321

X-original-commit: 876e2d1073312fe65cb6b2e3038235aeaa082c8a
Related: odoo/enterprise#22074
Signed-off-by: Laurent Smet <las@openerp.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-11-03 13:26:55 +00:00
Nicolas Bayet bd8260b3f5 [FIX] web_editor: not showing toolbar in theme tab
In the website builder, the toolbar was appearing in the theme tab
incorrectly.

task-2664956

closes odoo/odoo#79311

X-original-commit: a2198490befddb8c4cc6f3a543f47bbffe243f64
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-03 12:38:59 +00:00
svs-odoo 03676ae11a [IMP] stock: orderpoint by date instead of time
Before this commit, the Replenishment orderpoints `qty_to_order` are
computed according to a precise forecast which take the time in count.
For example, if you plan a consumption for a product with a purchase
lead time of 2 days for the 2021-12-12 at 12:30, if the current date is
2021-12-10, the orderpoint for this product will have a quantity to
order once the hour is meet too but not before. With this commit, it
will take the forecast for the day regardless the time.

task-2652920

closes odoo/odoo#78712

Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-11-03 12:38:53 +00:00
Hubert Van de Walle (huvw) 957ae2b84a [FIX] web_editor: resize the codeview with the field_html resize handle
Steps to follow

  - Go to email templates
  - Select some text
  - Click on the code button
  - Resize the editor
  -> Nothing happens

Cause of the issue

  The default view of the editor is resized but not the code view

Solution

  Change the code view height with the default view

opw-2669259

closes odoo/odoo#79315

X-original-commit: 3adc1ddb04dfc0dcd3b10e56e9ecaef7b04a18d4
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2021-11-03 11:48:51 +00:00
luvi d304be57be [FIX] web: scrolling to anchor working badly
This commit fixes a bug when you clicked on a link related to an anchor.
e.g. an <a> tag with an href="#anchor". The scroll to the element
with id="anchor" didn't happen because the position was not found correctly.
The fix uses getBoundingCLientRect to get more precise positions
of the element with the anchor and the scrollable area.
A test is introduced to check scrolling for multiple anchors in a template
with a more complex structure (Note: the test fails without the fix).
The scroll behaves differently depending if the target is an anchor or
an element. An other test has been added for the command palette about this
behavior.

closes odoo/odoo#79310

X-original-commit: b0da44d62f85d6530f8e568025f7fea25c5454c5
Signed-off-by: FrancoisGe <fge@odoo.com>
2021-11-03 11:48:46 +00:00
Rémy Voet (ryv) 837e72fbfa [REM] base: remove unused code in translate.py
Remove unused code of translate.py file:
- remove unused trans_parse_rml method (since 3425752eac)
- remove unused in_modules method (since eb04aa1e39)
- remove unused ENGLISH_SMALL_WORDS set (since d85bf78976)
- remove unused node_pattern compiled regex (since 085e972e4a)

task-2678192

closes odoo/odoo#79011

Signed-off-by: Rémy Voet <ryv@odoo.com>
2021-11-03 11:06:18 +00:00
Hardik Prajapati 742b4954a2 [FIX] account: reposition tooltip indication
Currently, hovering on the tooltip displays some content out of
the viewport. It happens because tooltip content div requires
270px width to display the text and the distance between the
tour indicator and viewport is less than 270px

so this commit fixes the issue by changing the position of the tooltip
indicator from left to the top so that the tooltip indicator displays
top of the element and hovering on it displays the full content

TaskID-2667140

closes odoo/odoo#79129

X-original-commit: 219d4aa27fbae944af6e18216b7bb96277b3d06d
Related: odoo/enterprise#21946
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-03 10:05:47 +00:00
Adrien Widart 8728d1ec5f [FIX] mrp_account, sale_mrp: check if BoM line is correct
Suppose an automated AVCO product category. When confirming an invoice,
if the associated product was a kit and if its BoM has changed during
the process, a traceback can occur.

To reproduce the issue:
(Need sale_management)
1. Create a product category PC:
    - Costing Method: AVCO
    - Inventory Valuation: Automated
2. Create 3 products P1, P2, P3:
    - Product Type: Storable
    - Category: PC
3. Update P3's quantity > 0
4. Create two bills of materials:
    - BOM01:
        - Product: P1
        - BoM Type: Kit
        - Components: 1 x P2
    - BOM02:
        - Product: P2
        - BoM Type: Kit
        - Components: 1 x P3
5. Create a sale order SO with 1 x P1
6. Confirm SO and process the delivery
7. Edit BOM02:
    - BoM Type: Manufacture
8. On SO, create the invoice INV
9. Confirm INV

Error: an Odoo Server Error is displayed with a traceback: "[...] in
_compute_average_price, bom_line_data = bom_lines[bom_line] [...]
KeyError: mrp.bom.line(19,)"

On step 7, when changing the BoM type, a new BoM line is created.
Therefore, in `_compute_average_price`, the BoM associated to the move
(i.e., `bom_line`) is not one of the lines in `bom_lines` (i.e., the new
BoM lines). There is already a check in case the line has been deleted,
but not if it has been changed.

OPW-2610685

closes odoo/odoo#78917

closes odoo/odoo#79293

X-original-commit: 3ae0b781bcb5c2840f848bc63b9f3f9e1b2812cb
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-11-03 07:09:39 +00:00
Xavier BOL (xbo) d22c9a540f [FIX] sale_timesheet: avoid using timesheet_grid views
Before this commit, we search grid and form views defined in
`timesheet_grid` module but this module is not available in
`sale_timesheet`.

This commit removes the grid view and use the form view defined in
`hr_timesheet` module instead of `timesheet_grid`.

Steps to reproduce:
==================
1) Go to the project app
2) Select Project updates for a project with `allow_timesheets=True`
3) Click on "Billable Time" button.

Expected behavior:
=================

Open by default the list view of timesheets related to the project.

Actual behavior:
===============

Traceback when the user clicks on this button because it does not found
the grid and form view in `timesheet_grid` module.

task-2665899

closes #78120
closes #79034

closes odoo/odoo#79291

X-original-commit: 9fd8fbe1c778fc05ac9e1441356ac5d0673b9ffc
Related: odoo/enterprise#22056
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-02 16:59:57 +00:00
Xavier BOL (xbo) 2ca28bca34 [FIX] project_timesheet_holidays: take all leaves in given interval
Before this commit, we search the leaves in the same interval of the
public leaves.

This commit searches all leaves containing the public leave in their
interval to get all leaves and not create a timesheet for this public
leave for an employee is already off.

task-2665899

closes #79034

X-original-commit: ca6c164075d83e6bace2451888f8a2365b769e1a
Part-of: odoo/odoo#79291
2021-11-02 16:59:56 +00:00
Xavier BOL (xbo) c348d596a6 [FIX] sale_timesheet: ensure product is a service one for timesheets
Before this commit, since the adding of new field in `product.template`
model called `detailed_type` to define the detailed type of a product.
We need to update some domains to select a correct timesheet product.
That is, the timesheet product must be a service product and not an
event or event booth product.

This commit updates the domains in those fields:
- `timesheet_product_id` field defined in project (`project.project`).
- `sale_line_id` field defined in the `project.create.sale.order` model.
to be sure we select a service product (or SOL with service product
linked) for timesheets.

task-2642872

closes #79034

X-original-commit: b60bc724c197f101d71109d7b8fcdfe7cdc5b57a
Part-of: odoo/odoo#79291
2021-11-02 16:59:56 +00:00
Xavier BOL (xbo) 448fe8fce1 [FIX] sale_timesheet: change is_so_line_manually_edited only manually
Before this commit, when the user creates a timesheet in task form view,
the `_onchange_so_line` is triggered after the compute method of
`so_line`. This behavior is not expected because it break the employee
rate feature to correctly determine the SOL of a timesheet.

This commit deprecates the onchange method to avoid change the
`is_so_line_manually_edited` when the user has not manually selected an
SOL for the timesheet. Instead of changing the
`is_so_line_manually_edited` field in the onchange method, a new widget
is created to override the `_onFieldChanged` defined many2one widget.
This widget will be linked to the `so_line` field in the list and form
view of timesheet. So, when the user manually changes the `so_line`
field, the `_onFieldChanged` method changes the
`is_so_line_manually_changed` to notify that is the user is manually
changed the `so_line` field on a timesheet.

task-2665899

closes #79034

X-original-commit: 9b1bfe597167d1a849ef3df850300ae8ec673fd3
Part-of: odoo/odoo#79291
2021-11-02 16:59:56 +00:00
Xavier BOL (xbo) eb2ba319a1 [FIX] web: fix formatFloat when the value is null
Before this commit, when the value is null in the pivot view on a float
field, we format the value before displaying it. The problem is the
formatFloat method does not check if the value is null and used the
`toFixed` method to fixed the number of digits to display for the value.

This commit uses the value if it is not value otherwise use 0 to fixed
the number of digits. That is, when the value is null, the formatter
will return "0.00" (if the number of digits expected is 2) instead of
raise an error.

Steps to reproduce:
==================

1) Go to the helpdesk App > Reporting > Tickets Analysis.
2) Go to pivot view of this report.
3) Add the measure called "Rating (/5)"

Expected behaviour:
==================

Show the pivot with empty cells or 0.00 if the average of this measure
has no values.

Actual behaviour:
================

Traceback shown because it cannot read 'toFixed' property of null.

task-2665899

closes #79034

X-original-commit: d142705d9262dfa5fb489611ae0b5a2a04ff6fab
Part-of: odoo/odoo#79291
2021-11-02 16:59:55 +00:00
Thibault Libioulle 2a6650dc81 [FIX] project: copy display_project_id of subtasks
Prior to this commit, when a subtask is copied through the recurrence,
it loses its display_project_id in the copied sub-tasks.

Current Behavior

The display project id is left empty.

Expected Behavior

The display project id is copied.

task-2672243

closes odoo/odoo#79290

X-original-commit: 758b1a2f233bccd7fe7ac73119c12c4152d68e21
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-02 16:17:01 +00:00
Florian Damhaut b63c54da71 [FIX] product : Decimal Accuracy for Value Price Extra
Issue :
'Value Price Extra' cannot have the N-digit Decimal Accuracy configuration but 'Product Price' can.
Solve :
Added field_digits to views
opw-2674006

closes odoo/odoo#79285

X-original-commit: fb372fb6cc7b6b7a21709154eef40ff99d7f49c0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-11-02 15:07:02 +00:00
Kartik Chavda e62320f0c6 [FIX] project: fix copy functionality of project
Purpose of this commit to do not copy progress of the project
update when coping project.

So, In this commit make last_update_id field copy false
so default progress of the project update will be 0%.

task-2664773

closes odoo/odoo#79283

X-original-commit: 69dab41858ea737929591123e85f2f982f58589c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-02 15:06:57 +00:00
Jérôme Vanhaudenard d85c34e453 [FIX] l10n_fr_pos_cert: Ensure country set on company before opening POS
Before this fix, if the country is not set on the company
the loading of the session may stall at some point.

A check is added and will prevent to start a session if the country
is not set.

opw-2557989

closes odoo/odoo#79276

X-original-commit: 8c325324c0f476d77fec79cba0570b025114fc88
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2021-11-02 14:17:47 +00:00
Hubert Van de Walle (huvw) 706d2f01ae [FIX] web: basic_renderer: delay destroy after render when rerendering widget
Steps to follow

  Edit the account.move view (with studio for example)
  Set the lines readonly property to [["partner_id","=",False]]
  Create a new move
  Add a partner
  Add a product
  Remove the partner
  -> A traceback appears: widget.$el is undefined

Cause of the issue

  widget.$el is used after the widget has been destroyed

The fix was already present in 14.0 (3fd7b2009e)
but we still need to keep the test

opw-2557142

closes odoo/odoo#79261

X-original-commit: 71e6d7e510ff9d44fe8deb16f29d50b021709074
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2021-11-02 13:11:34 +00:00
Nasreddin Boulif (bon) c860a41706 [FIX] website_sale: search in website_description instead of description
Steps to reproduce :

  - Install E-commerce module
  - Go to Website -> Products -> Products
  - Edit product `Acoustic Bloc Screens`
  - Type "my product" in Internal Notes an save
  - Go to the Shop
  - In the search bar, type "my product"

Issue :

  `Acoustic Bloc Screens` is in the search results list

Cause :

  An 'ilike' for 'description' is added to the domain.

Solution :

  Replace 'description' by 'website_description' field in the domain.

opw-2649754

closes odoo/odoo#79004

Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2021-11-02 11:29:42 +00:00
Michael (mcm) df72d187e1 [IMP] web: add "unique" array utility function
This commit adds "unique" array utility function which
returns a copy of the given array but without any duplicates.

closes odoo/odoo#76472

Related: odoo/enterprise#20833
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-11-02 10:45:15 +00:00
Michael (mcm) 13686e0e19 [IMP] web: http service in webclient test helper
Before this commit, `setupWebClientServiceRegistry` didn't use
http service but some tests need it.

Part-of: odoo/odoo#76472
2021-11-02 10:45:15 +00:00
Michael (mcm) 5fef288cdb [IMP] web: tooling: whitelist web_map
Part-of: odoo/odoo#76472
2021-11-02 10:45:15 +00:00
Michael (mcm) d1c8a565ab [IMP] web: add pager to new framework
Before this commit, Pager was not implemented in the new framework.

Part-of: odoo/odoo#76472
2021-11-02 10:45:14 +00:00
Michael (mcm) 3ef8083dcb [FIX] web: autofocus conditional element
Before this commit, useAutofocus hook used the effect dependency
to check if the target is in dom but this dependency is computed
in onWillPatch and can be outdated when checking it in onPatched.

Now, the target isn't a dependency anymore and is computed just
before the check.

Part-of: odoo/odoo#76472
2021-11-02 10:45:14 +00:00
Florent de Labarre 2997249ff0 [FIX] point_of_sale: impossible to close session
- Open session with cash control
- Set 300 €
- Close session
- Add Cash 50€
- Close session
- Set end Cash at 350 €

--> It raise an error

closes odoo/odoo#79240

X-original-commit: 3be9a02b8824356d97d442b64f2cbd66085254ea
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-02 09:58:58 +00:00
qsm-odoo 41d9546061 [FIX] web_editor: add perf. optimization when toggling editor options
This allows to avoid tens of thousands of instructions being done at
each click in the editor.

At multiple places, the editor is asked to close all its widgets (for
example, when clicking on another snippet to edit). The original cost
of that action was to remove a class on each widget, which is a very
primitive action. But in the end we had to do more to close a widget: we
trigger_up an event and ask to close all sub widgets. When we ask the
editor to close all widgets... it makes sense not letting every sub
button of every select trigger_up an event.

closes odoo/odoo#79220

X-original-commit: 7aaf0e17f9c3d4e78b975dbd3747513d186ccc1e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-11-02 09:58:51 +00:00
roen-odoo 1281b5be2a [FIX] stock : Missleading help message
WO are released in confirmed state, but the help message says that they are released in draft.

opw-2609040

closes odoo/odoo#78954

X-original-commit: 3244944d0b6ccf7d18d8bb852183d14282674097
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-11-02 09:12:45 +00:00
Kartik Chavda d2b6304a32 [IMP] hr_timesheet: improve generic usage
Purpose of this commit to improve ux for timesheet app.

So, In this commit done following changes:

- make name field of account.analytic.line model translatable
  by user.
- changes in report of timesheet:
  - make generic table templete for timesheet.
  - changes label for employee_id field column 'responsible'
    into 'employee' and unit_amount field column
    'time spent (hours)' into 'hours spent' and
    'time spent (days)' into 'days spent'.
  - move name(description) field column right of the task
    column.
  - add timesheet entry report for project.
- change internal project name when user has access to
  multiple companies.

TaskId-2604773

closes odoo/odoo#75141

Related: odoo/enterprise#20242
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-02 08:29:35 +00:00
Nicolas Lempereur 0c5974dff0 [FIX] mail: progress bar if from parameters
If there was parameters in the from clause, there was a possible error
when reading progress bar for activities.

eg. grouping product.product by "Routes" raise an error because we have
in FORM clause like:

    FROM … ON … AND "product_template__route_ids"."route_id" IN
    (SELECT … WHERE … OR ("stock_location_route"."company_id" in %s))

so when we add timezone to parameters, it should be after FROM clause
parameters and before WHERE clause parameters.

opw-2674179

closes odoo/odoo#78867

X-original-commit: 904d0aab204b0ce40d7bc284086c33cbde6f06d8
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-02 07:40:59 +00:00
Olivier Dony 3cbc0915bb [FIX] web: expect explicit sign up parameters
Using an explicit list of sign up parameters will avoid
polluting the context with unrelated values, and make
debugging easier.
2021-10-02 15:04:53 +02:00
Martin Trigaux 8ae1a43663 [FIX] base: correct evaluation context for report rendering
Fix of 57665a02f7b4 which was problematic in point_of_sale
2021-01-19 11:09:41 +01:00
Sébastien Theys 94d9a31018 [FIX] mail: fixup of 8af59b95b477b
task-2388659
2021-08-26 15:40:31 +02:00
qsm-odoo 95ca988113 [FIX] website: fix video loading
task-2376327
2021-07-16 11:26:38 +02:00
Adrian Torres ed6595ed15 [FIX] base: prevent messing up existing registry 2021-04-08 08:20:03 +02:00
Christophe Simonis b81850a123 [IMP] core: large object support 2021-04-20 11:40:02 +02:00
Xavier Morel b51b094c2b [IMP] http: avoid cycle on request 2021-01-26 09:05:35 +01:00
Yannick Tivisse a7e99e261f [FIX] ir_demo.py: Force admin access to load demo data
Only admin users should be able to load demo data, if needed.

This is only possible from the settings dashboard, and thus,
the method could be decorated.

See: c002e2eb37
2021-09-20 13:01:55 +02:00
luvi 8e09f540d0 [IMP] web: clamp util and touch event helper
This commit adds touch events helper for tests and new util used
to constrain a number between two values. The purpose of
the commit is to introduce the ActionSwiper component using those
functionnalities.

closes odoo/odoo#78426

Related: odoo/enterprise#21712
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-29 17:20:06 +00:00
Anh Thao Pham (pta) 5e3f143f1c [FIX] web_editor: prevent editing document in iframe with cross-origin access issue
- Go to Email Marketing
- Create a new mailing with template having social media links
- Save
- Click on one of the social links
An error is triggered:
"Error: Blocked a frame with origin xxx from accessing a cross-origin frame."

The traceback occurs because we try to change the content of something we
don't have access to, as these sites prevent display in an iframe.

opw-2599540

closes odoo/odoo#79208

X-original-commit: 9702e541f27616a5249a140878d028335a0b3775
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-10-29 16:05:30 +00:00
Didier (did) 1afcc9c368 [IMP] bus, mail, *: improve longpolling bus notification format
* = auth_signup, calendar, im_livechat, snailmail_account, survey, test_mail,
    web_editor, website_crm_iap_reveal, website_livechat

The aim of this PR is to improve/fix various flaws and limitation of the current
API, to make it easier to use and more efficient.

Notification are now defined with 3 distinct parts:

- the channel determines which client(s) should receive it
- the type determines how it should be handled
- the payload determines any extra information helpful for handling it

Channel
=======

Business code
-------------

- Record channel is introduced for ease of subscribing to and sending
  notifications to specific partners, channels, documents, ...
- String channel is still supported (but it is converted internally to the tuple
  channel).
- Tuple channel is still supported without any change (but should be avoided
  whenever possible due to its complex syntax).

The channel is no longer sent to the client. When the channel was used for
business purpose, the information it contained has been moved into either the
new type, or the payload itself.

Technical note
--------------

All channels are now internally converted to the tuple (db, ...) channel, which
is necessary for the platform code (saas/sh).

Internally, the bus.bus table is not changed, type and payload are grouped
together into what was (and still is) called message.

Type
====

Type is introduced to uniformize the way notifications are sent and handled.
All existing notifications already had some kind of manually-built type in them.
This is now officially supported at the bus API.

In client code this will allow (to be done in future commits) to register one
handler per specific type, instead of having to iterate and to filter all
received notifications on every handler.

Payload
=======

Payload (ex message) did not change, it can still be anything depending on
business needs.

Few adaptations:
- When the type was included on the payload, the type has been moved to the new
  type parameter.
- When the channel was used in business code, its data has been copied into the
  payload.

task-1891151

closes odoo/odoo#79201

X-original-commit: 543af27c7d6836ffac9e80ff8490b6ddbd849221
Related: odoo/enterprise#21998
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-29 16:05:23 +00:00
Paolo (pgi) fe7ed6627d [FIX] base: invalid UNIQUE constraint just warn
When a submodule overrides an old UNIQUE constraint with a new one,
records in that module may respect the new one and not the old one.
As the old module is updated, it would fail giving an ERROR message,
and therefore blocking the Odoo.sh deployment pipeline.

i.e. website_sale (old): res_users_login_key -> ['login', 'website_id']
             base (new): res_users_login_key -> ['login']

With this patch, the error level is changed from ERROR to WARNING,
leaving Odoo.sh free to continue the build deployment, as the error
was not a blocking one.

closes odoo/odoo#79199

X-original-commit: 8ed3641f81502d3a7e9c9bb93771c6f5601a31a9
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2021-10-29 14:07:47 +00:00