Commit Graph
117220 Commits
Author SHA1 Message Date
Yannick Tivisse 13bd8e7db6 [IMP] fleet: Order cars by plate, then by acquisition date
This commit allow users to see in the kanban/list view the oldest cars with no plates
2018-04-27 17:30:30 +02:00
Yannick Tivisse 47857a63ac [IMP] fleet: Remove the unicity constraint on the driver
It should be possible to assign 2 vehicles to the same person.

The constraint is too restrictive.
2018-04-27 17:30:29 +02:00
Yannick Tivisse 2bc85571a9 [IMP] fleet: Display all the stages on the fleet.vehicle kanban view
All the stage should be displayed to allow a user to move a car in another stage
even if no other cars are into it.
2018-04-27 17:30:29 +02:00
Yannick Tivisse b510e7f41b [IMP] fleet: Make the license plate not required
It's not mandatory for a car in the fleet to have a license plate.

It should be possible to create the car before the immatriculation date.
2018-04-27 17:30:29 +02:00
Yannick Tivisse 647292a963 [IMP] fleet: Add a default value for 'acquisition_date' 2018-04-27 17:30:29 +02:00
Cédric Snauwaert d3d2612061 [IMP] account: Speed up of some processes
* Reconciliation
    Change the way the reconciliation method was written to optimize performances.
    Remove the "skip_full_reconcile_check" stuff that is more confusing than helping.
* Object creation
    Remove the creation of tax_line from tax_ids in the account_move_line create method.
    Remove a bunch of context that were invalidating the cache way too often

