Commit Graph
133419 Commits
Author SHA1 Message Date
Yannick Vaucher e6f0cc0d44 [FIX] account: Trim all space chars in reconciliation match
PostgresSQL TRIM function does not trim line return and other space characters
that are not white space.

For references having a non trimmed character regexp_split_to_array would create an array
with an empty element. Such element could be matched to a counterpart with no numerics in
the reference.

TRIM(' \n001') => '\n001'
regexp_split_to_array('\n001') => {"", "001"}

By replacing the TRIM function by a substring using a regexp we
also remove the other space characters such as tab and line return.

closes odoo/odoo#44026

X-original-commit: 93f63c331781179fc6b81c14563a97b1d6a9b300
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-01-27 15:20:55 +00:00
Victor Feyens 11ff605319 [REM] test_lint: uninstall hook
closes odoo/odoo#44027

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-01-27 15:20:42 +00:00
qsm-odoo d1a867553d [FIX] web_editor, *: remove automatic content on undo/redo
* website_event

Commit https://github.com/odoo/odoo/commit/a153ed42a09f8b7f5e0865112eb7d5affc22a353
solved a big problem which was that when an undo/redo is performed, the
whole DOM was reconstructed breaking all the JS relying on the old one.
For example, the latest blog posts which are dynamically loaded in JS
were not removed before saving since the JS relied on the old DOM... and
this broke the page because that dynamic content contained non-valid
XML markup. The solution was to destroy all JS widgets before applying
an undo/redo and rebuilding them all afterwards. Ideally this operation
should be done on the undo recording action but this would have a huge
flickering impact since many DOM would be destroyed each time the user
types text (flickering which is also bad on undo/redo but it is more
acceptable).

The problem now is the following: if a widget, like many, is declared
like this:

```
start: function () {
    this.$el.append(/* Some dynamic content on page loading */);
},
destroy: function () {
    this.$el.find(/* Dynamic content to remove */).remove();
},
```

Then it works in all standard cases: dynamic content is loaded on page
load and is removed when saving the editor. But this happens with the
undo/redo system:

1. The users types text, we record an undo, which is the whole page
   current DOM, containing all the dynamic contents.

2. The users hits CTRL-Z:

    a. We destroy all JS widgets, calling destroy, the dynamic content
       is removed from the page.

    b. We replace the whole DOM with the one that was saved. That one
       contains the dynamic content DOM.

    c. The JS widgets are recreated, calling start... creating the
       dynamic content again.

Result: the dynamic content appears duplicated. On save, depending on
how the destroy was implemented only the last generated content may be
removed or both... but in any case it appears duplicated during edition.

Hopefully, our current stable version do not contain that many dynamic
content so a perfect amelioration of all of this can be found in master.
As a fix, this commit introduces an extra step between (a) and (b):
we remove the dynamic content of the DOM-to-re-apply before applying it.
For this to work, widgets have to mark their dynamic content with the
class 'o_temp_auto_element' when creating it. They also must add the
content they replace on the 'data-temp-auto-element-original-content'
attribute.

closes odoo/odoo#44025

X-original-commit: f0d2559afd3094f6fbd7e6788f7c10fa421c9080
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-27 15:17:02 +00:00
Hiral Bhavsar 07d4bbb35b [FIX] sale_product_configurator, website_sale(_wishlist): fix multicompany issue
Currently, we are allowing to select the other company's product as
an alternative product or accessory products on the product.

For example,
	website: W1, W2
	company: C1, C2

	W1-> C1
	W2-> C2

	Product: P1
	===========
		company: C1

	Product: P2
	===========
		company: C2
		alternative product: P1

And this will give a traceback because we are going to use another company's
products. And this is obviously a wrong behavior.

That's why put a specific domain on the alternative, accessory and optional
product fields to fix this multi-company issues.

Now product wishlist will be also a company-specific.

task-2070522

closes odoo/odoo#44011

X-original-commit: 800abfc7baa8461f6b7b5ece95fa7700d3cd872a
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-01-27 14:26:00 +00:00
Nisha patel ce02a0ba89 [IMP] membership: category many2many tag field on partner
Purpose of the task is to get the contact tags in the list view, even if
membership is not installed and get the actual tags instead of 'Records 3'
by setting a many2many_tags widget on it.

closes odoo/odoo#43399

