Commit Graph
135360 Commits
Author SHA1 Message Date
Laurent Smet 5a99ddf88b [IMP] account: Improve testing class for account_reports
closes odoo/odoo#44493

Related: odoo/enterprise#8114
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-04-15 17:25:39 +00:00
jvm-odoo 65b798b461 [FIX] web_editor: fix video widget allow fullscreen
Issue

	- Install Website
	- Go on your website
	- Add Media & Text
	- Replace media by video
	- Add youtube URL
	- Save
	- Play the video

	The fullscreen button is disabled

Cause

	We do not allow fullscreen on the iframe

Solution

	Allow fullscreen, it is already done for the preview

OPW-2224696

closes odoo/odoo#49616

X-original-commit: e608a3feed35801c51c8ce7e251ccffa2ca9dc46
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-04-15 17:18:18 +00:00
Benjamin Vray 6cd8ef2024 [FIX] website: fix wrong z-index on the header
Remove the z-index = 1 for the header because it introduces visuals
bugs where certain elements are displayed at the top of the header when
should be displayed under. Example:  search button in events page.

task-2229057

closes odoo/odoo#49612

X-original-commit: e5a5b7f454befd9059f88dbd4f31a76e43e0eb77
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-15 16:34:13 +00:00
william 387ee3e05a [FIX] account: account type selection in list view
The custom selection widget was only used in the form.
A small rework had to be done to make it work in list views because the
values were not pre loaded.

closes odoo/odoo#49604

X-original-commit: cf942e6df3bf065e299d8ad0dcfd8ed2cc66b29c
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-04-15 15:14:02 +00:00
Csaba Tóth dff06e82b3 [FIX] account.invoice: leftovers of the state / invoice_payment_state
refactoring

this fixes bugs introduced by
https://github.com/odoo/odoo/commit/beaa30a3d1843de43a45f419bfbc1bfa7613a920

in saas-13.2, the field invoice_payment_state was renamed into payment_state by
https://github.com/odoo/odoo/commit/8e4158af810bcf475214946fa64d3b0ce4d3b26d

in saas-13.4, the feature post_at of journal have been removed by
https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074

closes odoo/odoo#49569

X-original-commit: 2001c413ee142c50ca6549cd5dff9fc0f9f1637b
Signed-off-by: Csaba Tóth <csaba.toth@i3rendszerhaz.hu>
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-04-15 13:35:16 +00:00
william a6026eb71d [FIX] account: default account in form
The default account was never set when adding a new line because the key
was missing from overriden context

closes odoo/odoo#49583

X-original-commit: a0f0b5e4f3e569e6bb217c1243a705e180970219
Signed-off-by: wan <william-andre@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-04-15 11:13:49 +00:00
Adrien Horgnies 729fb763c7 [FIX] l10n_fr: fix intra com, extra com taxes and fiscal positions
1. merge intra community taxes (one taxe with two report lines instead of two taxes with one report line each)
2. fix "tva à l'encaissement" fiscal position mapping (two rates were using the same xml_id)
3. add outside EU import taxes

closes odoo/odoo#49552

X-original-commit: a5ddba34cc336e380f98c36ac4737ab97043eb76
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Adrien Horgnies <AdrienHorgnies@users.noreply.github.com>
2020-04-14 14:31:21 +00:00
Odoo's Mergebot 5b4ebd63a8 [IMP] partner_autocomplete,crm_*: unify displayed "clearbit" information
PURPOSE

We make multiple calls to the clearbit API and the returned information are
shown in various different templates, although they contain the same
information.

The purpose of this commit is to unify the templates into a single one to
reduce code size and improve coherence.

SPECIFICATIONS

Currently, we have 3 ways of reaching out to the IAP clearbit api:
- When creating a partner (autocomplete service)
- When enriching an existing lead based on its email address
- When generating leads using the "Geneate Leads" button or using the website
  visitors

Every time we use the service, we log a note in the model's chatter containing
all the information returned by the cleabit service (estimated annual revenue,
media links, sector, ...).

Though using different endpoints and methods, all the calls essentially return
the same data, and the templates could be unified for consistency.

