Commit Graph
126236 Commits
Author SHA1 Message Date
Xavier Morel 2cc7f0dd49 [IMP] core: allow auto_install restriction on a subset of dependencies
Currently, auto_install is triggered when all dependencies get
installed, but there are cases where one would want such trigger on
only a subset thereof.

e.g. we want `website_sale_dashboard` to auto-install when
`website_sale` is installed. Currently, it requires `web_dashboard` to
also be auto-installed otherwise `website_sale_dashboard` would "wait"
for both dependencies to be explicitly installed before the
auto-install triggers. That's despite `web_dashboard` not being very
useful on its own. More generally this is an issue with technical
modules which need to be marked as auto_install so as not to block
e.g. bridge modules from automatically installing.

This change allows setting `auto_install` to a subset of `depends`:

* if auto_install is set to `False`, the module does not get
automatically installed (no change in semantics)
* if auto_install is set to `True`, the module gets automatically
installed if and only if all its dependencies are installed (also no
change in semantics)
* if auto_install is set to a list of dependencies, the module will be
installed when all *these* dependencies are installed, other
dependencies (excluded from auto_install) will be installed
alongside as a consequence
* auto_install can be set to an empty list, in this case the module
will always be automatically installed regardless of its
dependencies (and will force their installation).

So after this change, `web_dashboard`'s auto_install can be set to
`False` (such that it's not installed if no module defining dashboards
is installed) and `website_sale_dashboard`'s manifest can be edited
to:

'auto_install': ['website_sale']

possibilities:

# no automatic installation
'depends': ['a', 'b'],
'auto_install': False

# automatic installation if both a and b are installed
'depends': ['a', 'b'],
'auto_install': True

# automatic installation if both a and b are installed (explicit)
'depends': ['a', 'b'],
'auto_install': ['a', 'b']

# automatic installation if b is installed, a will get forcefully
# installed if it isn't yet
'depends': ['a', 'b'],
'auto_install': ['b']

# always automatically installed, will cause the installation of
# its dependencies even if they're not marked explicitly
'depends': ['a', 'b'],
'auto_install': []

Task 1851328

closes odoo/odoo#29431

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-07 11:44:26 +00:00
Martin Geubelle b9ec983571 [FIX] mail: first column width in activity view
The first column should have a minimum width to avoid the table to
resize when changing the domain for example.

Task 1894990

closes odoo/odoo#33273

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-05-09 11:23:53 +00:00
Priyanka Kakadiya b01ce6e7ef [FIX] mrp: add group for 'plan production order' server action
added group to hide a server action of 'Mrp: plan production orders' when 'work orders feature of settings is inactive'

before this commit:
when 'WO feature(group_mrp_routings)' is inactive it still displays 'Mrp: Plan production Orders' server action.

after this commit:
'Mrp: plan production orders' server action will display only when 'WO feature(group_mrp_routings)' is active.

task id - 1945291

closes odoo/odoo#33117

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-08 09:40:11 +00:00
Priyanka Kakadiya ac77a6ce8e [REF] base: handle groups for server action
Users may not do all actions bound to a model. We add the `groups_id` field
on `ir.actions.server` so that `get_bindings` can filter out unauthorized ones.

task id- 1945291
2019-05-08 09:40:11 +00:00
William HenrotinandHetal Dhanak 5c24b68a75 [IMP] mrp: improved views
-replaced domain with context in workorder view. user cannot work on
done or canceled workorder.
-added a default, removable filter to show orders of current workcenter
from dashboard.

This commit is related to task id: 1911218

Co-Authored-By: Hetal Dhanak <hdh-odoo@users.noreply.github.com>

closes odoo/odoo#29492

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-01 14:35:01 +00:00
jem-odoo 58bcd394ca [IMP] sale: make confirmation_date required for confirmed SO
Somehow, when a sales order is confirmed, its confirmation date might not be set (or it is
possible to remove it). This makes no sense as we expect it to be set when the SO is confirmed.
This commit adds an SQL constraint to ensure the confirmation date is required when the SO is
confirmed or done.
To populate this column, the confirmation can be deduced from the mail.message, with the confirmed
subtype.

Task-1930506

closes odoo/odoo#33230

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-05-07 14:05:35 +00:00
Raphael Collet a38dc1ccb9 [FIX] test_mail: adapt query counts
closes odoo/odoo#32905

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-05-06 09:44:10 +00:00
Raphael Collet d0dbcacfff [IMP] models: new implementation of prefetching 2019-05-06 09:44:10 +00:00
Geoffroy Larue 84fd8db144 [IMP] sale_timesheet: remove assign SO item action
If timesheets are recorded on tasks that aren't linked to any Sales
Order, the user can assign a SOL (in batch) later on by going to the
Action > Assign Sale Order Item.  Since the introduction of FSM, the
user can directly create Sales Orders from the Project Overview and
from Tasks. This makes the "Assign Sale Order Item" action redundant.