Taskid: 2172137
Closes: #43399
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-16 11:05:23 +00:00
jbm-odoo 00b2046460 [IMP] calendar: Adapt views and test for new color and filters
closes odoo/odoo#41573

Taskid: 2153249
Related: odoo/enterprise#7157
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-27 16:08:34 +00:00
jbm-odoo fa48e05f42 [IMP] calendar: Improve color and filters
Now in a calendar view, if we use the color, attribute, it will use
the same color as Gantt views and the color picker widget.

The attribute color isn't more set as default in filter because it make,
in most situation, no sense to filter by color.

Now, we can add new filters in the right panel. To do that, we must
add the attribute "filter='1'" in the corresponding field line.
And if the filter has no direct link with the color of the model,
we can specify an attribute 'color' for this filter line block.
(for example color='color', and the color of the related model
will be used)

TaskID: 2153249
2020-01-27 16:08:34 +00:00
Arnold Moyaux d39fc89324 [FIX] mrp_subcontracting: lot_id instead of lot_name in receipt
Usecase to reproduce:
- Create a subcontracted product tracked without tracked components
- Create a receipt for this product
- Click on show detail

-> Lot_id are display even if the picking type uses create lot.
The assign serial feature is not working either.

The lot_id instead of lot_name is required in case of tracked
components since it will open the produce wizard and the user
will create lot there. However in the case of non-tracked components,
the wizard will not be used nor lot created. In this case the
classic behavior should be used with lot_name

closes odoo/odoo#43997

Task: 2180191
X-original-commit: 00fe4186935435f46a0db197c68e6df956fe80db
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-27 12:38:13 +00:00
Goffin Simon b0da38e82f [FIX] sale: Base amount not displayed on Pro-forma
Steps to reproduce the bug:

- Let's consider a sale tax T
- Allow Pro-forma in Accounting configuration
- Create a SO with a line of 100 and T on it
- Print the Pro-forma invoice

Bug:

The base amount of T was not displayed next to T below the subtotal

Inspired from report_invoice_document

opw:2172383

closes odoo/odoo#43837

X-original-commit: 472918686fcc723cc6bb30aefacadf00b0cdc31c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-23 11:32:06 +00:00
Nisha patel 6b4df7538c [IMP] web: remove layout footer labels
Purpose of the task is to reduce the content of the footer by
removing the phone, email, website labels as those are implicit.

In this commit,
 -Removed 'Phone:', 'Email:', and 'Web:' in web.external_layout_standard
 -Removed 'Tel:', 'Mail:' and 'Web:' in web.external_layout_boxed

Task-1942363

closes odoo/odoo#43381

Closes: #43381
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-16 06:56:53 +00:00
Lucas Perais (lpe) e25aec5631 [FIX] base: kanban_record doesn't support <field/>
Open the form view of Contacts with some children
Some children have phone number set on them.

Before this commit, the phone was not displayed
This is due to the same reason as #35869

After this commit, the phone number is displayed.
Although widgets can't be supported in this case

closes odoo/odoo#40266

Related: odoo/enterprise#6706
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-01-27 09:31:54 +00:00
Lucas Perais (lpe) 9538245267 [IMP] *: adapt views for phone widget sms enabled default
Task 2123526

This commit adapts the views to take into account
that the phone widget enables sending an sms by default

*: crm, hr, sms, base
2020-01-27 09:31:53 +00:00
Lucas Perais (lpe) d41d627569 [IMP] web: field phone widget deals with SMS by default
Task 2123526

Before this task, the phone widget on char fields was not
displaying the send sms button by default

After this task, the default behavior of the phone
widget is to display the send sms button
2020-01-27 09:31:52 +00:00
Hardik Prajapati 87397d0080 [IMP] web: fixed column widths in datepicker
task - 2166438

closes odoo/odoo#42999

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-01-27 11:39:01 +00:00
Swapnesh Shah 751831e5ff [FIX] sale_product_matrix: Apply discount on line
Before this commit, Discount on SO line was never applied as '_onchange_discount' was not called.

In this commit, We call the method explicitly to set a discount on SO line.
Fixes https://github.com/odoo/odoo/issues/43970

closes odoo/odoo#43994

