Commit Graph
114465 Commits
Author SHA1 Message Date
Alexandre Kühn 8bc7cebd9c [IMP] web: many2many editable list with X remove icon (#20978)
In many2many lists, the remove record from the widget is a trash bin.
It is confusing, as people feel they are deleting it when they are
only unlinking it.

So in many2many, we propose to change the trash icon by a 'X'.

This icon appears in many2many relations and in many2many widgets:
even though hr.expense.sheet defines the expense lines as a one2many,
it uses a many2many widget, so we use a 'X' instead of the trash bin.

To avoid ambiguity, we decided to rename 'delete' to 'remove'.
2018-01-03 11:42:39 +01:00
Raphael Collet c8fa2d581c [FIX] purchase: unfuck rounded float comparison in tests 2018-01-03 10:01:33 +01:00
Sanjay Jamod 0c1fc0b911 [FIX] web: Fix column_invisible issue (#21693)
[FIX] web: Fix column_invisible issue

This commit fixes an issue with the column_invisible attribute.

When we choose product variant for BOM for any particular product, 
at that time from the BOM Lines column "Apply on Variants" is hidden,
but when we unset product variant from BOM Form, 
at that time the column 'Variants" set to visible. but in this case, it is set to hidden always.

PR 21693, OPW 779555
2018-01-02 16:33:45 +01:00
Thibault Delavallée fdb7a8db26 [FIX][IMP] mail: remove cdata of notification email data and fix some invalid stuff
Using xml type it allows to have a cleaner view of the content in a classic
code editor. This commit also fixes some xml-related invalid stuff that
does not impact the notification email rendering.
2017-12-28 12:39:54 +01:00
Richard Mathot f33ea46cef [IMP] delivery: in SO, only suggest carriers available for the partner address 2017-12-27 16:35:33 +01:00
Thibault Delavallée 81d98f32a5 [IMP] mail: improve activity types behavior and access rights
First purpose of this commit is to limit access on activity types.
Employees can now only read activity types. Indeed defining or modifying
activity types should not be done by employees as it impacts daily work
of all other employees. Specific app-based rights are added for project
and sale managers. Those have a specific menu to configure activity
types, meaning they should also have the access rights to do so.

Also including :

 * ease default computation for res_model_id of activity types: using
   default_res_model in context it is possible to specify a default
   res_model_id. It is useful for example to give a specific context
   in configuration menus;
 * add a domain on res_model_id field in order to limit it to models
   inheriting from mail.thread and not being transient;
 * various improvement in activity type form view to ease configuration
   notably the # days renamed to planned in;
2017-12-22 10:30:02 +01:00
qdp-odoo 552f5a40ba [IMP] hr_expense: Add expenses shortcut on accounting dashboard.
Was PR #19108. Was task 36063
2017-12-21 17:28:14 +01:00
Barad Mahendra b1402c6ad5 [FIX] resource: Allow 'Access Rights' users to create companies
Purpose
=======

A 'Access Rights' (group_erp_manager) user can create a company
A 'Settings' (group_system) user can create a resource.calendar

With the resource module, if a resource.calendar is not set on the new company values, a default one is create.

As the 'Access Rights' user can create a company, but can't create a resource calendar, this should be done with sudo.
2017-12-21 15:09:50 +01:00
Prakash Prajapati aed97f4042 [IMP] base: Add a newly created company to the user's allowed companies
Specification
=============

When user is creating a new company (in a multicompany environment), by default, he should have access to this company.

Also, do not allow to create new company from allowed companies dropdown
2017-12-21 15:06:36 +01:00
Kinjal Mehta 22a4ac1b30 [IMP] maintenance: Add archive/unarchive on teams and equipments
Purpose
=======

Right now user not able to archive maintenance equipments and maintenance teams which are no longer in use.

Specification
=============

Add archive button in form view of Equipments and teams. Also add filter on list view.

Don't put a specific team by default on equipment, select the first unarchived one instead.
2017-12-21 13:54:40 +01:00
Richard Mathot f9f4fa1cc8 [MERGE] Make the contacts deduplication wizard available to all apps 2017-12-21 13:05:06 +01:00
Richard Mathot dcad7b37cd [FIX] base: make the test pass
Since this test relies on the fact that no data exists yet, we are
forced to unlink them...
2017-12-21 12:59:23 +01:00
Richard Mathot eb61925344 [FIX] base_partner_merge: this wizard does not depend on mail anymore
We then extract the logging of the merge in a separate submethod, and
log in chatters only when available.
2017-12-21 12:59:23 +01:00
Richard Mathot e330567707 [MOV] base,crm: make contact deduplication wizard available for all apps 2017-12-21 12:59:23 +01:00
Jigar Patel b7eee16a58 [IMP] web_tour: Disable tours when Odoo installed with demo data 2017-12-21 12:58:41 +01:00
qsm-odoo 392c91cda3 [IMP] website, *: keep top menu on one line and review alignments
* portal

When there are too many items in the top menu, the menu is broken into
multiple lines (especially on medium screen resolution). This commit
implements a system like in the enterprise backend: the extra items are
placed in a "+" dropdown menu at the end of the top menu.

Also, review the direction used to open dropdown menus. The default is
now left-to-right (while it was right-to-left before) and JS has been
added to determine the safe direction:
- If last item: to the left instead
- If would overflow the window: to the other direction instead
2017-12-21 09:52:36 +01:00
qsm-odoo 76abdd4ace [REF] website: menu-related JS is supposed to grow, so rename "affix" file 2017-12-21 09:52:36 +01:00
qdp-odoo 5d8de48c65 [FIX] account: typo
When calling action_invoice_cancel, we want to cancel only the invoices that are NOT yet cancelled
2017-12-21 09:07:51 +01:00
qsm-odoo 1d74ed1c55 [IMP] web_editor: make colorpicker option 'bg-'-independent
Now the colorpicker option can be defined with a `data-color-prefix`
parameter which will allow toggling classes different than "bg-*".
(e.g. if the prefix is set to be "hello-", the colorpicker option will
allow to choose between "hello-primary", "hello-danger", ...).
2017-12-20 17:15:08 +01:00
qsm-odoo 8ca92330b3 [IMP] web_editor: allow to define multiple select-class groups
Before this commit, when defining two sets of classes to be chosen
independently on a same element you had to define two options:

```
<div data-selector=".myElement">
    <li class="dropdown-submenu">
        <a tabindex="-1" href="#">Classes set 1</a>
        <ul class="dropdown-menu">
            <li data-select-class="a"><a href="#">A</a></li>
            <li data-select-class="b"><a href="#">B</a></li>
            <li data-select-class="c"><a href="#">C</a></li>
        </ul>
    </li>
</div>
<div data-selector=".myElement">
    <li class="dropdown-submenu">
        <a tabindex="-1" href="#">Classes set 2</a>
        <ul class="dropdown-menu">
            <li data-select-class="x"><a href="#">X</a></li>
            <li data-select-class="y"><a href="#">Y</a></li>
            <li data-select-class="z"><a href="#">Z</a></li>
        </ul>
    </li>
</div>
```

Now, an unique option can be used for this, allowing to not duplicate
the `data-selector` and not creating two JS options:

```
<div data-selector=".myElement">
    <li class="dropdown-submenu">
        <a tabindex="-1" href="#">Classes set 1</a>
        <ul class="dropdown-menu">
            <li data-select-class="a"><a href="#">A</a></li>
            <li data-select-class="b"><a href="#">B</a></li>
            <li data-select-class="c"><a href="#">C</a></li>
        </ul>
    </li>
    <li class="dropdown-submenu">
        <a tabindex="-1" href="#">Classes set 2</a>
        <ul class="dropdown-menu">
            <li data-select-class="x"><a href="#">X</a></li>
            <li data-select-class="y"><a href="#">Y</a></li>
            <li data-select-class="z"><a href="#">Z</a></li>
        </ul>
    </li>
</div>
```
2017-12-20 17:15:08 +01:00
qsm-odoo 374fa10272 [IMP] web_editor: allow to define options' target in XML data
Before this commit, defining a snippet option began by choosing an XML
`data-selector` attribute to put on the option's <div/>. This selector
would then be used to find DOM elements on which to attach the option.

A recent refactoring added the `data-exclude` attribute, allowing to
define a selector that a DOM element must not match to receive the
option.

A new kind of need has arrived: allowing an option to be attached on a
DOMElement but making the option's effects be applied on a specific
child of this DOMElement. This can allow to regroup children options on
a main DOMElement.
To that effect, this commit introduces the optional `data-target`
attribute. If defined, its value is used as a selector to find the
option's `$target` inside the element found with previous rules. Note
that the system has been made smart enough to only add the option on
elements which indeed contain such a $target.

E.g. I want an option to appear in the customize menu of my custom
snippet's <section/> but will in fact control the toggling of a class
'super-row' on the `.row` (I don't want the option to be on the `.row`
otherwise it would not be in the main customize menu). All I have to
do is defining a
```
<div data-selector="section" data-target="> .container > .row">
    <li data-toggle-class="super-row"><a href="#">Super Row</a></li>
</div>
```
(no JS required)

Note: a similar behavior was already present on the JS side of the
"colorpicker" option.
2017-12-20 17:15:08 +01:00
Thibault Delavallée cc652c65ec [FIX] l10n_generic_coa: make invoice line demo real records
Otherwise you cannot reinit the module because you cannot remove lines
of confirmed invoices. The (5, 0) command crashes.
2017-12-20 13:54:10 +01:00
Thibault Delavallée dd47abdcc3 [FIX][IMP] stock: set picking_warn as non required
When reinitializing modules it is impossible to create partners if
stock is installed because picking_warn field has a required column
but no default value if the module does not depend from stock. Use
case is trying to run test_mail tests with stock installed.

As this field is not business critical it is now not required. As there
is a default value behavior should not change for users.
2017-12-20 13:53:45 +01:00
Thibault Delavallée 06a02ae4c2 [FIX][IMP] account: set invoice_warn as non required
When reinitializing modules it is impossible to create partners if
account is installed because invoice_warn field has a required column
but no default value if the module does not depend from account. Use
case is trying to run test_mail tests with account installed.

As this field is not business critical it is now not required. As there
is a default value behavior should not change for users.
2017-12-20 13:52:01 +01:00
Laurent Smet 5cca55dac7 [IMP] account, account_cancel: cancelling paid invoices
When an invoice is paid, the button "Cancel" was not visible. For a better guidance, we now show that button.
    Indeed, after having unreconcilied the invoice and the payment, the user should be able to cancel the invoice.

    It also now allows to cancel wrongly encoded invoices with 0 as total (they were directly marked as paid, preventing
    their cancellation)

    Was PR #20470. Was task: https://www.odoo.com/web#id=34307&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
2017-12-20 13:23:22 +01:00
Martin Geubelle 2672143713 [FIX] web_tour: do not consume a tip with blockUI
To consume a tip, the elements matching the selectors `trigger` and
`extra_trigger` must exist in the dom.

However, the presence of blockUI should prevent the tip to be consumed
in the tour because the user can't physically execute the corresponding action.
2017-12-20 11:20:01 +01:00
Yannick Tivisse f42d1cc843 Revert "[IMP] sale: Remove 'Invoice Order' from Action menu on sales orders"
This reverts commit 7b86a7beb8.

It removes the action from the sales order list view as well, which was not expected by our Product Owners team.
2017-12-20 10:46:49 +01:00
Thibault Delavallée f3687f7eec [FIX] test_mail: update query counters for enterprise
As on enterprise module install order can be different from community
query count for some mail-related tests are different. This commit
updates some counters to avoid breaking enterprise runbot and give
time to find the source of added queries.
2017-12-19 17:25:36 +01:00
Thibault Delavallée 8655b32bb8 [FIX] mail: fix tracking test with employee, reusing previous record
Query count was wrong as the tracking was not performed.
2017-12-19 15:52:41 +01:00
Nirali Sapra 11f6b294bd [IMP] mail: don't delete in-use activity types, archive them instead 2017-12-19 14:48:22 +01:00
Ankit Sathvara 149a05c6fe [REM] project: Remove the tasks merge feature
Purpose
=======

In a business point of view, it make no sense to merge record. if someone want really to merge record they have to do this manually to think about all corner case. What about id sent to the customer ? what about timesheet ? what about business ?

The idea of the task: remove this feature in both app, project.task and in helpdesk

Specification
=============

Remove both features

"Merge Selected Tickets" in helpdesk
"Merge Selected Tasks" in project.task
2017-12-19 13:35:00 +01:00
jem-odoo 56f5901ff8 [IMP] sale: make test at install
Since test cases of sale depends on account common
class test, they are executed post_install.
For some futur dev, we will need to launch them
at install (since stock module change the behavior
of consumable product for delivered quantity computation).

This commit:
- avoid test to use demo data
- reuse common helpers to generate testing
data
- make test suite share common test classes
2017-12-19 09:14:44 +01:00
jem-odoo 35e0347e4b [IMP] account,sale,expense: test when no chart of account
Accounting tests are executed post install to be sure a chart
of account is install. However, for some case, we might want
to run test at module installation, involving accounting, without
being sure a chart of account is installed.

This commit provides a base common test class with a minimal chart
of account (some journals and accounts) allowing to start tests at
installation. this class should be extended in sale or expense for
this modules to be tests at installation. We will required this for
reinvoice test in sale later (test consumable product when sale_stock
is not installed, but maybe without a chart of account). The idea is
each test suite can call method to setup their own data.

This commit also use this common test class in sale_expense.
2017-12-19 09:14:44 +01:00
jem-odoo 68a6bd8de1 [IMP] account: add log warning when skipping a test
Accounting tests are done 'post install' because
their generally requried a chart of account to be
installed before test execution.
If a test is launched before l10n install, the test
will be skipped but nobody will know it, unless you
read all the logs of your server.
When skipping a test, a warning should be displayed.
2017-12-19 09:14:44 +01:00
Christophe Monniez 231c4d5fd8 [FIX] web_editor: rte_inline tour succeed on chrome
The rte_inline tour was failing on chrome because jquery selector in
chrome does not like a space in the style selector.
On the other hand, other browsers and phantomjs need the space.
This commit change the selector to find the element on chrome and
friends.
2017-12-18 22:44:44 +01:00
Christophe Monniez 357b1422f2 [FIX] portal: verify input content instead of body
When running the portal tour, the test succeed too early because it finds
the words "Your Details" on the wrong page (/my instead of /my/account).
The selector has a match on previous page, so tour succeeded when it 's
not complete.

This commit use another selector that only match on the '/my/account'
page.
2017-12-18 21:41:03 +01:00
Christophe Monniez 637dda0d2b [FIX] account: verify that account exists before automatic reconcile
When using the fast_counterpart creation method to automatically
reconcile bank statement lines, there was no verification that the
account id was not set or that the statement was already linked to journal
entries. It was causing a traceback in some conditions when the
demo data were loaded because the fast_counterpart_creation was called
without the verification, using an XML function.

This commmit introduce the necessary verifcation.
Thanks @qdp-odoo for the review and some docstrings/comments
2017-12-18 21:33:36 +01:00
Christophe Monniez f73098fcba [FIX] test_mail: increment the query counter for employee too
When searching the id mail.mail_activity_data_todo a request is done and
should be taken into account by the assertQueryCount.

This commit does just that... for the employee login.
Thanks to the murphy's law, the test branch was green.
2017-12-18 16:48:48 +01:00
Christophe Monniez 292f53885c [FIX] test_mail: increment query counter
When searching the id mail.mail_activity_data_todo a request is done and
should be taken into account by the assertQueryCount.

This commit does just that.
2017-12-18 16:36:23 +01:00
qsm-odoo b1d5347849 [REF] website_theme_install: remove useless conditions
Useless since 5238595648
2017-12-18 16:02:19 +01:00
Akash Bhavsar 5238595648 [REF] theme_*: change category and summary of themes
task-32528
2017-12-18 15:35:05 +01:00
Thibault Delavallée 9b75577320 [IMP] test_mail: add some mail performance tests
New tests are added in test_mail to have tests for message_post and
complex mail thread features. Purpose is to have performance counters
for more complex stuff in mail and begin to work on performances
and try to lessen those counters.
2017-12-15 16:45:37 +01:00
Ankit Sathvara f02c6fd956 [IMP] lunch: mobile-friendly view for lunch order lines 2017-12-15 16:19:48 +01:00
Géry Debongnie 377705aada [IMP] web: tests: add a way to properly mock Widgets
This rev. introduces two helper functions for the tests: patch
and unpatch. Those function allow patching an Odoo Widget (e.g.
AbstractField), and unpatch it at the end of the test with the
guarantee that the Widget's prototype is exactly the same as it
was before the test.

This was necessary because the way it was done before was a little
bit too naive, and could lead to unexpected behavior. Indeed, doing

 var someFunction = AbstractField.prototype.someFunction;
 // test content
 AbstractField.prototype.someFunction = someFunction;

is correct if someFunction is actually define (or overriden) in
AbstractField, as in that case, it really exists on its prototype.
Otherwise, it isn't correct if it is not directly defined on the
prototype before the test, as it will be after..
2017-12-15 13:07:34 +01:00
Aaron Bohy 7f467d2346 [FIX] base_import: don't reload twice when leaving
The 'on_reverse_breadcrumbs' option of do_action() allows to
define an handler to execute when coming back to the previous
action by clicking on the breadcrumbs.

This option was set when executing the Import client action, to
ensure that the previous view was reloaded when the client action
was left. However, the view to restore is always reloaded, so
specifying the option in this case produces a double reload.
2017-12-15 13:07:34 +01:00
Thibault Delavallée 0ae15750d4 [IMP] mail: bounce email going directly to catchall when they are no replies 2017-12-15 12:33:23 +01:00
nla-odoo b624473b2a [FIX] google_calendar: GC settings are now on the general settings page 2017-12-13 14:13:29 +01:00
Viral Thakar f53f6f865b [IMP] hr,mail: adapt tooltip message to new field values and fix a typo 2017-12-13 11:16:05 +01:00
ppr-odoo 6cc56d2c92 [FIX] website_mass_mailing: typo in tooltip 2017-12-13 10:49:14 +01:00
nla-odoo 3604cf544e [FIX] stock: fix typo crash on forecasted products 2017-12-13 10:33:33 +01:00