Commit Graph
126256 Commits
Author SHA1 Message Date
Lucas Perais (lpe) ec27173d59 [FIX] crm: team inherits alias, field definition
Before this commit, in some cases, clicking on a crm.lead
triggered a traceback saying "the column crm_team.alias_user_id does not exist"

This was because the field alias_user_id on mail.activity.mixin,
was itself _inherits from mail.alias
In that case, "overriding" the field in the child class is actually
a plain definition of the field, making it "loosing" its related nature

After this commit, there is no traceback anymore

closes odoo/odoo#31511
2019-02-28 15:48:26 +00:00
Martin Geubelle f1c0530515 [FIX] base: do not rename binary fields column
When renaming a binary field name (through Studio for example), an error occurs
since rev. odoo/odoo@66f0e26

As the binary (custom) field is now created with `attachment=True` by default,
it has no associated column in the database ; this latter shouldn't be renamed
then.

Task 1942181

closes odoo/odoo#31504

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-02-28 13:36:08 +00:00
RomainLibert 8c8b1c853e [FIX] hr_payroll: rewrite action_validate in api.multi
Also apply some linting

closes odoo/odoo#31499

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-02-28 13:13:17 +00:00
Gorash e797d7a3c3 [FIX] web_editor: wrong focus detection in the editor
Issue detected with tests in the branch that replace deferred by native
Promise. Need to add isMedia to detect if the target is already a media
when focus the editor.

closes odoo/odoo#31632

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-06 12:33:36 +00:00
Martin Geubelle 03a217e47e [FIX] survey: use correct widget for CopyClipboard
As both `survey_url` and `public_url` are `Char` fields, the correct widget
to use is `CopyClipboardChar` (`CopyClipboardText` is for `Text` fields).

This was causing a display issue (the style of mentioned widgets is different).

Task 1935577

closes odoo/odoo#31624

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-06 10:09:38 +00:00
Thibault Delavallée 7836b99690 [REV] base: revert "Hide Save/Discard on Settings until there are modifications"
Why reverting ?

The fact that the control panel changes width on first edit is confusing to the
user. The whole form shifts down. We want to avoid having elements appearing
and disappearing. The issue that the user does not know if he has to save is
still up to date, and will be addressed in the next saas. We will most likely
use what has been done in this task to only display 'There are unsaved
changes'. Thank you all for your work here!

Original task and revert discussion can be found on task ID 1917637 .

This reverts commit 514d6fb90d.

closes odoo/odoo#31622

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-06 09:53:55 +00:00
Simon Lejeune c84d183524 [REF] mrp: manufacturing order responsibles
Default the responsible to the current user if the mo is created
manually.

Default the responsible to empty if the mo is created by a procurement
rule.

task 1938495

closes odoo/odoo#31395

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-06 09:09:47 +00:00
Romain Estievenart 69b503f975 [FIX] sale_management: add missing view on sale_order_option_ids field
We added the form view to remove no needed fields.
It's now use the same fields used by the editable list.
We also added the Kanban view to improve the layout "Optionnal Product"
tabs on mobile device.

Task: 1945006

closes odoo/odoo#31596

Signed-off-by: =?utf-8?q?Adrien_Dieudonn=C3=A9_=28adr=29?= <adr@odoo.com>
2019-03-05 13:29:48 +00:00
Aaron Bohy df7fcfb3fd [FIX] web: remove duplicated entry in field_registry
Commit 4960453d added the field signature in field_registry.js and
in signature.js.

closes odoo/odoo#31434

Signed-off-by: =?utf-8?b?R8OpcnkgRGVib25nbmllIChnZWQp?= <ged@openerp.com>
2019-03-05 09:11:37 +00:00
Lucas Lefèvre 120b8768bb [FIX] mail: Check field exists when computing groups
Steps to reproduce:

1. install `hr_contract_salary`

2. create a contract

3. set or update `hr_responsible_id` on the contract
(it creates a `mail.tracking.value`)

4. uninstall `hr_contract_salary`

5. go to the contract form view
=> traceback `hr_responsible_id` does not exist

Before displaying a `mail.tracking.value`, `groups` of the
fields are checked to fitler tracking values according to access
rights of the user.
However if the module that added the field has been uninstalled,
the field does not exists anymore.

Fix:
check if field exists before getting fields groups.
If the field does not exists: set groups to `base.group_system`