X-original-commit: 10fa3940bc7b28d20e7aac04e154fbcdfda69e56
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-01-27 11:42:05 +00:00
Nicolas Martinelli d1a0601660 [FIX] mrp: display human readable lot
Display the readable value of lot name in the Production Order report.

opw-2178868

closes odoo/odoo#43990

X-original-commit: 7e82b77a80fe70da45676fd87a458ffe9948e48d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-27 10:52:58 +00:00
Aaron Bohy f2de55322e [FIX] web: ComponentAdapter: do not override render
In Owl, 'render' is a (async) function of Component. It should not
be overriden in Component specifications, especially to do
something else (in this case, rendering the sub widget), without
calling super.

closes odoo/odoo#43980

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2020-01-27 08:58:36 +00:00
Mohammed ShekhaandAaron Bohy 23878ee11a [IMP] web: always display statusbar widget
By default, in readonly, unset field widgets (and their labels) are
not displayed. However, we would like the statusbar widget to be
always displayed (even when it is not set).

This commit introduces a new method 'isEmpty' on AbstractField, and
uses it (instead of isSet) to determine whether or not a field should
be hidden. By default, it uses isSet, so that it doesn't change
anything for the other fields, and we override it in statusbar to
always return false.

There was a need to make the distinction with isSet, as this one is
used to determine if a record can be saved (if the field is required,
and isSet returns false, it can't be).

task-2172272

closes odoo/odoo#43419

Related: odoo/enterprise#7929
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-01-27 09:01:19 +00:00
Odoo's Mergebot ea9bbdbe30 [MERGE] event(_sale): improve event kanban view and sales information
PURPOSE

Improve event kanban view and improve sales information in kanban and form
views. Purpose is to give a better UI to users using event on a daily basis.

SPECIFICATIONS

Improve sale computation on event. Set the total sales price of an event to
be the converted sum of order lines, tax excluded. Currency is now a related
on the company to avoid de-synchronizing events and companies.

Move total sales information from kanban to form view :

  * remove sales information from event kanban view;
  * add it as a stat button on form view;
  * clicking on this button should redirect to the orders linked to that
    event, in no create mode to avoid creating de-synchronized data;

Improve kanban card display of events. Have more useful information on the
kanban record and removed redundant information :

  * Display the location of the event
  * Remove the duration
  * Date should only be in the green block
  * Use the same links as before

Task 2170831
PR #43173

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-27 13:04:48 +01:00
Debauche Stéphane 9726e33654 [IMP] event: improve kanban card display of events
Purpose
=======

Improve design of the kanban cards in Events.

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

Have more useful information on the kanban record and removed redundant
information

  * Display the location of the event
  * Remove the duration
  * Date should only be in the green block
  * Use the same links as before

Task 2170831
PR #43173
2020-01-27 11:21:59 +00:00
Debauche Stéphane ea6ab15d39 [IMP] event_sale: move total sales information from kanban to form view
Purpose of this commit is to slightly improve event / sales integration,
notably finding sale orders from an event.

Specifications

  * remove sales information from event kanban view;
  * add it as a stat button on form view;
  * clicking on this button should redirect to the orders linked to that
    event, in no create mode to avoid creating de-synchronized data;

Task ID 2170831
PR #43173
2020-01-27 11:21:28 +00:00
Debauche Stéphane 23fae21cc7 [IMP] event: improve sale computation on event
Purpose
=======

In this commit we set the total sales price of an event to be the converted
sum of order lines, tax excluded. Currency is now a related on the company to
avoid de-synchronizing events and companies.

Fields and computation comes from 5d1837d250 .

Task 2170831
PR #43173
2020-01-27 11:21:28 +00:00
Thibault Delavallée 8062b760a4 [IMP] sale_crm: add tests for lead to quotation convert wizard
PURPOSE

As crm will soon evolve (onchange -> compute, code improvements, better
management of sales teams) cleaning and improving tests is necessary to avoid
regressions.

SPECIFICATIONS

Add tests for wizard about converting lead to quotation. Indeed currently there
are no tests. This wizard does not do much things but it is always better to
ensure it will not be broken after some code update, especially that it deals
with partner data.

LINKS

Task ID 2181811
PR #43946

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-27 09:40:17 +00:00
Dharmraj Jhala 9c19db3e35 [FIX] mass_mailing: fix mass mailing creation in non debug mode
Purpose: make `name` a non-required field in form view

Currently `name` field in the mass mailing is visible only in the debug
mode, and is set via create method based on `subject`. If user tries to
create a new mass mailing object in non debug mode, it gives a warning.

This commit fixes the behavior by setting `name` field as non-required
in the form-view and thus avoiding the warning when field is not visible.
It will not cause issue since the `name` field is coming from the model
`utm.source` and is already a required through field definition.

Task 2178214
PR #43709

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-27 10:09:24 +00:00
Dharmraj Jhala 6f95973484 [IMP] crm: better access leads linked to a lost reason
This commit improves overall usability for lost reason wizard in CRM with
following improvements

  * prevent deletion of reason if any lead is still referencing it;
  * remove obsolete filter 'Include archived' for lost reason;
  * add new stat button for lost reason, to see the leads that were lost
    due to that particular reason;
  * add margin on the reason title to avoid ribbon glitch;

TaskID 2176323
PR #43541

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-27 09:57:03 +00:00
Thibault Delavallée 79e20497e6 [IMP] crm: move crm.lost.reason views in their own file
TaskID 2176323
PR #43541
2020-01-27 09:54:47 +00:00
Nisha patel f75f56e5cd [IMP] crm,project,utm: modify color of tags in list view
Purpose of this task is to change the color of Tags field in tree view in the
same way as it show in form view.

TaskId : 2172123

closes odoo/odoo#43442

Closes: odoo#43442
Related: odoo/enterprise#7769
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-17 05:58:11 +00:00
Jason Van Malder ee8a30a19b [FIX] sms: fix context action not deleted when unlink template
Issue

    - Install Calendar
    - Technical > SMS templates > Calendar reminder > Add context action
    - Calendar > Tree view > meeting > action is there
    - Delete SMS template and/or uninstall calendar_sms

    Template deleted but action still there with a traceback
    when you click on it.

Cause

    The action is never deleted.

Solution

    Delete the action when the template is deleted.

OPW-2161653

Closes #42328

closes odoo/odoo#43984

X-original-commit: eb95f06f19c60babc775de57813a293ffc35c581
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-01-27 09:06:19 +00:00
Carlos Lopez f9e5f58b7d [FIX] l10n_latam_invoice_document: value by default in compute one2many field should not be []
closes odoo/odoo#43983

X-original-commit: 1940796daf5302c889dc14e187d178541120554e
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-27 09:06:02 +00:00
Raphael Collet 9ce78bff5f [FIX] core: search on one2many fields with context
Consider an x2many field `foo_ids` with `context={'active_test': False}`
in its definition, and a comodel with an active field.  The value of the
field includes inactive records.

Now consider a search with a domain like `[('foo_ids.bar', op, value)]`.
The search should return all the records with corecords that satisfy the
domain `[('bar', op, value)]`, including inactive corecords, because the
field's context explicitly disables filtering on the active field.

closes odoo/odoo#43625

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-01-21 09:31:58 +00:00
Jason Van Malder 3b4cdbebf2 [FIX] odoo: default Dutch language settings
Dutch default settings are incorrect:
- Separator Format []
- Decimal Separator ,
- Thousands Separator (empty)

This must be:
- Separator Format [3,0]
- Decimal Separator ,
- Thousands Separator .

OPW-2179020

closes odoo/odoo#43956

X-original-commit: 5c2ea7426d3f70ad897328b41e2df02508708c61
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-01-24 17:57:11 +00:00
Swapnesh Shah ba8dd4d215 [IMP] website: Move sequence field to first
Before this commit, `sequence` field was in the last column of List view which is not Ideal for `widget="handle"`
Now we display `sequence` first on the list view

closes odoo/odoo#43969

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-01-26 17:21:45 +00:00
Pierre Paridans ffaa3eb0d3 [FIX] account: fake notebook misses tabs container
Since commit odoo/odoo@43db60d `<notebook>` elements
have also a wrapper element (with class `o_notebook_headers` around
their tabs.

Since account module reuse the markup and styling of the `<notebook>`
but without using the tag itself (cf. done by hand) the reconciliation
line's tabs style was broken.

This commit adds the missing wrapper element and set the
margin-{left,right} reset to the that element.

closes odoo/odoo#43959

X-original-commit: 8d45e3d52a7312addb05dd6cb39d68f9d61144da
Related: odoo/enterprise#7941
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-01-24 21:55:49 +00:00
Jeremy Kersten 9f1fa0852d [FIX] web: backport fix from ace.js
Bug in ace-editor is present since that we updated in 1.3.1.
Because diff between 1.3.2 and 1.3.1 is big (-1288 +4661) with new feature...
We prefer just patch the library in stable branch applying part of commit:
https://github.com/ajaxorg/ace/commit/1890598a5da2259cfb0ceac38fed7bca582765db

To do in master? : upgrade ace.js

How to reproduce:
   > create ir.ui.view
   > be sure to empty all the content
   > type '<xpath expr=""'
   > Now if you type the > it will crash
        - Cannot read property 'type' of null

closes odoo/odoo#43955

X-original-commit: 1a90740b8e699fc3afa28c3ddb5490328facb995
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-01-24 17:56:06 +00:00
Odoo's Mergebot 397f1022d3 [MERGE] website, *: review and regroup all snippets
Move many theme-specific snippets in standard website (the rest will be
removed) and review the structure of all snippets.

Also add new options.

See sub-commits for details.

task-2088157

closes odoo/odoo#42937

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-01-24 20:45:14 +01:00
Sébastien Theys 25708586a7 [FIX] fields, test_new_api: fix m2m commands in batch
Before this commit executing m2m commands in batch would lead to undesired
results, such as duplicating the related records on every subsequent record of
the batch.

Indeed since [1] the `create` and `unlink` are called in a loop, but their
content was not reset at each iteration.

[1] 9920f20e4c

closes odoo/odoo#43950

X-original-commit: 0800f64b011c8f020c0d7dd6e1c149aebd1a4627
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-01-24 17:13:05 +00:00
Katherine Zaoral e7aeb6eb07 [IMP] l10n_ar: we active some document types by default and set the proper doc_code_prefix that it was missing
closes odoo/odoo#43938

X-original-commit: bb8927f01b6804884cc460be5f93acbeb40f20d2
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-01-24 14:38:25 +00:00
Xavier Morel 4baecc31df [FIX] website: reset password tour (in community)
The tour had been fixed for running headless, however that was only
checked in enterprise, and community turns out to have a more complex
loading sequence, and thus higher likelihood of dangling request: when
logging in, on enterprise the user lands on the applications screen
which performs no further RPC. On community however the homepage
triggers the Chatter action which can take some time to load after we
already see the user menu.

Add a community-only step which waits for chatter to load.

closes odoo/odoo#43936

X-original-commit: d7777044a7649a4809dd08f864bb8d43729b201e
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-01-24 14:37:15 +00:00
qsm-odoo d9c98c429e [REF] website: fine-tune existing snippets
- Remove s_comparison title's col
- Rename 'Text Block' into 'Text'
- Make all icons of s_features rounded

Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:03 +00:00
qsm-odoo 599b5910f0 [REF] website, *: review xml using old title classes and structure
* website_event, website_forum, website_slides

Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:03 +00:00
qsm-odoo 346a7ca5d4 [FIX] website, *: quick review of new snippet thumbs
website_form, website_twitter

Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:02 +00:00
qsm-odoo 09249206ed [MOV] website: add s_product_list snippet from themes repo
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:02 +00:00
qsm-odoo 1c2eafaad8 [MOV] website: add s_color_blocks_2 snippet from themes repo
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:02 +00:00
qsm-odoo 0307677b1f [MOV] website: add s_badge snippet from themes repo
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:02 +00:00
qsm-odoo bc6e2e4983 [MOV] website: add s_blockquote snippet from themes repo
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:02 +00:00
qsm-odoo fb9aab745b [MOV] website: add s_progress_bar snippet from themes repo
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:02 +00:00
qsm-odoo a74cd7ad4f [MOV] website: add s_text_highlight snippet from themes repo
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:02 +00:00
qsm-odoo 34a8199cfe [MOV] website: add s_process_steps snippet from themes repo
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:02 +00:00
qsm-odoo add6abe691 [MOV] website: add s_timeline snippet from themes repo
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:02 +00:00
qsm-odoo 0f346ae2b5 [MOV] website: add s_showcase snippet from themes repo
Part of https://github.com/odoo/odoo/pull/42937
task-2088157
2020-01-24 13:02:02 +00:00