Commit Graph
127612 Commits
Author SHA1 Message Date
Alexandre Kühn de1631c717 [FIX] web: call on_close handler from history_back
Revision on https://github.com/odoo/odoo/commit/3210f108272be89f1a7b01f4e1816b7f04ae0a3b

Before this commit, when doing an action that opens a dialog
(with `target: 'new'`), then triggering 'history_back', the
`on_close` handler of the action was never called.

This was not the correct behaviour, because the dialog closes
without the `silent` option set. Indeed, when this option is
not set, it should always call the `on_close` handler.

The bug comes from closing the dialog without any options, and
this case was not handled correctly in the commit above. This
commit fixes the problem by ensuring that the `on_close` handler
is called even when closing the dialog without any option.
2018-08-31 14:31:01 +02:00
Thibault Delavallée 0f3281e3b1 [REF] hr_holidays: clean leave and allocation access rights
Purpose

 - clean access rights;
 - solve some access and security issues;

Access specifications

 - an user
  - can see all leaves;
  - cannot see name field of leaves belonging to other user as it may contain
    private information that we don't want to share to other people than
    HR people;
  - can modify only its own not validated leaves (except writing on state to
    avoid bypassing validation);
  - can discuss on its leave requests;
 - an Officer
  - can see all leaves;
  - can validate "HR" single validation leaves from people if
   - he is the employee manager;
   - he is the department manager;
   - he is member of the same department;
   - target employee has no manager and no department manager;
  - can validate "Manager" single validation leaves from people if
   - he is the employee manager;
   - he is the department manager;
   - target employee has no manager and no department manager;
  - can first validate "Both" double validation leaves from people like "HR"
    single validation, moving the leaves to validate1 state;
  - cannot validate its own leaves;
 - a Manager
  - can do everything he wants

In top of that, multi company rule are correctly added.

In reporting model using in "summary" name field should also be stripped
if you are not an HR officer and if it is not your own request.

Concerning allocation requests: implement same rules except constraint on
name field as it is less private and therefore can be seen.

This commit is linked to task ID 1876795 and PR #26656.
2018-08-31 14:19:23 +02:00
Thibault Delavallée 0113d989a8 [REV] hr_holidays: revert "[FIX] hr_holidays: officers can CRUD leaves for their companies"
This commit was not correct and was a quick fix to avoid blocking daily use
of odoo saas-11.3. Next commit will fix access rights and enforce their
definition through more detailed tests.

This reverts commit ae34db3221.

This commit is linked to task ID 1876795 and PR #26656 .
2018-08-31 14:19:23 +02:00
qsm-odoo 4bb0ea03e5 [FIX] website_theme_install: create theme attachments... with their key 2018-08-31 13:44:31 +02:00
Nicolas Martinelli 078c3ec492 [FIX] payment_authorize: remove incorrect fields
`firstName` and `lastName` should be filled in for Australia, but the
implementation is not correct since:
- it assumes that the name is first name + last name, which is not the
  case in all countries (e.g. France)
- it doesn't take into account that the name could be a company name

This reverts commit 26974d4e5f.
2018-08-31 13:37:25 +02:00
Nicolas Martinelli ce6400e098 [FIX] mass_mailing_event: event domain
- Create an event, add an attendee
- Click on the stat button 'Mail Attendees'

The domain is shown as 'Event', '?', [id].

This is because the domain selector widget doesn't support the `in`
operator. Supporting it is not trivial, since ultimately `field_utils`
cannot parse a list of ids for a Many2one. It's less intrusive to change
the domain, since a standard use of the method will simply contain a
single id.

opw-1878322
2018-08-31 13:15:40 +02:00
Alexandre Kühn f7fbe8adff [FIX] web: make 'Edit View: X' translatable
Revision on https://github.com/odoo/odoo/commit/4f6f562c973ce2efd5631ea0e249e75d94cac104

Contrary to what the commit above said, the string was not translatable.