closes odoo/odoo#31398

Signed-off-by: "Yannick Tivisse (yti)" <yti@odoo.com>
2019-03-05 08:55:02 +00:00
Lucas Lefèvre d31f3ebade [FIX] hr: Fix wrong super call
super.message_post in _message_log is wrong.

Also use `*args` and `**kwargs` in method parameters

closes odoo/odoo#31354

Signed-off-by: "Yannick Tivisse (yti)" <yti@odoo.com>
2019-03-05 08:54:11 +00:00
Gorash a8e95217c9 [FIX] web_editor: Expose focus method for activate method of html field
closes odoo/odoo#31577

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-04 08:41:09 +00:00
Gorash 972a1c9920 [FIX] web_editor: Evoid the risk of deleting the summernote library
For iframes, we need to inject summernote because there are references
to "document" in it. When loading the iframe, if it is canceled, there
is a risk that the library is erased and that it breaks the field html.
We must also slightly modify the library to prevent it from making
changes to the library of the main "window".
2019-03-04 08:33:53 +00:00
RomainLibert 30bbfff8b4 [FIX] mail: set mail.activity.type related fields readonly
Currently it is not possible to create or write on a mail
activity without having the rights to write on mail activity type.

This is caused by the some related fields on mail activity are
not readonly hence trying to write on mail activity type

This issue was previously shadowed by a sudo call both in
the create and write methods, those disappeared
with the following commit odoo/odoo@b9c8ba83e6

As those fields should never have been defined as readonly=False,
this commit sets them to readonly=True

closes odoo/odoo#31468

Signed-off-by: "Romain Libert (rli)" <rli@odoo.com>
2019-03-01 15:42:32 +00:00
Robot Odoo 6fc1f7d3d3 [MERGE] website_slides(_*): improve profile, lesson list display and demo data
This merge contains various improvements and fixes related to the new
eLearning application. Sub commits will give you more details on this
merge content as everything is not completely related.

Containing mainly
 * improve demo data to have more links and quizzes;
 * redesign the profile page, make it responsive and use bs4 when possible;
 * fix lesson list in training channels not displaying all slides;
 * improve lesson list design;

Merge linked to task ID 1941250 and PR #31453 about post-merge
cleaning and review.

Signed-off-by: "Thibault Delavallee (tde)" <tde@openerp.com>
2019-03-04 18:14:38 +01:00
Thibault Delavallée dc76c99a1e [FIX] website_slides: fix display of lessons in training course
Currently slides are displayed in a reorderable list, using current user
access rights. This means external customers see only published and free
lessons.

However purpose of course page is to display all lessons, and display
only available ones as clickable. Other one should be displayed as muted
to tease people.

Note that a specific lesson page does check for access rights. Here we
just display all lessons names. A label for free preview is also added.

Fetch of data when displaying a channel is therefore a bit modified as
there are less differences between training and documentation channels.
User progress is also updated to be easier to use in templates.

Commit linked to task ID 1941250 and PR #31453
2019-03-04 16:28:27 +00:00
Stefano Rigano a488cf67ed [IMP] website_slides: slightly improve homepage
Purpose of this commit is to make a new design linting pass on homepage.
Containing

 * various bs4 and responsive improvements;
 * footer banner improvements;

Commit linked to task ID 1941250 and PR #31453
2019-03-04 16:13:57 +00:00
sri-odoo af41382fa1 [REF] website_profile and dependencies: improve global layout and design
Purpose is to perform a cleaning pass on website_profile templates. It
cleans the DOM, templates and CSS and proposes various improvements on
general design and layouting. This includes notably

 * lessen custom CSS and use bootstrap 4 classes;
 * simplify layout when possible;
 * make is responsive and mobile friendly;

No functional changes should occur with this commit.

Sub modules are impacted as profile is extended in various other
applications: eLearning, forum and certification.

Commit linked to task ID 1941250 and PR #31453
2019-03-04 16:13:52 +00:00
sri-odoo 4363598582 [REF] website_profile: improve rank progress template
Purpose is to make it better looking and responsive.

Commit linked to task ID 1941250 and PR #31453
2019-03-04 16:13:45 +00:00
Thibault Delavallée 2ab2de24f2 [FIX] website_slides: add missing presentation icon used in some templates
A specific template to display an icon depending on slide type has been
added recently. However presentation icon was missing. This commit fixes
that.