This is the goal of this commit.

We merge the 3 separate templates of each modules into a unique template that
always renders the same information to the end user.

To do that, we had to find a common module to store the template, we chose
"partner_autocomplete" as it's installed anyway as soon as "crm_iap_lead_*" is
installed.

LINKS

PR #40349
Task 2081471

Related: odoo/upgrade#775
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-15 09:59:36 +02:00
Aurélien Warnon 66cd5dc3c5 [IMP] crm_iap_lead: use first email from lead mining instead of all
When a lead is generated from the lead mining request, we use all the returned
email addresses to populate the 'email_from' of the lead (joined with ',').

This is inconvenient because it adds a lot of noise on a lead that is supposed
to be nicely enriched and also prevents from sending emails through the chatter
easily.

This commit changes the behavior to only use the first returned email to
populate the 'email_from' field.
All other emails will still be available on the chatter post that contains the
detailed lead information.

This is the case for leads generated through the "Generate Leads" button but
also for leads generated through the website (using rules).

PR #40349
Task 2081471
2020-04-15 07:37:51 +00:00
Aurélien Warnon 342ab37835 [IMP] crm_iap_lead_enrich: ease testing for the enrich service
Testing the enrich service was not possible since the endpoint was hardcoded.
This commit introduces a config parameter that allows overriding it.

Done in preparation of task 2081471.

PR #40349
Task 2081471
2020-04-15 07:37:48 +00:00
Aurélien Warnon 9620721884 [IMP] partner_autocomplete,crm_*: unify displayed "clearbit" information
PURPOSE

We make multiple calls to the clearbit API and the returned information are
shown in various different templates, although they contain the same
information.

The purpose of this commit is to unify the templates into a single one to
reduce code size and improve coherence.

SPECIFICATIONS

Currently, we have 3 ways of reaching out to the IAP clearbit api:
- When creating a partner (autocomplete service)
- When enriching an existing lead based on its email address
- When generating leads using the "Geneate Leads" button or using the website
  visitors

Every time we use the service, we log a note in the model's chatter containing
all the information returned by the cleabit service (estimated annual revenue,
media links, sector, ...).

Though using different endpoints and methods, all the calls essentially return
the same data, and the templates could be unified for consistency.

This is the goal of this commit.

We merge the 3 separate templates of each modules into a unique template that
always renders the same information to the end user.

To do that, we had to find a common module to store the template, we chose
"partner_autocomplete" as it's installed anyway as soon as "crm_iap_lead_*" is
installed.

LINKS

PR #40349
Upgrade PR odoo/upgrade#775
Task 2081471
2020-04-15 07:37:43 +00:00
Nicolas Martinelli 15b5b5f518 [FIX] mrp: decoration precision
1. Set Decimal Accuracy of "Product Unit of Measure" to 6
2. Create new Unit of measure: "Thousand(s) of units", with ratio 1000.0
3. Set accuracy for Unit(s), Thousand(s) of units, kg to 0.000001
4. Create two products: "parent" (UoM: Thousand(s)) and "child" (UoM: kg)
5. Create Bill of material: parent needs 0.12 of child
6. Add 10000 of child product to stock
7. Create manufacturing order for 100.123456 of parent product.
8. Click "Produce".

The decoration of the lines is incorrect.

This happens because of Float representation at the JavaScript level,
leading to comparison such as:

`12.014999...8 < 12.015000`

It's not possible to use some kind of rounded comparison. As a
workaround, we change the way the float are compared.

opw-2234824

closes odoo/odoo#49559

X-original-commit: f62c2b33fe834defb2c39988f3c9e90047a56d2c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-14 15:54:17 +00:00
Nicolas Martinelli e3a171e34f [FIX] base: default signature
Set a default email signature to an empty string to avoid `False` when
evaluating `${user.signature | safe}` in email templates.

opw-2229846

closes odoo/odoo#49558