This commit removes this action.

Task-1968074

closes odoo/odoo#32696

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-05-08 07:02:53 +00:00
Hetal Dhanak b5b7396b84 [IMP] base: updated tooltip of implementation field in ir.sequence
-customers were misunderstanding the concept of "no gap" sequence
implementation hence updated the tooltip of the same to make it more useful and
clearer.

Task-1973967

closes odoo/odoo#33017

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-08 05:13:39 +00:00
jem-odoo ea0ddf474d [IMP] sale: use float tools on reinvoicing flow
Comparing float is a sensitive matter. Odoo creates specific tools
to manipulate float values. This commit makes the reinvoicing flow use
those tools to avoid rounding mistakes, ....
Task-1962608

closes odoo/odoo#33229

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-08 08:31:09 +00:00
Martin Geubelle 05d3048511 [FIX] web: correctly display list column name
Rev. odoo/odoo@5dc971b introduced a `description` attribute on AbstractField.

Sadly, the attribute was already used for something else (in `handle`
and a widget in asset, to hide the column name). So the widget new
description is now displayed in the list header (instead of the field
name).

A new attribute `noLabel` has been now added on AbstractField (currently
only used in list) to fill the same purpose as the previous `description`.

Task 1981757

closes odoo/odoo#33060

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-07 09:34:28 +00:00
Martin Geubelle db64af9b9c [FIX] web: correctly display header tooltips in list
A traceback occured when displaying the tooltip (only visible in debug) on a list
view header if the field had a `widget` attribute (introduced in rev. odoo/odoo@5dc971b).

The issue here was linked to the fact that a widget is not always rendered in list view
(compared to form view) so the `Widget` property in the attributes was not there.

Task 1981757
2019-05-07 09:34:28 +00:00
Yenthe666 19a2797b2d [IMP] product: add sheet to attribute form view
Remove unnecessary group

closes odoo/odoo#30622

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-07 09:36:03 +00:00
Parth Choksi 33b75bb48b [IMP] base: added margin to all module info buttons
Before this commit, there was no space between:
 - Install button and Upgrade button.
 - Uninstall button and Upgrade button.

After this commit, margin will be added to all the buttons for proper layout.

Task ID: #1937131

closes odoo/odoo#30829

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-05-06 08:47:55 +00:00
Swapnesh Shah 6344cd0112 [FIX] calendar: readonly attribute expects boolean
Followup on https://github.com/odoo/odoo/commit/6bc14c9142baedd98d8833c7cf77d1ee174e3f7f

closes odoo/odoo#33155

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-04 05:26:00 +00:00
Kaushalya Mandaliya f2a547761f [IMP] mail: prevent to add empty lines in channel member creation
Before this commit, it was allowed to add empty lines while adding a member in channel.
After this commit, it'll not be allowed to add empty lines as partner_id is required.

Task-1973972
closes #32958

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-05-01 06:39:52 +00:00
Jinal Patel 4cd8fd7228 [IMP] stock: define stock.location form view in a sheet
Related Task: 1935522

closes odoo/odoo#30785

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-06 09:14:24 +00:00
Juhil Somaiya 1414470d34 [IMP] auth_signup: reset password settings should be enabled by default
As it's easy to forgot user's password and if user do,
user currently have no way to reset it if user didn't activate
the settings to enable the Reset Password.

so enable this options by default to avoid people getting blocked
because they forgot their password.

task-1925281

closes odoo/odoo#30391

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-24 11:14:07 +00:00
Florent de Labarre 32eee7b6ec [IMP] tools: add Tb
Tera byte is now common.

closes odoo/odoo#33151

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-03 16:41:01 +00:00
Thanh Dodeur 46b0b33d06 [REF] web: extracts category value selection in a function
This commit extracts the logic of the selection of the default
value for search panel categories into a private function
so it can be hooked in other modules.

task: #1959112

closes odoo/odoo#32448

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-25 07:21:19 +00:00
Damien Bouvy 85f3f5d662 [IMP] payment: make non-essential field not required
This prevent the uninstallation of all payment provider through the
NOT NULL constraint. There is no reason for this field to be explicitely
required - it will fail if the template is wrong anyway.