We also added an option to tune the classes added on the icon. It gives more
flexibility when using it.

Commit linked to task ID 1941250 and PR #31453
2019-03-04 16:13:21 +00:00
Thibault Delavallée adcdb4e0f0 [FIX] website_slides: various models improvements
Purpose of this commit is to fix and improve some model related bits of
code:

 * add an ondelete cascade on some required fields;
 * make a public method private because it should be accessed only through
   controllers;
 * do not add odoobot as channel member; notably for demo data it can create
   unnecessary of noise in members and notifications;

Commit linked to task ID 1941250 and PR #31453
2019-03-04 16:13:04 +00:00
Thibault Delavallée 2f8ea621a8 [IMP] website_slides(_*): improve demo data
Purpose of this commit is to improve eLearning demo data. Notably links
(links to external resources on a given slide) and quizzes (allowing to
gain karma) are added. Some slides are added. Demo user interaction with
eLearning is also added, such as membership and votes. Finally a channel
is specifically kept specific to 1 single slide of type certification as
its flow has to bypass some screens when selling pure certifications.

Commit linked to task ID 1941250 and PR #31453
2019-03-04 16:12:57 +00:00
Jorge Pinna Puissant d92eba3a19 [FIX] website_event_sale: pricelist discount product qty
Before this commit, a pricelist discount based on the product qty could
be created and the user may believe that it will work also for event
tickets.

Now: when configuring a pricelist discount based on the product qty a
warning message is show to alert that this kind of discount don't work
in event tickets.

opw-1940368

closes odoo/odoo#31459

Signed-off-by: "Lucas Perais (lpe)" <lpe@odoo.com>
2019-02-28 08:59:25 +00:00
Lucas Perais (lpe) 645d9dc037 [FIX] account: reconciliation widget partner domain all reconcile accounts
Have an account move which lines have all the same partner
Have a bank statement, without a partner
Enter the reconciliation widget for the bank statement
All the lines appear

Select one of the lines of the account move for the partner

Before this commit, all other lines disappeared from the proposition
including the ones for the partner selected
This cas because when having set a partner on the widget,
only receivables and payables accounts were searched for

After this commit, all account move lines for the partner are searched for

OPW 1942936

closes odoo/odoo#31488

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-02-28 08:57:45 +00:00
Moisés López 72e7976d1e [FIX] account: Faster read_group for account_abstract_payment._compute_payment_amount
Go to Menu / Accounting / Vendors / Bills
Search a partner with too many opened invoices
 - E.g. 713 opened invoices (709 local currency, 4 foreign currency)
Choose all them
Press Open Action -> Register Payment
Wait to open the view.

Before this patch line_profile result

Total time: 1141 s
Line #   Hits  Time            Per Hit    % Time   Line Contents
================================================================
   243   2922   1,139,417,018.0  389944.2     99.9    amount_total = sum([MAP_INVOICE_TYPE_PAYMENT_SIGN[i.type] * i.residual_signed for i in payment_invoices])

After this patch line_profile result
Total time: 12 s
Line #   Hits  Time            Per Hit    % Time   Line Contents
================================================================
   243  2862   11,733,108.0        4099.6     98.1    invoice_datas = invoices.read_group([('id', 'in', invoices.ids)], ['currency_id', 'type', 'residual_signed'], ['currency_id', 'type'], lazy=False)

It means 95x faster

closes odoo/odoo#31313

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-08 06:53:18 +00:00
Aurélien Warnon 92141334f8 [FIX] survey: fix survey statistics computation
Purpose
=======

This commit fixes the shared dict in the survey statistics computation that
causes surveys to incorrectly share the same stats when computed in batch.
2019-02-27 15:20:29 +00:00
Aurélien Warnon eb45f84128 [FIX] survey: fix invitation sending with no page_ids
Puprose
=======

This commit fixes the survey to allow sending invitation even if the survey
has no pages as long as the questions_layout is 'page_per_question'.
2019-02-27 15:20:28 +00:00
Jorge Pinna Puissant 4613d0a80b [FIX] event_sale: on change of events product in SO
Have a product that is an event, with the price of 1500.
Create a ticket for this product in an event, with the price of 600.
In a SO, add a line with this ticket.

Before this commit, when you change the product, to another product that
is also an event, the event, the ticket and the price stayed the ones of
the first product.

Now, the event, the ticket and the price are updated when the product is
modified.