X-original-commit: 96f46fba2635d8050aef03c7d4744a87ac8a597e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-14 15:43:10 +00:00
Andrea Grazioso (agr-odoo) 3101feb494 [FIX] stock: bypass permission check after settings change
Install Accounting(account_accountant), Inventory (stock)
1. Create a new user [DEMO] with the next access:
- Accounting: Advisor
- Administration: Settings
2. With the user [DEMO] , go to Accounting>Configuration>Settings
and change any value.
3. Try to save the settings.

Access error will occur "Sorry, you are not allowed to modify documents
of type 'Picking Type' (stock.picking.type)..."
This occur because when stock is installed an override in 'execute' make
the backend check for multi locations, packaging or tracking settings
and activate show_operation on stock.picking.type causing the access
error for unprivileged users
Calling the write with sudo solve the issue

opw-2233193

closes odoo/odoo#49555

X-original-commit: f560a9966dfbbacb259f0de74437743d1385d8a6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-14 15:12:44 +00:00
Laurent Smet 7076b4f4d0 [REF] account: Split big files account.py & account_view.xml
closes odoo/odoo#49422

Related: odoo/upgrade#1068
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-04-14 06:54:14 +00:00
alt-odoo c3379312d9 [FIX] base_vat: no vat check if multiple countries
We should only check the consistency between the vat number and country code in
case we have one country involved in the recordset.

closes odoo/odoo#49530

X-original-commit: 23771ef7fcadfc0022d278c2e3436a7befc9e5b8
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-14 12:17:20 +00:00
Lucas Perais (lpe) 2ff76674d2 [FIX] web: style attachment company specific always in bytes
Following https://github.com/odoo/odoo/pull/44393

Delete the qweb template `web.styles_company_report`
Recompute company specific style by going into
Settings > Configure Document Layout > change stuff and save
Print a report, in HTML to get an human readable error
(PDF rendering would just ignore the error)

Before this commit, there was an error "could not get asset content"
This was because the css asset created in db had a value of type string
whereas it should have been the same type as b64encode (which is byte-like)

After this commit, there is no error at rendering time

closes #49456

closes odoo/odoo#49529

X-original-commit: 2a7e06663c1281f0cf75f72fc491bc2cc39ef81c
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-04-14 12:17:00 +00:00
Goffin Simon f5ece86e53 [FIX] l10n_fr: Wrong account on TVA à l'encaissement (achat)
For all the purchase cash basis taxes:

The account 445800 must be used as cash_basis_transition_account_id

The account 445660 must be used in distribution of the tax

Wrong minus_report_line_ids and plus_report_line_ids were set for these taxes

opw:2230288

closes odoo/odoo#49527

X-original-commit: 12d98b3ed80ea57831a4aca5089adac0ad5b9408
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-04-14 12:13:39 +00:00
Nicolas Martinelli 414a0bac5a [FIX] mrp: partial production using all components
- Create a product P using one component C
- The BOM is flexible
- Create a MO for 10 units
- Product 9 units, but use all components
- Post the inventory

The MO is considered as done, while it should remain in progress.

This happens because the MO state is computed based on the move raw
state. In this case, it should compare the quantity produced and the
quantity to produce.

The material availability is set to `False`.

opw-2220855

closes odoo/odoo#49247

closes odoo/odoo#49526

X-original-commit: dd7ef482a1c41f271b133fbfcc3d389d16677da1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-14 12:00:59 +00:00
Nicolas Martinelli 9640003b5c [FIX] stock: avoid crash of _get_relevant_state_among_moves
Avoid crashing if no relevant move is found.

X-original-commit: fee99ff5d3db559081240dfca4b0809dde331ce0
2020-04-14 12:00:58 +00:00
Michael Mattiello (mcm) 71f2f06c61 [FIX] web: render component in kanban
This commit fixes the kanban view to render components.
Before this commit, when rendering a component an error was thrown.

closes odoo/odoo#49525

X-original-commit: 29c18b53af26752079a49e4ece2419f62f680b5d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-14 11:58:53 +00:00
Odoo's Mergebot b3fe907be8 [MERGE] crm, sales_team: lint modules and clean tests to prepare sales team enhancements
PURPOSE

Prepare enhancements of sales team membership.