This commit fixes the issue by using the property `display_name`, which
is the translatable equivalent string of `_.str.capitalize(type)`.
2018-08-31 12:21:51 +02:00
Alexandre Kühn cb91165b9f [REF] web: move debug_manager_tests in tools
Revision on https://github.com/odoo/odoo/commit/984554f4cacf3aa7c9750c2972539ab26c4eb3a7

So that folders in 'tests' is on par with folders in 'src/js'.
2018-08-31 12:21:51 +02:00
Nicolas LempereurandWolfgang Pichler 79e18ac6af [FIX] base: user fields_get no add group if asked
The override of fields_get adds "virtual" fields corresponding to
groups.

If for example we make "res.users" have inherit "mail.thread", we get
these "virtual" field as if they had "track_visibility", since we do a
"fields_get" with fields having track_visibility expecting to only get
back "track_visibility" ones.

So the system would then fail trying to track visibility on fields like
"in_group_5" and for example a res.users could not be created anymore.

With this fix, we fix the fields_get so it respect the fields we ask of
it.

fixes #22332
opw-1878654
closes #22338
closes #26705

Co-authored-by: Wolfgang Pichler <wpichler@callino.at>
2018-08-31 12:02:21 +02:00
Sanjay Jamod 2b51fefa5e [FIX] *: BS4, adapt page-header class
Closes https://github.com/odoo/odoo/pull/26420
2018-08-31 12:01:36 +02:00
Gert Pellin 26974d4e5f [FIX] payment_authorize: add required fields for wespac Australia (#26709)
for the payment processor wespac there are required fields we do not send.

required:
•Card Number
•Expiration Date
•Amount
•First Name
•Last Name
•Address
•City
•State/Province**
•Zip Code (Postal Code/Postcode)**
•Country
•Email

** These fields are optional if the billing address is not in the U.S. or Canada. If the address is in the U.S. or Canada, the two-digit State/Province code must be provided, along with the Zip/Postal Code.
2018-08-31 11:29:38 +02:00
Laurent Smet abd6cf7780 [FIX] account: fix domain on account.reconcile.model form view
[('tax_id', '=', None)] doesn't work. It should be False instead of None.
2018-08-31 11:17:45 +02:00
Alexandre Kühn 9b5909b4d7 [REF] note: rename app 'Productivity' to 'Notes'
To stay consistent with the systray activity menu, which adds "Notes".

Task-ID 1877502
2018-08-31 10:32:48 +02:00
Alexandre Kühn 0a3d08c443 [REM] mail: no push notifications permission request in Discuss
This has been replaced with "OdooBot has a request" in the systray
messaging menu (see https://github.com/odoo/odoo/commit/f80bbb4b2a1230ba543e97d3da01c7b2c52d24cc).

Task-ID 1877502
2018-08-31 10:22:56 +02:00
Adrien Dieudonne 2e78aa4f56 [FIX] web: domain: quarter and last quarter
Before this commit, it was not possible to compare data if the time
range selected was quarter or last quarter.

String and integer was concatenated and the returned domain to evaluate
was wrong:
-3 3 - (context_today().month - 1) % 3
instead of:
-3 + 3 - (context_today().month - 1) % 3

Offset period param is always an integer but it's not the case of
boundary params. For 'quarter' and 'last quarter', it's an
expression to evaluate.

Anyway, this part of code will be refactored in a while but it's
important to make the test to avoid this king of issue.
2018-08-31 10:09:38 +02:00
Adrien Dieudonne 671155c376 [FIX] web: domain: quarter and last quarter
Before this commit, it was not possible to compare data if the time
range selected was quarter or last quarter.

String and integer was concatenated and the returned domain to evaluate
was wrong:
-3 3 - (context_today().month - 1) % 3
instead of:
-3 + 3 - (context_today().month - 1) % 3

Offset period param is always an integer but it's not the case of
boundary params. For 'quarter' and 'last quarter', it's an
expression to evaluate.

Anyway, this part of code will be refactored in a while but it's
important to make the test to avoid this king of issue.
2018-08-31 09:53:00 +02:00
len-odoo 43877095ed [FIX] sale: more explicit error message
Some users are confused by the generic error message asking to confirm a sale
order that is in locked or cancelled state.
We add specific error messages in these two cases.

opw 1871019
2018-08-31 09:35:59 +02:00
Alexandre Kühn f80bbb4b2a [IMP] mail, mail_bot: improved push notifications permission response
This commit makes small improvements on the messaging menu with
the new module `mail_bot`:

[IMP] When OdooBot has a request, it now adds "+1" to the counter of
      the messaging menu. The related preview also has a bold title,
      and displays "(1)" next to the title.

[REF] Static previews are no longer in mail_service. This was only
      used for "OdooBot has a request" preview. This logic has now
      been moved to the module `mail_bot` (was previously in `mail`).

[FIX] Title of response of push notifications permission clearly
      states whether permission has been granted or denied
      (was displaying "[Object object]" before this commit).

Task-ID 1877502
2018-08-30 17:55:18 +02:00
Haresh Shyara f8e3aed20b [REF] mrp, resource: Changing labels
TASK-ID: 1879655
2018-08-30 17:33:47 +02:00
Prakash Prajapati 86d10380a1 [REF] barcodes, delivery, mrp, product, stock: Changing labels
Task: 1879617
2018-08-30 17:24:24 +02:00
Magnus 4877030d64 [FIX] fatal error when trying to enable logrotate
4e5119c6e5 didn't account for
`tools.config['workers']` being `None` on windows, resulting in the
entire thing crashing when trying to execute `None > 1` in Python 3.

Fixes #26447
2018-08-30 16:20:10 +02:00
Simon Lejeune d6d27e3777 [IMP] mrp: picking_type_id on stock.moves
No picking_type_id is set on move created in Manufacturing orders, so
when you sort/group by your all your moves in a tree view, you cannot
easily identify the ones that belong to Manufacturing orders.

So we've added the picking_type_id of the MO on the moves, but also had
to addapt the condition to know which move having a picking_type_id and
no picking must be assigned to a picking.

opw:1863591
2018-08-30 16:16:54 +02:00
Christophe Simonis 0fd5c70940 [MERGE] forward port branch saas-15 up to 6b1b507deb 2018-08-30 15:56:03 +02:00
Pierre Masereel cc62784924 [IMP] stock: create warehouse on existing companies
If companies are created before the installation of module stock, the
warehouses of those companes won't be created when stock module is
installed.

So we've created a post init hook to create the warehouses for the
existing companies.

TASK-ID: 58645
2018-08-30 15:32:42 +02:00
Priyanka Kakadiya 8b355457c4 [IMP] maintenance,hr_maintenance: notify user assigned to a request
When a user is assigned as responsible of request, we want him to get a
mail saying that he's a assigned to this request, a standard behaviour
exists in Odoo to perform such a thing, which consist of having a field
named 'user_id' which is tracked, so to avoid overriding the method, we
renamed the field 'technician_user_id' in 'user_id'.

Wre also set teh mail subtype 'request create' with default false, to
have the same behaviour as the on in project, meaning that it is true
only if you have the parent subtype set to true.

TASK-ID: 58645
2018-08-30 15:32:42 +02:00
Nicolas Martinelli 39162d0ff0 [FIX] point_of_sale: multiple lot numbers
- Product tracked by lot:
  3 units of lot A
  2 units of lot B
- On the operation type 'PoS Order', only tick 'create new SN/LN'
- Make 2 PoS orders for 2 units.
- Close the PoS session.

The first picking (2 units of lot A) is done, but the second picking is
ready but not done.

The issue comes from the world famous error:
'Cannot set the done quantity from this stock move, work directly with
the move lines.'

We apply the same logic than in commit f0028bc837

opw-1878256
2018-08-30 15:23:04 +02:00
Nicolas Martinelli 2f87bb5169 [IMP] mrp, stock: make _set_quantity_done available in stock
The method is also useful in other modules, so make it available directly
in stock.
2018-08-30 15:23:04 +02:00
XavierDo 73f1d59096 [FIX] tests, web_tour: improve js error display in build details
Since chrome headless has been merged, js error messages are
difficult to read: some information was missing or only displayed in
full all log.

All console.error() will now be displayed in build details, and will
appear just before the python assertion.

XMO's improvement will also be used on all log: Using module and
classname of the class calling phantomJS.

Also: some small improvements on error messages to make them easier to read

Note: this commit also shown that some error were not detected:
now we will fail in any case if js log an error.
2018-08-30 15:11:38 +02:00
Aaron Bohy 68332a0177 [FIX] web: fix evaluation context of the domain selector
The domain was instantiated without being given any evaluation context.
As a result, the uid variable was not defined,
crashing the js if present in a user-defined filter.

opw 1866852
2018-08-30 14:55:06 +02:00
Christophe Simonis 38fcea389c [FIX] base: explicitly define Human Resources module category
As this category is used by `hr` module, we need to ensure the records
exists in database.
Even if the xmlid is automatically created if not present, it may be
deleted during upgrade (migration) if noupdate flag is not set in
database.
2018-08-30 14:46:40 +02:00
Florent de Labarre 1ece9412be [FIX] stock: avoid useless processing
Define variables `product_id` and `rounding` to avoid useless Python
processing when accessing the corresponding values.

Closes #23111
opw-1868447
2018-08-30 14:01:54 +02:00
Moises Lopez e68350fcb5 [FIX] project: iterate on a single task
Do not retrieve the attachment of all records
Performance impromevement when iterating on a large number of records

From #26446
2018-08-30 13:33:52 +02:00
Alexandre Kühn f0f81e8db3 [FIX] mail: correctly handle (non-)passive thread windows
Definition of '(non-)passive' thread window:

  Thread windows can be either 'passive' or 'active'
  (default: 'active').

  - When opening a thread window in 'active' mode, the messages
    are marked as read, and the focus is on the thread window.
  - When opening a thread window in 'passive' mode, the messages
    are not marked as read and there is no focus on the thread
    window. Messages are kept unread until the user interacts with
    the thread window (e.g. by clicking on composer).

  When the user intentionally opens a thread window, it should
  be open in active mode. However, when a thread window is open
  without any user iteractions, it should open in passive mode.

  The later case is useful in some cases. For instance, when
  receiving a new message from a DM conversation, it should
  automatically open the corresponding thread window. However,
  it should not automatically mark messages as read.

This commit contains 2 bug fixes:

1. When receiving a new message on an active thread window,
   it no longer increments the unread counter.

   (When the focus is on the composer of the thread window,
   the user is immediately reading newly received messages.)

2. When receiving a new message from an unpinned DM conversation,
   the newly open thread window is always passive.

   (This was not the case before, so when receiving new messages,
   it did not increment the unread counter.)
2018-08-30 13:30:12 +02:00
Alexandre Kühn be44efe852 [REF] mail: clean some JS code
1. Removed `getLocalMessages` method in mailbox, and replaced
   with an override on `getMessages`.

   (This method was used before the distinction was made
   between `getMessages` and `fetchMessages`)

2. Removed unused method `_warnUpdatedUnreadCounter` in
   abstract thread window.

   (Leftover from an early POC)

3. Set the default value `''` for the status of a thread.

   (The method `getStatus` should always return a string)

4. Enforce default value `false` for detached status of channel.

   (The method `isDetached` should always return a boolean)

5. Improve readability of some tests.

   (removed useless variables and/or redundant code)
2018-08-30 13:26:07 +02:00
Siddarth Gajjar bd43df539f [IMP] mail: improve envelop icon tooltip style
This commit improves the style of the tooltip on the mail envelop
icon next to a message related to an email. To do so, we have removed
existing CSS and custom tooltip UI and replaced them with boostrap
popover.

This commit also removes most flickering issue when mouse hovering
on gaps between the tooltip and message icons.

Note that there are still corner cases that produce flickers.
This is unfortunately a known issue with bootstrap 4, as this glitch
can also be observed on bootstrap website.

Task-ID 1879282
Closes #26546
2018-08-30 12:47:28 +02:00
Christophe Simonis 6b1b507deb [MERGE] forward port branch saas-14 up to ab8e27382f 2018-08-30 12:43:43 +02:00
Christophe Simonis ab8e27382f [MERGE] forward port branch 10.0 up to 09ad560660 2018-08-30 12:43:12 +02:00
Davor Bojkić - Bole 09ad560660 [ADD] base: add Kosovo to list of countries
According to discussion on jvOrsouw/Odoo11#1

Closes #20605
2018-08-30 11:58:05 +02:00
William Henrotin c7c6f911a8 [FIX] sale: loading onboarding panel
the commit 4136072588 translated some 
fields linked to the sale onboarding panel. The issue is the values 
should be single quoted + double quoted while it was only double quoted. 
The t-value tag evaluates what's inside the quotes as python expression. 
If we want to pass a string, we need to use two kind of quotes.
2018-08-30 11:14:02 +02:00
qsm-odoo 8a0b39be24 [FIX] website: add an ID to the main colorpicker option
Needed for theme migration.
2018-08-30 11:10:56 +02:00
qsm-odoo fc13c53837 [FIX] website: wrap footer copyright in a full-width div
Needed for themes migration.
2018-08-30 11:10:56 +02:00
qsm-odoo aa24a2cad4 [FIX] website: use variables for boxed layout option
- More efficient
- Needed for theme migration
2018-08-30 11:10:56 +02:00
qsm-odoo 77402a4efc [REF] web_editor, *: review color theming system
* web, website

- Introduce gray color palettes (needed for themes migration)

- Synchronize BS4 color maps with individual variables (see comments
 about this in the code).

- Review alpha/primary, beta/secondary matching:

Before this commit, we decided that the common way to define a color
palette was defining primary, secondary, gamma, delta and epsilon.
alpha and beta were then forced to primary and secondary without other
possibility.
The new system makes more sense:
1) define alpha, beta, gamma, delta and epsilon
2) primary and secondary will automatically be set to your alpha and
  beta (allowing to style the default UI with BS4-independant
  variables)