opw-1940368
2019-02-27 12:54:53 +00:00
Xavier Morel 925385fde6 [FIX] base: properly check werkzeug version
Werkzeug version was being checked to avoid passing quote=True to
werkzeug.utils.escape (as that parameter was changed to `True` *and
deprecated* in 0.9).

However because DeprecationWarning was made silent by default in
Python 3.2 and the way the check is implemented worked for 0.9 it
looks like nobody really noticed it's broken in the usual manner of
half-assed version checks: works for 0.9.0, doesn't work for
0.12.3 (because lexically 0.12.3 < 0.9.0).

Fix by using proper version parsing and comparing the result of that.

See also: odoo/odoo#28116

closes odoo/odoo#31553

Signed-off-by: "Xavier Morel (xmo)" <xmo@openerp.com>
2019-02-27 12:46:02 +00:00
Odoo Translation Bot 5a3ac7dece [I18N] Update translation terms from Transifex 2019-03-01 02:45:39 +01:00
Nicolas Lempereur 15ea753a0f [FIX] stock: show product qty on searched location
The location_id and warehouse_id fields on product.template are just
dummy field intended to add something in the context that will be used
to compute the data being rendered (eg. for location, the quantity
displayed is the quantity of the product in the searched location).

But the feature was broken at a point, and has been solved in 11.0 with
7c7b099273.

This solution was not implemented in 10.0 up to saas-15 since this is
not acceptable for a stable version.

This changeset is only for 10.0 up to saas-15 to implement the fix
differently.

opw-1945417
closes #31475
2019-02-28 12:42:18 +00:00
Jorge Pinna Puissant ee184bcf58 [FIX] event_sale: unit price changes with the qty
Have a product that is an event, with the price of 1500.
Create a ticket for this product in an event, with the price of 600.
In a SO, add a line with this ticket.

Before this commit, when you change the tickets qty in the SO the price
change from 600 to 1500.

Now, the unit price stays the one of the ticket.

opw-1940368
2019-02-27 12:40:39 +00:00
Odoo Translation Bot f014204447 [I18N] Update translation terms from Transifex 2019-03-03 03:15:43 +01:00
Can Tecim 3eeb34318a [CLA] backport of 5028507ea2 to 11.0
Remove the corporate CLA (only cantecim has contributed in the past) and signs
an individual CLA file instead

closes odoo/odoo#31495
2019-03-01 14:13:50 +00:00
qsm-odoo 395c169db9 [FIX] web_editor: wait for animation end before covering snippets
Part of https://github.com/odoo/odoo/pull/31440
opw-1929133

closes odoo/odoo#31440
2019-03-01 13:52:14 +00:00
qsm-odoo 8405c7f5fa [FIX] web_editor: properly check snippet options
Commit https://github.com/odoo/odoo/commit/c2b8d2a3017256e4ea60a3710bdaab6d1f693d81
made the mistake of considering each dropdown-menu individually while
all are considered to be the same when enabling a class. From saas-11.x,
commit https://github.com/odoo/odoo/commit/8ca92330b367d54fddf1c02089ee9d0bc3edbfdc
will group by dropdown menu but that will be another fix to make.

Part of https://github.com/odoo/odoo/pull/31440
opw-1929133
2019-03-01 13:52:14 +00:00
gustavovalverde c812cc4ebc [I18N] *: remove es_DO translations
Include commit 572d628 again, as it was lost with a forward port.

closes odoo/odoo#31479
2019-02-28 12:39:03 +00:00
Christophe Simonis 023dfaeb6b [FIX] core: correct ir.rule domain generation
Since 934c001680, fasly domains are
correctly OR'ed.
Models without group binded rules were then wrongly reduced to an
`AND FALSE` condition.
2019-02-27 12:27:24 +01:00
Raphael Collet 8a7dc813af [FIX] base: copied views are delete too early
Install Invoicing (account) and uninstall it. It results to a an error
because some views required by `payment.acquirer` are deleted before
the acquirers.

The problem is due to the way copied views are deleted, since 1388b7f
they are removed before the module uninstallation. The related commit
faced a similar problem where copied views were deleted too late
during a module uninstallation.

The two problems are revealing that the copied views have to be removed
as part of the module uninstallation, more precisely after all records
refering to them has been deleted but before the schemas has been
cleaned.

opw-1943286