SPECIFICATIONS

Lint crm data and demo, notably about sales team and file organization.
Also move crm menu entries declaration in a single file and remove some
menu entries not imported anymore.

Lint sales_team module. Linting containing

  * reorder fields according to their use;
  * order methods according to guidelines (compute, CRUD, actions, tools);
  * fix some docstrings and typos;
  * remove unused imports and dead code;
  * rename files according to guidelines;
  * move views in their own file for mail.activity and assets;
  * correctly name data and demo files;
  * rename some inner methods to ease understanding;

Clean sales team tests and extract common test data from crm

LINKS

Task ID 2086889 (sales team enhancements)
Task ID 2234698 (preparation lint)
Community PR #49520

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-14 14:33:22 +02:00
Thibault Delavallée 2d0db1a0bf [IMP] sales_team, crm: clean sales team tests and extract common test data from crm
PURPOSE

Prepare enhancements of sales team membership.

SPECIFICATIONS

Purpose of this commit is to prepare modifications in sales team management
notably by cleaning sales team tests. We also move some data preparation in
sales team. It allows to rely on some common data while doing sales team
then crm tests.

LINKS

Task ID 2086889 (sales team enhancements)
Task ID 2234698 (preparation lint)
Community PR odoo/odoo#49520
2020-04-14 11:53:16 +00:00
Thibault Delavallée 150095ebc7 [IMP] sales_team: lint module
PURPOSE

Prepare enhancements of sales team membership.

SPECIFICATIONS

Linting containing

  * reorder fields according to their use;
  * order methods according to guidelines (compute, CRUD, actions, tools);
  * fix some docstrings and typos;
  * remove unused imports and dead code;
  * rename files according to guidelines;
  * move views in their own file for mail.activity and assets;
  * correctly name data and demo files;
  * rename some inner methods to ease understanding;

LINKS

Task ID 2086889 (sales team enhancements)
Task ID 2234698 (preparation lint)
Community PR odoo/odoo#49520
2020-04-14 11:53:08 +00:00
Thibault Delavallée bc86d8c57d [IMP] crm: lint data and menu entries
PURPOSE

Prepare enhancements of sales team membership.

SPECIFICATIONS

Lint crm data and demo, notably about sales team and file organization.
Also move crm menu entries declaration in a single file and remove some
menu entries not imported anymore.

LINKS

Task ID 2086889 (sales team enhancements)
Task ID 2234698 (preparation lint)
Community PR odoo/odoo#49520
2020-04-14 11:52:46 +00:00
Nicolas Martinelli c54126aee5 [FIX] stock: compute quantity_done in onchange
When computing `quantity_done` in an onchange, `move.id` is a `NewId`,
not an `int`. However, the `read_group` call returns regular integers
for `move_id`.

Consequently, `rec.get(move.id, [])` is an empty list.

closes odoo/odoo#49495

X-original-commit: 2ce1ed31a9c1ec7a7467983a040e4a056f8f4e69
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-14 09:20:33 +00:00
Damien Bouvy 256c75baf7 [IMP] web: add a <Popover> component
Using bootstrap popover with owl is possible, but with a lot of
friction.

This commit adds a Popover element to ease developments that require
a popover. This component takes 2 props:
  - position='bottom' (optional): 'top', 'bottom', 'left', 'right'
  - title (optional)

Its usage requires setting an `opened` slot for the content of the
popover, whilst the 'trigger' of the popover uses the default slot.

E.g.
```xml
<Parent>
 <Popover>
  <t t-set="opened">
   <p>You have opened the popover, congratulations!</p>
   <button t-on-click='_handlerOnParent'>Dispatch cake</button>
  </t>
  <button class="btn btn-primary">Click me!</button>
 </Popover>
</Parent>
```

Note that:
- only one popover can be opened at a time (opening a popover will
close any previously opened popover)
- `Popover` uses `Portal` under the hood, so events are propagated
correctly even though the popover is teleported elsewhere in the dom
(see example in this commit message with `_handlerOnParent`)
- `<Popover>` is registed as a global component in QWeb and does not
need to be added to a Component's subcomponents list