closes odoo/odoo#33170

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-05-06 06:34:30 +00:00
mreficent 47c9b60969 [FIX] payment_alipay: call of create_missing_journal_for_acquirers
closes odoo/odoo#33152

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-05-03 17:41:01 +00:00
Aaron Bohy ea1b3254bb [IMP] web: multi-line many2one: only highlight first line
Rev. a3489be33 removed this feature to fix a bug (when the single
line many2one, e.g. a product, is too long and displayed over
several lines). However, we (fp) still want this for res_partner
many2ones with show_adress.

This rev. re-introduced the feature without re-introducing the bug.

closes odoo/odoo#33139

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-05-03 12:00:34 +00:00
Nikunj Ladava e335d235f6 [ADD] payment_alipay: added new Alipay payment acquirer
This commit introduces the Alipay payment provider, a popular acquirer
in the Chinese market.

There are 2 possible ways to use this acquirer:
- express checkout mode (only available for merchants located in CN)
- standard checkout mode (availabe for foreign merchants)

Note that this provider does not support server-to-server payments,
tokenization or any other bells and whistles besides fees. There are no
specific behaviours related to this acquirer, it behaves like most 'form
based' payment acquirers with a form submission, s2s notification from
the provider as well as redirect in case the s2s did not reach the
server in time.

closes odoo/odoo#21855

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-05-03 11:40:05 +00:00
mgh-odoo 728ca33cb9 [IMP] sale_stock: schedule activity on picking on change of so shipping address
purpose of this commit is to schedule an activity exception on delivery picking
when user change address of the SO, to notify user that
sales order address is changed.

Task-1888829

closes odoo/odoo#28191

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-02 05:00:53 +00:00
Hetal Dhanak c83f6852c5 [FIX] project: typo in project tag name
Tag name should be "Need Assistance" instead of "NeedAssistance".

Task-1891795

closes odoo/odoo#32146

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-24 09:25:02 +00:00
Robot Odoo b880bfffe4 [IMP] mail, *: activity view 2.0
The activity view has been greatly improved to allow to customize it
more easily. It works quite similarly to the kanban view, defining
`<field>` tags at the top and using these fields in the `<template>`
section. The template name used to define the activity cards is
`activity-box`.

Other features have also been added (see each commit for more information).

closes odoo/odoo#29271

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-05-03 14:28:30 +02:00
Hiral Bhavsar f8d7728bd7 [IMP] *: add activity views on multiple models
The activity view has been added on multiple models (invoice, fleet
contract, vehicles, leads, employee, contract, expense, expense sheet,
leave, leave allocation, applicant, partner, product, task, purchase
order, sale order) to ease the creation and the management of
related actvities.

Task 1894990
2019-05-03 10:19:40 +00:00
Martin Geubelle d75a976054 [REF] mail: correctly promisify activity renderer
None of the promise created in the activity renderer was correctly managed.
This is now the case.

Related to task 1894990
2019-05-03 10:19:40 +00:00
Hiral Bhavsar 983d098794 [IMP] mail: adapt activity qunit test suite
The activity view has been refactored and improved so the qunit test
suite needed to be adapted.

More tests have also been added to test new features (progressbar,
schedule an activity, etc.) and the method 'get_activity' has been
correctly mocked (the result was previously hardcoded).

Task 1894990
2019-05-03 10:19:40 +00:00
Hiral Bhavsar ff6415b63c [IMP] mail: add a progress bar by column in activity view
At the top of each column of the activity view, a progress bar is now
displayed below the activity type name based on activities scheduled.

Note that the progress bar widget is an extension of the kanban progress
bar as both have a very similar behavior.

Task 1894990
2019-05-03 10:19:40 +00:00
Hiral Bhavsar a02d273ebc [IMP] base, mail: set CRUD on activity view as attributes
Just like other views (form, list, kanban, etc.) CRUD operations (create,
delete and edit) are now set as attributes on the activity node based on
the user access rights.

Task 1894990
2019-05-03 10:19:40 +00:00
Hiral Bhavsar 132c0ad9bf [IMP] mail: allow to create record from activity view
In the activity view footer, it's now possible to create a new record
(and an associated activity). When clicking on the link, a 'SelectCreate'
dialog is opened and the activity is created when selecting a record.

Task 1894990
2019-05-03 10:19:40 +00:00
Hiral Bhavsar fac99a901c [IMP] mail: display activity counter on cells
For a record and an activity type (cell in the activiy view), a counter
is now displayed at the bottom right, that shows the number of
activities if more than one are scheduled.

Task 1894990
2019-05-03 10:19:40 +00:00
Hiral Bhavsar 33c0017c0c [IMP] mail: visually show the activity creation on empty cells
An indication that the user can schedule new activities by clicking on
an empty cell is now displayed while hovering an empty cell.

When clicking on the empty cell, the activity form is opened in a modal
defaulted to the corresponding activity type (no dropdown menu anymore).