closes odoo/odoo#31443

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-02-27 10:38:50 +00:00
Romain Derie 63ba2317f8 [FIX] website: get the error view without parsing the view tree
Before this commit:
The `if` condition doing a `View._views_get` was supposed to be a sort of
'hack' for when the error occured in a child view (as the template raised would
be the parent, not the broken child).
But since we refactored that part to use etree, it was actually going into that
condition for every error even if the error was in the called template.
Proof is, we only set `editable` in that if condition, meaning going in the
else would actually prevent to show reset template.

Indeed the following code would always be true:
   et = etree.fromstring(view.with_context(inherit_branding=False).read_combined(['arch'])['arch'])
   node = et.find(exception.path.replace('/templates/t/', './'))
as read_combined returns all the view hierarchy DOM

Note: We could not fix this by checking exception.path against `arch` as we
could have false positive (eg the child view replace the <p> element by another
<p> element which is broken, then the path would be found in the parent view
even if the error was in the child view).

closes odoo/odoo#31515

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-07 10:30:54 +00:00
Odoo Translation Bot 9d4aad2d67 [I18N] Update translation terms from Transifex 2019-03-10 01:36:03 +01:00
Christophe Simonis 6b2e519fbd [IMP] hr_holidays: unmute logger
Since 8da3750cee, logger does not need to
be muted anymore.

This reverts commit f5889303ef.

closes odoo/odoo#31720

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-08 16:49:41 +00:00
Nicolas Lempereur 228a5041bf [FIX] stock_landed_costs: service and landed cost
In saas-11.3 "Is a Landed Cost" (landed_cost_ok) was moved from the
product accounting tab, to the inventory tab.

The inventory tab is only shown for product not of type service, but the
field should be shown when product is of type service, consu or product.

With this changeset, "Is a Landed Cost" is displayed in the top and
"Split Method" is hidden: to specify the split method, this needs to be
done from products in Inventory > Configuration > Landed Cost Types, or
by the list view of cost lines when creating a landed cost.

opw-1949329
closes #31714

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-08 15:14:12 +00:00
Swapnesh Shah 805b75049b [FIX] survey: use correct icon for button
The button was referencing an image that no longer exists since 2015

closes odoo/odoo#29813

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-08 15:24:12 +00:00
Nicolas Lempereur b1a8a15c1a [FIX] project: double rating document name in search
The filter parent_res_name was already in the original search view so
the duplicated one was not needed and caused to have two times the
filter in the search view with possible different behavior.

opw-1949559
closes #31707

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-08 14:04:03 +00:00
Damon Liu df5ba89d5d [CLA] signature for DamonLiu0814
closes odoo/odoo#31694

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-08 14:48:58 +00:00
Luis González fa1210befd [I18N] sale: Remove duplicated term from pot
Commit 6af6da5c5 introduced a duplicated term to the file .pot, which
causes the following error when trying to re-load translations:

```
ON CONFLICT DO UPDATE command cannot affect row a second time
HINT:  Ensure that no rows proposed for insertion within the same
command have duplicate constrained values.
```

This commit removes on eof the duplicates, leaving only the valid one.
```
```

closes odoo/odoo#31683

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-07 21:55:12 +00:00
Martin Geubelle 8316c2d210 [FIX] web: correctly handle (no result) selection in search
In the recent control panel refactoring, selecting '(no result)' (when using the
autocomplete on a many2one for example) was no correctly handled and was leading
to a traceback.

It is now correctly handled and the search bar is correctly re-rendered.

Task 1936745

closes odoo/odoo#31438
2019-02-27 10:33:41 +00:00
Xavier Morel f9d3b5b7df [FIX] core: order of fields in onchange of SSF
When calling the initial (create / default_get) onchange, the SSF
would send the list of fields in whatever order was provided by the
fields map of fields_view_get.

The web client uses view ordering, and it turns out some uses / tests
have dependencies between onchanges (e.g. _create_payment in
test_account_reports) which break on some orderings of the fields.

Send the initial onchange using view-ordered fields in the SSF as
well.

closes odoo/odoo#31494
2019-02-28 10:58:33 +00:00
qsm-odoo 5149b3d916 [REF] *: definitely get rid of web_editor.base
* website_form_editor, website_sale_coupon

Part of https://github.com/odoo/enterprise/pull/3603
See https://github.com/odoo/odoo/pull/29442
task-1932066
2019-02-27 10:03:16 +00:00