closes odoo/odoo#47710

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-04-14 11:59:04 +00:00
std-odoo d599a05736 [FIX] website_blog: fix the share content popover widget
Bug
===
We can not share a text with the "share content popover" widget
if the text contains a single quote (').

Task-2223641

closes odoo/odoo#49515

X-original-commit: 58cba0f3139d8ac8fe561aac88af2a79a2703d50
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-14 11:29:58 +00:00
Tiffany Chang (tic) 306f6423f3 [FIX] mrp: customize unbuild form via manufacturing order
When unbuilding a manufacturing order, there are fields in the default
unbuild form that do not make sense to show (i.e. they already
correspond to the manufacturing order that is triggering the unbuild).
Therefore we make a simplified version of this form that is better
suited for a button generated window.

This change includes removing the resetting of 'location_id' and
'location_dest_id' when they correspond to the 'company_id' by onchange
function since this would overwrite any 'default_location_id' and
'location_dest_id' values when calling the view + this seemed like it
would be annoying if someone clicks on the same 'company_id' within the
dropdown and their location values changed.

closes odoo/odoo#49514

Task: 2234872
X-original-commit: d23341a5b4cb82f4a96b55464dec32dc28ce4351
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-04-14 11:24:48 +00:00
Nasreddin (bon) afe40caf68 [IMP] purchase, purchase_stock: add an onboarding tour
Improve onboarding and guide first clicks of users in the purchase application
to create a purchase order.

In case Stock module is installed, it will also guide the users
through the receipt first clicks process.

Task ID 2219988

closes odoo/odoo#49031

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-14 11:33:40 +00:00
Tiffany Chang (tic) 3768912947 [IMP] Improve purchase KPIs UX
Minor improvements/fixes:
- Prevent overlap of 'o_view_nocontent' (when there are no relevant
  records) with kpis table in list/kanban views on small screens/windows.
- Create separate list views to prevent kpis table appearing in
  appropriate situations (e.g. action windows showing linkages between
  purchase orders and other models.)
- Override bootstrap styling that was making kpi table wider than the
  width of the window in list view.

closes odoo/odoo#49509

Task: 2228175
X-original-commit: ee831f7aff400f76e20e54b7cb9b5610bcec4839
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-04-14 10:57:18 +00:00
Thibault Delavallée d53150dd6f [FIX] project: fix ACLs tests
Currently there are some issues wiht ACLs tests, notably transaction errors
due to new_test_user helper tool. Standard new_test_user tool allows to speedup
user creation in tests. It may cause issues if reset password is involved as
there is a savepoint done. Mail has an improved helper allowing to avoid that.

Also tests were actually not working due to cache being invalid. First fix
allowed to spot it and this is fixed now.

Followup of 7059b177ee .

Closes PR #49485

closes odoo/odoo#49504

X-original-commit: 2c766fa8b66c4e05d373ae550a2d43fa2500616c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-14 10:15:07 +00:00
Thibault Delavallée 6b916937c8 [FIX] payment_sips: propagate environment -> state variable renaming
Some bits of code still use old variable.

Task ID 2237300
Closes PR #49462

closes odoo/odoo#49501

X-original-commit: 4d402e94cb18cf5cc7e89ba9a9c305d02542a7f9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-14 10:06:21 +00:00
Nicolas Martinelli fe1d946887 [FIX] account: check entry at posting
External addons (such as the POS) can create entries and end up
bypassing the `_check_balanced` in the whole process.

We force a check at posting, since at this point there is no reason to
have an unbalanced entry anymore.

opw-2168096

closes odoo/odoo#49489

X-original-commit: 88902e2d3953a311dfb3629daeebf22b8874b6e9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-14 10:31:47 +00:00
Pratima Gupta 55b8207b34 [FIX] mrp: set default company for stock production lot
Before this, unable to quick create production lot from
produce wizard in components, as default company was not
set correctly.

Fixes-2234784

closes odoo/odoo#49455

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-04-13 09:16:25 +00:00
Damien Bouvy d007b6a6d6 [FIX] sale: correct dependency for SO line currency
Ensure that the currency of a line always matches the currency of its
order; indeed, with the previous depends, changing the currency of an
order (through its pricelist) would not trigger the recompute of the SO
line's currency.

Was initially fixed in 2dfc0ea8c then reverted at 34e679598 for breaking
a test. I'd rather have the fix and adapt the test though, since this
breaks excpected relations.

Closes #48156

closes odoo/odoo#49491

X-original-commit: 36383d69802503606125f63d7641d4e733908b60
Related: odoo/enterprise#9844
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-04-14 08:58:48 +00:00
Dhruv Patel dafba22a6c [FIX] web,mail: many2many_tags_email: increase limit
A long time ago, commit [1] increased the limit of displayed badges
inside a many2many_tags widget, from 40 to 1000 (a large limit that
should never been reached with such a widget).

However, this solution was specific to the many2many_tags widget,
and didn't apply to its extensions (like the many2many_tags_email
widget). For instance, open the chatter full composer, add 40
partners in the recipients field and try to add one more: nothing
happens.