Task 1894990
2019-05-03 10:19:40 +00:00
Hiral Bhavsar 1a76fc9d2b [IMP] mail: display all activity types in columns
In the activity view, all activity types are now displayed in columns,
even if no activity are scheduled yet for some types.

Note that they are ordered based on their sequence from left to right.

Task 1894990
2019-05-03 10:19:40 +00:00
Hiral Bhavsar b5ed9a7e2e [REF] mail: correctly implement the deadline precision
In activity view, there was a dummy logic for the deadline precision
(the year was not displayed if it was the current year).

This has been fixed with a valid logic as per locale.

Related to task 1894990
2019-05-03 10:19:40 +00:00
Hiral Bhavsar b2de618f9f [IMP] base,mail: allow to customize the activity view
The activity view has been greatly improved to allow to customize it
more easily. It works quite similarly to the kanban view, defining
`<field>` tags at the top and using these fields in the `<template>`
section. The template name used to define the activity cards is
`activity-box`.

Note that these activity cards are rendered using `KanbanRecord` widget
(this has implied that ActivityView inherits from `BasicView`).

Also note that the view validation has been moved in base to include the
common grammar.

Task 1894990
2019-05-03 10:19:40 +00:00
Swapnesh Shah b29d4da037 [IMP] base: use correct string for search filter
Type is the label of the field state ('Custom Field' or 'Base Field') while
ttype is 'Field Type'

closes odoo/odoo#33124

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-03 09:06:26 +00:00
Yenthe666 527d70a602 [IMP] base: improve res.country.state views
Allow to group by country
Add default search filters
Improved help message

closes odoo/odoo#29926

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-03 09:32:12 +00:00
Hetal Dhanak 926bf780b9 [IMP] survey: hide retry button on print view
-Previously, The Retry button was visible on printable view of the
survey as well as on answers.
	-This commit fixes the issue by passing an extra parameter to
determine whether user is in printable view or simply in answer review.

Task: 1967500

closes odoo/odoo#32618

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-25 05:29:09 +00:00
Lucas Lefèvre 207c4cfb3b [FIX] base: Add missing parent_id in res.partner form
Steps to reproduce:
- Install hr and base_address_city
- Edit an employee
- In private info, set a private address
- Open private address form from the employee form

Traceback because parent_id is undefined.

The base_address_city module override a part of res.partner
view form to change the city readonly modifier.
This override adds a domain in which appears parent_id,
but the field is not present in the view.

Related commit 526bfca3af

closes odoo/odoo#32172

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-04-19 06:59:11 +00:00
Swapnesh Shah d909e8650a [FIX] mail: Fixed typo
closes odoo/odoo#33069

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-30 21:02:03 +00:00
Jairo Llopis 88e455b6e9 [FIX] event: Allow to override default method
Without this patch, you have to redefine the field to be able to override this field.

closes odoo/odoo#33049

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-02 08:19:20 +00:00
Géry Debongnie 578c99475d [IMP] web: various small improvements to form view
This commit is a few small improvement/fixes to the web framework:

- allow placeholder attribute on input tags in form view
- only bind click event handler to buttons managed by the framework, not
  custom ones
- _onExecuteAction method in action manager properly fails if event
  cannot be properly handled

closes odoo/odoo#32458

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-05-02 07:14:52 +00:00
Robot Odoo a25298e713 [MERGE] sale, account, _*: improve UTM definition and propagation
Purpose: improve UTM definition and propagation in sale and account
applications, as well as in event.

Specifications

  * inherit from utm mixin in sale for SO and invoice;
  * propagate UTMs from SO to invoice when invoicing;
  * add utm fields on registration model;
  * remove website_sale_link_tracker module and inline its content in sale
    and website_sale;

Merge linked to task ID 1929272

closes odoo/odoo#31260

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-02 10:38:14 +02:00
Julien Mougenot ede3317b68 [IMP] web: close dropdowns on scroll
Dropdown from many2xxx and datepicker widgets now close on scroll
to allow access of background information when scrolling.

Related to task #1929483

closes odoo/odoo#32836

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-04-30 07:30:56 +00:00
Kaushalya Mandaliyaandqsm-odoo 3f18d67f9e [IMP] website: improve customize dialog UI for font selection
Replace the font selection UI by a dropdown. Make the system generic
so that a dropdown can be used for any set of options.

task-1942241

closes odoo/odoo#32437

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>


Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-04-30 14:30:09 +00:00
Robot Odoo 97780e5b8b [MERGE] fields: relational fields automatically behave as mapped
In other words, `recs.foo_id == recs.mapped('foo_id')`.

closes odoo/odoo#32897

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-30 17:25:56 +02:00