3) if you are not happy with (2), you can define primary / secondary
  in your color palette so that they are not automatically set to
  alpha / beta

This commit also changes what classes the editor uses. Background colors
and text colors will now use alpha/beta/gamma/delta/epsilon (not primary
and secondary anymore). For buttons, all the possibilities are suggested
but color duplicates are hidden (so if your primary and alpha are equal,
only one button color is suggested).
2018-08-30 11:10:56 +02:00
qsm-odoo 6e33301693 [REF] website: simplify color preview system in theme dialog
Only one color palette is shown at a time, so no need for the extra
css rules.
2018-08-30 11:10:56 +02:00
qsm-odoo b3c4eb46d8 [REF] web: introduce a way to extend the bg-variant mixin
Needed for themes migration.
2018-08-30 11:10:56 +02:00
Christophe Simonis 50bd9376d7 [MERGE] forward port branch 10.0 up to 90ce4733ae 2018-08-30 11:10:22 +02:00
qdp-odoo 005fbddbcd [FIX] account: caption position in reconciliation widget
Default position is now bellow, but in the reconciliation widget we want it above each line so we explicitly have to say it
2018-08-30 11:10:04 +02:00
Nicolas Martinelli 052a5702c5 [FIX] purchase: keep vendor reference
Create a PO and assign any string to the Vendor Reference field. Confirm
and create an invoice.

The Vendor Reference field on the invoice is empty, while it is expected
to be filled in.

opw-1879379
2018-08-30 10:07:35 +02:00
Martin Trigaux 4136072588 [FIX] sale,website: correct translatable content
Remove untranslated terms
Rephrase unclear content
2018-08-30 10:02:27 +02:00
Nicolas Martinelli 90ce4733ae [FIX] website_sale: add back compute_currency function from qweb template
Unless there is a a bug, do not remove a currency conversion.

This reverts commit 5028da3873.
2018-08-30 09:56:53 +02:00