This commit sets the limit on the widget itself. That way,
extensions automatically have the same limit, and can override it
if needed.

[1] d4cf4374d1

Task : 2091027

closes odoo/odoo#49488

X-original-commit: 02e41f1131b4ea3ad977cc241a3d447c37195f6e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-14 08:47:15 +00:00
clementmbr c5cf9e9e5e [CLA] Update Akretion - Add clementmbr
closes odoo/odoo#49487

X-original-commit: 8ba9507070c262d137115f475cda9e046bbb1cb8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-04-14 08:46:02 +00:00
Tonow-c2candDamien Bouvy 2038ff2f26 [FIX] sale: change the date to isoformat to be serializable
Avoid posting message if we are still on the same date

closes odoo/odoo#49486

X-original-commit: 5bd98159878501a8d1d3af336c1f895ed342268e
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Co-authored-by: Damien Bouvy <dbo@odoo.com>
2020-04-14 08:44:38 +00:00
Payam Yasaie de322086eb [CLA] signature for Yasaie
closes odoo/odoo#49481

X-original-commit: 1a0efff25d22f5ee973553ff4b0c15b58baf2577
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-04-14 08:33:34 +00:00
Okan SUMER (osu)andqsm-odoo a34cd7c662 [IMP] web_tour: add a scroll indicator + input event for contenteditable
This commit places a tip to indicate the user to scroll when the anchor
is out of viewport.

Also now allow to wait that the user types on his keyboard before
consuming a step when text modification is required on a contenteditable
element.

Part of https://github.com/odoo/odoo/pull/48678
task-2228694

closes odoo/odoo#48678

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-04-14 08:29:56 +00:00
qsm-odoo 88e115b480 [FIX] web_tour: add dom untracked modifications rules
This commit adds some untracked modifications rules that ignore
these DOM modifications:

- Ignore when the class "o_tooltip_parent" is added or removed (will
  be important with the next commit)

- Ignore when the ID of an element changes (normally never in Odoo
  codebase (at least not alongside other changes), but jQuery uses
  ID modification for some performance improvements).

This is required to avoid loops in the update system (the
o_tooltip_parent class is added, thus we update tips, which search the
DOM so jQuery changes IDs, thus we update tips, which ...). Previously,
this already occured but less frequently than it is about to be
with future tips improvements.

To be able to do that change, the system had to be reviewed. Indeed,
the DOM mutation observer was debounced thus leading to considering a
very small portion of DOM mutation. As we now have to check the addition
or removal of a specific class or ID, we have to consider them all. In
fact, it worked by chance before... this occured:

1) The user clicks on something, the UI is updated -> DOM mutation
2) The code uses jQuery so a strange ID update is done -> DOM mutation
3) As the observer is debounced, we only see (2), which was not an
   ignored DOM mutation -> we update the tips.

Now that (2) is an ignored DOM mutation, if we still debounce, (3) will
not update the tips while it should have because of (1). In fact, this
could theoratically break already: if (2) is a tip update for some
reason, (1) will be forgotten in the current codebase.