Was PR #21498
Was task 37976
2018-04-27 17:16:03 +02:00
Hiral Bhavsar 42b7d7489a [IMP] account: some minor usability improvements
* when refunding an invoice/bill with the option 'modify', it now opens the draft document in form view (chatter reworked for more clarity)
* payments list views are now using filters instead of domain, so that user can easily find back any payments (also transfer that haven't their dedicated menuitem)
* when clicking on a ling to create a new payment from the dashboard, the form view is directly open instead of the list view

Was PR #23402. Was task 58392
2018-04-27 14:02:05 +02:00
XavierDo d6a9a9bf4c [IMP] portal: clean portal task controller
Remove some code that was kept for retro-compatibility
while merging task 1827950 in 11.0 (stable)

Task #1838048
PR #24425
2018-04-27 10:11:06 +02:00
Nicolas Lempereur db86e1d9e4 [FIX] sql_db: log-level debug_sql log parameters
Since 1a58e108 (on 10.0 and over) parameters are no longer present when
logging sql queries.

This removes some of the usefulness of the feature, and this commit adds
them back.

Since mogrify returns a byte string in the database encoding, we decode
it using the corresponding python encoding.

opw-1839241
closes #24446
2018-04-26 16:54:32 +02:00
qsm-odoo b2ad88e38d [FIX] web: form buttons should always get a btn style class
Here is the story of the problem: back in 10.0, everything *seemed*
fine with button rendering except it was very messy duplicated codes.
The system was still not consistent:

-> In Header, button with:
no class -> btn-default
btn-primary -> btn-default btn-primary
oe_highlight -> btn-primary
btn-default -> btn-default
btn-link -> btn-default btn-link
oe_link -> btn-default oe_link
btn-danger -> btn-default btn-danger
some_class -> btn-default some_class

-> Not in header, button with:
no class -> no class
btn-primary -> btn-primary
oe_highlight -> btn-primary
btn-default -> btn-default
btn-link -> btn-link
oe_link -> oe_link
btn-danger -> btn-danger
some_class -> some_class

So, outside the header, the system seemed to not process anything except
transforming the oe_highlight class. In the header, the btn-default was
always added, except if using the oe_highlight class. The style is fine
for those, except for .btn-default.btn-link and .btn-default.oe_link
where the link class has no effect (which is fine as header are not
supposed to contain links).

In 11.0, the new views were introduced alongside websitepocalypse. The
new system led to:

-> In Header, button with:
no class -> btn-default
btn-primary -> btn-default btn-primary
oe_highlight -> btn-default oe_highlight
btn-default -> btn-default
btn-link -> btn-default btn-link
oe_link -> btn-default oe_link
btn-danger -> btn-default btn-danger
some_class -> btn-default some_class

-> Not in header, button with:
no class -> btn-default
btn-primary -> btn-primary
oe_highlight -> oe_highlight
btn-default -> btn-default
btn-link -> btn-link
oe_link -> oe_link
btn-danger -> btn-danger
some_class -> some_class

So, it worsened the header buttons by not processing the oe_highlight
class and adding the btn-default class in all cases. This is even
worse since in 11.0 .btn-default.btn-link do have a specific style and
thus not appear as .btn-default anymore. Those may be invisible "bugs"
though as .btn-link are not supposed to be in header and oe_highlight
is styled correctly in css. For buttons outside the header, a little
processing was added to add "btn-default" class for buttons which did
not specify a class (and oe_highlight is not processed anymore there
too).

In master, with the less2scss task, the system had to change again but
led this time to visible bugs:

-> In Header, button with:
no class -> btn-default
btn-primary -> btn-primary
oe_highlight -> btn-primary
btn-default -> btn-default
btn-link -> btn-link
oe_link -> btn-link
btn-danger -> btn-danger
some_class -> some_class

-> Not in header, button with:
no class -> btn-default
btn-primary -> btn-primary
oe_highlight -> btn-primary
btn-default -> btn-default
btn-link -> btn-link
oe_link -> btn-link
btn-danger -> btn-danger
some_class -> some_class

As you can see, the system is now the same for both header button and
normal buttons. The system is also better for all cases as it produce
only *one* *bootstrap* class for all cases. However, the problematic
case is the last one for header buttons: it did not receive the
btn-default class automatically. Even though this is the API for the
rest of odoo (dialogs, renderButton (old WidgetButton), ...), this is
a problem here as fixing this would require to add the 'btn-default'
class in every view which is using this case.

While waiting for a better solution, this commit is instead forcing
the btn-default class in that header case only (so only when a class
was mentioned but it did not contain any bootstrap btn type class).
So the new system gives:

-> In Header, button with:
no class -> btn-default
btn-primary -> btn-primary
oe_highlight -> btn-primary
btn-default -> btn-default
btn-link -> btn-link
oe_link -> btn-link
btn-danger -> btn-danger
some_class -> btn-default some_class

-> Not in header, button with:
no class -> btn-default
btn-primary -> btn-primary
oe_highlight -> btn-primary
btn-default -> btn-default
btn-link -> btn-link
oe_link -> btn-link
btn-danger -> btn-danger
some_class -> some_class

This commit also adds tests which will prevent the system to change
again without noticing it.

Closes https://github.com/odoo/odoo/pull/24443
2018-04-26 16:23:39 +02:00
qsm-odoo 9fb6d6eac3 [REF] web: make cleaner code for the renderButton helper
In particular, allow to create a button without a sizing class.
2018-04-26 16:23:16 +02:00
Yannick Tivisse 4fc9a5c186 [MERGE] various: Replace the reified user's groups view by computed fields
This commit has several purposes:
- Group public/portal/employees access rights into a single selection field
- Rename the 'Employee' access right into 'Internal User'
- Remove the groups reified view on the user form and replace it by real
  computed fields: Selection fields for the application groups, and
  Boolean fields for the isolated groups.

For more information about the specification please check the related commits

Task ID: 32258
2018-04-26 16:07:12 +02:00
Yannick Tivisse 382fbd3520 [IMP] base: Remove unused module categories
The categories other extra rigths and hidden are not used now.
2018-04-26 15:13:38 +02:00
Yannick Tivisse bd49f9fd17 [IMP] base: Remove the reified view on 'groups_id' in res_users' form
Now all the group fields are defined on the res.users model. No need to
generate a reified view according to the groups definitions.
2018-04-26 15:13:38 +02:00
Yannick Tivisse 99f497b390 [IMP] *: Define groups on res.users models
The reified view on the res users will be dropped in the following commit.

The previous commit adds support to define each group as a computed field on the res users.

This commit defines:
- A boolean field for each 'isolated' res.group, i.e. a group in the hidden category.
- A selection field for each 'Application' res.group, i.e. a group in a application category.

Example:
- The group to manage pricelist in sales becomes a boolean field
- The groups project user/manager become a selection field
2018-04-26 15:13:38 +02:00
len-odoo ab179bb2d7 [IMP] base: Add compute/inverse methods to manage user groups
Purpose
=======

Allow to define users groups on a res.user with computed fields based on the 'groups_id' field.

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

Add compute/inverse methods to manage specific groups on a res.users.

These methods should be used on fields defined like one the following cases:

1. A boolean field with the compute/inverse method and an attribute group_xml_id.
Example:
    has_group_discount_per_so_line = fields.Boolean(
        "Discount on lines",
        compute='_compute_groups_id', inverse='_inverse_groups_id',
        group_xml_id='sale.group_discount_per_so_line')

2. A selection field with the compute/inverse method, the selection got from '_get_group_selection'
   and an attribute 'category_xml_id'
Example:
    group_sales_team_user = fields.Selection(
        selection=lambda self: self._get_group_selection('base.module_category_sales_management'),
        string="Sales", compute='_compute_groups_id', inverse='_inverse_groups_id',
        category_xml_id='base.module_category_sales_management')

The fields will be set according to the groups defined in the 'groups_id' field, and the 'groups_id'
field will be modified according to the modifications made on theses fields when saving the users's
form.
2018-04-26 15:13:38 +02:00
len-odoo e67b61811b [IMP] base: Rename "Employee" access right into "Internal User"
This doesn't mean that the user is an employee. It means that the user
can have access to internal resources on the company.
2018-04-26 15:13:38 +02:00
len-odoo 5478802843 [IMP] base: Regroup Public/Portal/Employee access rights under the same category
These groups should be exclusive. It makes no sense to have an employee who's also
a public user.
2018-04-26 15:13:38 +02:00
qsm-odoo 734724691a [FIX] web: restore btn-link variations and badge style
+ printing improvements

Some style was lost for mysterious reasons during the less2scss
convertion.
2018-04-26 12:35:24 +02:00
Mohammed Shekha d9662321e2 [IMP] web: Kanban: correct cover image margins
The cover image top and bottom margins should be the same on a kanban record.

The bottom margin on `o_attachment_image` has thus been removed as it is already
defined on `o_kanban_record_body` class, which makes a double bottom margin.

Task 54019
2018-04-26 11:08:54 +02:00
Géry Debongnie c5f50c56a9 [FIX] web: fix a race condition in web client
Here is an interesting scenario, involving the reconciliation tour again
(because it is our only tour that does async stuff before changing url):

- web client starts normally
- tour reconciliation starts, perform an rpc to find some id
- web client fetches users default action, it is empty, so clicks on
  first menu item to load initial action, which is discuss. this will
  make the web client load the action with datamanager (it should be the
  action manager's job!).
- reconciliation tour rpc completes, it changes the url, this will do a
  do_action
- the load_action rpc from the web client completes, it will then
  perform a do_action, which will drop the action initiated by the tour
- tour fails.

The issue here is that the on_menu_action method from the web client is
not really safe, from a concurrency point of view: it performs some
asynchronous work, and then unilateraly decides to do a doAction.  With
this commit, we simply add the do_action request to the action manager,
which uses internally a "dropprevious" system.  This means that it will
always use the last action, just as expected.
2018-04-26 09:45:06 +02:00
Christophe Monniez 5666bc3d32 [IMP] packaging: automate package update in Windows build
When building the Windows installer, a virtual machine is used with
prepackaged python modules.

With this commit, the packaging script will try to install on the
virtual machine the python packages specified in requirements.txt.
Each package is installed individually, that way, if an install fails,
the install of the other packages continues.
At the end of the process, successfully packages are listed so that they
will appear in the build log files.

Also, the Makefile was cleaned in this commit (removal of py2exe stuffs).
2018-04-26 09:22:38 +02:00
Fabien Pinckaersand 051dfea35e [IMP] account: new way of auto-completion of vendor bills/credit notes
This adds the possibilty to select another account.invoice object in a vendor bill or credit note, to automatically copy its lines.

When the purchase app is installed, the same field can be used for auto-completion and users can choose between vendor bills or purchase orders (preferably PO)

Co-authored-by: dat@openerp.com
2018-04-25 17:12:15 +02:00
04c44c479d [IMP] base(_import),web: mute Add/Create button in x2m
... by setting it 'btn-default', because users hesitate between
that button, and those in the control panel.

Task 32950

Co-authored-by: dbh <dbh@odoo.com>
Co-authored-by: aab-odoo <aab@odoo.com>
2018-04-25 15:09:35 +02:00
Aaron Bohy f85a54257d [FIX] web: BasicRenderer: button's name attr in DOM
Rev. 374af56 changed the way 'button' nodes are rendered in basic
views (form, list, kanban). As a consequence, their 'name'
attribute wasn't transmitted to the produced html elements anymore.
However, this attribute is very convenient to debug views, and to
write selectors in tests. For instance, it broke the test added by
rev. 8d17a2a once forwardported in master.

This commit reverts 1ce5bea.
2018-04-25 15:08:53 +02:00
Christophe Simonis 1ce5bea306 [FIX] base: adapt js test to new button rendering
Now, button name is not set in dom anymore.
2018-04-25 12:29:34 +02:00
Hiral BhavsarandMohammed Shekha 5c651a09e1 [IMP] web: Kanban: allow to archive/restore column records
This feature has been removed in rev. odoo/odoo@e533085 but this commit
reintroduces it. It was considered as "too dangerous" for new users.

Instead of removing the feature, a confirmation request has been added to warn
the user about his potentially harmful action.

The same warning has also been added in List view when archiving records.

Task 60393

Co-authored-by: Mohammed Shekha <msh@openerp.com>
2018-04-25 09:50:44 +02:00
Christophe Simonis b192431aee [MERGE] forward port branch saas-11.3 up to ec5e27bb7c 2018-04-24 17:42:41 +02:00
Christophe Simonis ec5e27bb7c [MERGE] forward port branch saas-11.2 up to 7fd9dbdd9f 2018-04-24 16:35:06 +02:00
Christophe Simonis 7fd9dbdd9f [MERGE] forward port branch 11.0 up to b9ce1affbf 2018-04-24 15:55:17 +02:00
Géry Debongnie 8d17a2ae55 [FIX] base: do not read settings record again
The settings view is supposed to open a new record on the model
res.config.settings, perform the default_get and onchange calls, then
display the result.

However, once this is done, if the user then clicked on some links
(which do save the current record and navigate to another action), then
click on the breadcrumbs to come back to the settings view, then the
settings view will reload the current record, which has an id, and this
also will update the url.

This could be a problem.  For example, in a multicompany settings,
reloading a settings view from an id will reload the settings for a
given company, even if the user changed its current company.

To fix this issue, we make sure the basic model for the settings view
'forgets' the res_id key, so it will be compelled to actually reread a
new settings form record.
2018-04-24 14:42:34 +02:00
Géry Debongnie 3b3f6cc069 [FIX] mail: update test broken by forward port
The _mockMessageFetch method was changed in the mockserver in saas11.2.
The forward port then obviously broke this test, which depended on the
fact that it returns an empty list.
2018-04-24 14:37:14 +02:00
Christophe Monniez ddf601d443 [FIX] packaging: remove libsass dependency in debian package
A dependency to libsass was added in debian package and in the docker
file. The Odoo nightly builds of the deb package was failing because
this lib is named libsass0 in Debian.

Finally, this dependency is not required because python3-libsass already depends on libsass0.
2018-04-24 13:51:13 +02:00
Darshil Trivedi 04e7a2c7f1 [IMP] web: Kanban: change the color of folded columns
Task 58934
2018-04-24 12:16:00 +02:00
qdp-odoo b9ce1affbf [REV] account: reverts commit 0351b492d5.
Unexpected runbot failure detected. Pach reverted for further investigation. Sorry for the disturbance
2018-04-24 12:10:06 +02:00
qdp-odoo 0351b492d5 [FIX] account: fix unreconciliation implying several exchange rate entries
Use case fixed: manual reconciliation through the account.move.line list of items with several currencies, that will create a full reconcilation with several exchange rate entries to balance the amounts in all foreign currencies. Unreconciling these lines was wrongly creating an account.move with a lot of lines with debit = credit = amount_currency = 0.
2018-04-24 10:46:51 +02:00
Géry Debongnie fcc6e9e3be [FIX] web: correct docstring (was showing incorrect type)
This is my mistake, I added the docstring without properly checking the
type.
2018-04-24 10:22:24 +02:00
Mohammed Shekha c1bf1c6a54 [FIX] web: preserve new column order after creation
When a user creates a new column in a kanban view, leave the action and
comes back, the order is not preserved.  With this commit, we force a
call to resequence to ensure that the order does not change.
2018-04-24 10:18:33 +02:00
qdp-odoo 61fe7a7820 [FIX] account: allow switching from CoA if empty moves exists
This is needed in case we open the Chart of Account step from the configuration bar, as it will silently create the opening journal entry
2018-04-24 09:21:01 +02:00
Arnold Moyaux 3412dae02d [FIX] mrp: dynamic bom report correct bom cost
The variable used in order to sum the total cost
was the same that the one used in order to save
sub bom cost. The total cost was override at each
loop and the total cost was equals to twice the last
bom line cost.
2018-04-24 09:15:40 +02:00
Christophe Simonis 8344b61b49 [REL] back to v12 alpha
Seems to be a recurring error...
2018-04-23 20:19:39 +02:00
Christophe Simonis 713d13986b [FIX] hr_holidays: correct xml declaration
Conflict resolution error of last forward-port
2018-04-23 19:55:08 +02:00
Christophe Simonis 1f22b81203 [MERGE] forward port branch saas-11.2 up to 7113b70762 2018-04-23 19:36:25 +02:00
Christophe Simonis 7113b70762 [FIX] test_performance: adapt new test to new api 2018-04-23 19:13:23 +02:00
Christophe Simonis e8bf128318 [MERGE] forward port branch 11.0 up to 3ab25b60bc 2018-04-23 18:15:25 +02:00
Christophe Simonis 3ab25b60bc [MERGE] forward port branch saas-15 up to cae950e826 2018-04-23 17:59:59 +02:00
Christophe Simonis cae950e826 [MERGE] forward port branch saas-14 up to 0c40ba6c8b
Also include a fixup in purchase.pot of previous forward-port
2018-04-23 17:36:56 +02:00
Christopher Ormaza 30490cae89 [FIX] web: handle nested x2m default values
The initial rev. odoo/odoo@2d3ecf2 that was supposed to handle this use case
was in fact only dealing with one command as default value for nested x2m, not
more.

The basic model can now handle multiple commands.

Closes #24241
2018-04-23 17:35:03 +02:00
Mitali Patel b78cfee4fb [IMP] crm: Change the priority labels on lead/opportunities
Relabel priority values like this::

   Low = no star
   Medium = 1 star
   High = 2 stars
   Very high = 3 stars

Task Id: 1827293
2018-04-23 17:14:27 +02:00
Mitali Patel 9f392372e2 [IMP] crm: Improve tour labels
Task Id: 1827293
2018-04-23 17:14:27 +02:00