Instead of debouncing we now register all DOM mutations and process
them in a debounced way. So if I receive 3949 mutations over half a
second, I will save them all but only start processing them once I am
not receiving some anymore. And most of the time, only a couple of
processing is needed to know that a tracked DOM mutation occured, which
thus needs to lead to a tip update.

Part of https://github.com/odoo/odoo/pull/48678
task-2228694
2020-04-14 08:29:56 +00:00
Okan SUMER (osu) 4ce1340f4f [FIX] web_tour: fix tip ideal location
This commit adds the case where the overflow of an anchor ancestor is
'hidden auto' and not only 'hidden'.

Part of https://github.com/odoo/odoo/pull/48678
task-2228694
2020-04-14 08:29:56 +00:00
qsm-odoo b30b591e35 [FIX] web_tour: toggle tip opening/closing in a more robust way
A system was implemented to not close/open a tip if the user
leaves/enters the anchor and immediatly re-enters/re-leaves it but that
system was broken at some point.

This commit restores it.

Part of https://github.com/odoo/odoo/pull/48678
task-2228694
2020-04-14 08:29:56 +00:00
Pratima Gupta d7a336b4dd [FIX] purchase: unable to add notes/section PO Line
In compute method _compute_expected_date() all PO lines
are processed to get expected date, but in note and section
line we dont have date_planned, it generates error. filtered
the PO line to process if only they are not having display_type.

Fixes-2234053

closes odoo/odoo#49433

X-original-commit: 2163c6a05476ddfbf899e46eac565b7f5cc5f46e
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-04-10 15:41:14 +00:00
jerome hanke (jhk) 43a2f2051b [FIX] web: css border is consistent on layout external boxed
Steps to reproduce:
- install timesheet
- go to general settings > set documents layout to use 'external_layout_boxed'
- go to timesheets > list view > select all > print > timesheet entries

Previous behavior:
the first line of the report's table is missing a border

Current behavior:
borders are consistent

opw-2230710

closes odoo/odoo#49432

X-original-commit: a70437c0fc8127976ce00b5ec1ef4ae006b28e15
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-04-10 15:18:40 +00:00
Xavier Morel bfcda158fe [FIX] core: logging of arguments remoteobjects
odoo/odoo#46024 improved the serialisation of arrays being logged (in
order to get more relevant data than just `Array(5)`.

However, chrome apparently serialises *argument* objects as array-like
with a few nits, namely that arguments have non-numeric properties
which don't necessarily have a value associated with them.

The array formatter / converter assumed all properties had a value,
resulting in the process crashing rather dramatically.

Filter out non-numeric properties on arrays.

closes odoo/odoo#49418

X-original-commit: 5ff1e41c98f042fd13a1762977cc76604231dfd4
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-10 12:55:09 +00:00
Andrea Grazioso (agr-odoo) c1c3764ec3 [FIX] stock_account: avoid traceback on quantity zero
1. Install PoS and Accounting
2. In a product category activate the Inventory Valuation automated
3. Sell a quantity 0 of such product via POS

Traceback will occur when confirming the sale because the inventory
valuation do not handle zero quantity

opw-2206625

closes odoo/odoo#49417

X-original-commit: d501ddd1e80bc4e3ff90cd9b34eb43c27e55ff97
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-10 12:54:00 +00:00
Nicolas Martinelli 0a1ed9be1e [FIX] stock: SN generation
The generation of SN is incorrect with the following initial sequence:
`BAV023B00001S00001`.
Indeed, the sequence generated is: `BAV023B00001S`, `BAV023B00002S`.

This occurs because the same digits `00001` appear more than once.

opw-2230913

closes odoo/odoo#49408

X-original-commit: b3369bc230160d6cafec77eed0e756c6f1c576d9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-10 12:16:26 +00:00
Pratima Gupta d71d074082 [FIX] mrp: check availability button should be visible
Before this commit, check availability button was becoming
hidden, even if move is partially available on MO.
Fixed it.

Fixes-2234494

closes odoo/odoo#49381

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-04-10 09:23:36 +00:00