Commit Graph
127612 Commits
Author SHA1 Message Date
Yannick TivisseandWolfgang Pichler b7e6f28100 [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-09-10 14:23:43 +02:00
Yannick Tivisse c3717f3018 [IMP] base: Erase user's groups if converted to public/portal 2018-09-10 14:23:43 +02:00
Yannick Tivisseandjem-odoo bb3f20710a [IMP] base: Display Internal Users/Portal/Public as a selection
Co-authored-by: jem-odoo <jem@openerp.com>
2018-09-10 14:23:43 +02:00
Yannick Tivisse 43dd9ecd82 Revert "[IMP] base: Remove the reified view on 'groups_id' in res_users' form"
This reverts commit bd49f9fd17.
2018-09-10 14:23:43 +02:00
Yannick Tivisse 4587816198 Revert "[IMP] base: Remove unused module categories"
This reverts commit 382fbd3520.
2018-09-10 14:23:43 +02:00
Yannick Tivisse 7dfaca8639 [IMP] hr_contract: Remove users group fields 2018-09-10 14:23:43 +02:00
Yannick Tivisse 7978d4ba0f Revert "[IMP] *: Define groups on res.users models"
This reverts commit 99f497b390.
2018-09-10 14:23:42 +02:00
Yannick Tivisse dae8ca3f87 Revert "[IMP] base: Add compute/inverse methods to manage user groups"
This reverts commit ab179bb2d7.
2018-09-10 14:23:42 +02:00
Olivier Colson 1a37c127d6 [FIX] account: bill import wizard: link attachments to the created invoices instead of the file chooser wizard 2018-09-10 14:10:11 +02:00
William Henrotin 95a9572da3 [REF] barcodes, stock, point_of_sale: one nomenclature per company
This commit adds a many2one between barcode.nomenclature and res.company
and removes Many2one pointing toward a nomenclature record.

This aims to improve the usability and allows using nomenclature in
inventory adjustment where a `nomenclature_id` field was set.
2018-09-10 13:33:42 +02:00
Ankit Sathvara acace4d8c3 [FIX] product: fix missing group causing padding issues in sale page of product template notebook
This commit is linked to task ID 1875850 and PR #26664.
2018-09-10 13:28:21 +02:00
Nicolas Martinelli 5be17f7bc6 [FIX] point_of_sale: mandatory picking type
Make the picking type mandatory, otherwise any picking will be created
without one, which will cause stock issues.

opw-1873326
2018-09-10 13:11:28 +02:00
Thibault Delavallée cf9383570b [MERGE][REF] hr_holidays: refactor the configuration and request of leave and allocation
Purpose of this merge is to clean and simplify leave configuration and daily
use by

 * simplifying leave type configuration;
 * simplifying leave request and allocation encoding;
 * reorganizing menus to separate personal from manager menus;
 * adding missing kanban views;

For more details see sub commits. Each of them comes with its own
specifications and explanations.

This merge is linked to task ID 1876795 and closes PR #26571 .
2018-09-10 13:10:13 +02:00
Thibault Delavallée 2e1ab63ead [IMP] hr_holidays: add kanban views for leave and allocation
Purpose of this commit is to add kanban views for allocation and leave
request. It is already possible to reach those views notably using the
activities systray. Default view contains only the name which is quite
sad. We therefore add real kanban views for both models.

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:09:12 +02:00
Thibault Delavallée 63951ea2c1 [IMP] hr_holidays: improve allocation and request display name
Purpose of this commit is to correctly format the allocation or request
display name depending on the mode (employee, department, company or
category).

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:09:08 +02:00
Thibault Delavallée 04250cff1b [IMP] hr_holidays: allow allocation and request per company
Purpose of this commit is to add an option when allocation or requesting
leaves in mass. New option is to do it by company.

Company field used for mass allocation or request is called mode_company_id
to avoid confusion with possible company_id field used for multi company.

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:09:04 +02:00
Thibault Delavallée 744de4ee1c [REF] hr_holidays: improve leave form view and simplify duration encoding
Purpose of this commit is to simplify leave request encoding. We want less
options and more straightforward encoding of leave requests.

Specifications

 * taking half-day leaves is limited to one half day. It is not possible
   anymore to take leaves in half days that span on several days. WHen
   choosing half day the user choose whether he takes the morning or the
   afternoon of the given day;
 * choosing half-days leaves spanning on several days can be done taking
   several leaves if necessary. It is considered as a corner case that should
   not bloat the interface;
 * taking hours-based leaves is limited to a given day. It is not possible
   anymore to take leaves given some start and end hours that span on several
   days. When choosing hours the user choose the start and end hours using
   a selection for every half-hour for the given day;
 * choosing hours-based leaves spanning on several days can be done taking
   several leaves if necessary. It is considered as a corner case that should
   not bloat the interface;
 * taking leaves spanning on several days is necessarily done with full
   length days;

Various misc specifications about form view cleaning

 * hide "To submit" stage in the stage bar;
 * move description below duration information;
 * remove display name;

Duration computation, various fields and form view are updated accordingly
to this specification.

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:09:00 +02:00
Thibault Delavallée 14491e8f9b [REF] hr_holidays: clean fields used to store and display duration
Purpose of this commit is to simplify fields used in leave and allocation
used to store the duration of the requests. We want notably to get rid
of "number of days temp" that, contrary to its name, is not temporary
at all as it stores the real number of days. We also want to clarify
the hours or days encoding that is different on leave and allocation models.

Specifications

 * number_of_days on leave and allocation is the master field holding the
   leave or allocation duration in days;
 * two fields are used for interface that are suffixed by _display in order
   to indicate they are UX only: number_of_hours_display and number_of_days_
   display. They are interface fields used for the user and correct number
   of days is computed and stored in number_of_days;
 * more specifically for leave model

  * display fields are readonly as it is computed based on dates given by
    the user, directly (from / to) or indirectly (half-day leaves for example);
  * duration field is computed through an onchange. It could be directly
    set by hand by managers if some confusion in the number of days appear;

 * more specifically for allocation model

  * display fields trigger an inverse as they are the real duration given
    by HR officers or managers;
  * duration field is computed through the inverse of display fields;

Various reports, data and use of leave / allocation models are updated to
use the correct field.

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:08:57 +02:00
Thibault Delavallée bd5b2c9466 [REF] hr_holidays: simplify leave type configuration
Purpose of this commit is to simplify the configuration of leave type and
use the job of HR officers / manager by making options clearer and easier
to use.

Specifications for leave type :

 * display name as header;
 * remove accrual option from leave type. It is now configured directly
   on allocation requests;
 * add a "X days allocated" stmart button. If you set a general allocation
   of 20 days, the stat button will display 20 days. Even if you go update
   the allocation by employee after that. Purpose is to have the value of
   main allocation done in group, not individual cases of some employees;
 * add a "Group leaves" stmart button. It leads to a new leave requests
   in group mode where mode is visible;
 * have a unique allocation type field replacing the setting allowing to make
   leave or allocation as well as limit and negative fields;
 * limit leave duration encoding to two options, either day-based (allowing to
   take full days or half a day), either hours-based (allowing to take full
   days, half a day or some specific hours in a given day);

More technically

 * limit and negative fields are removed. It was confusing as limit set to
   True means you can actually exceed the limit). It can be computed based
   on allocation_type ('no' meaning you can bypass the limit);
 * request_unit is simplified. Day and half are merged into day;
 * accrual and balance limit are moved to allocation model;

Specifications for allocation requests

 * set accrual specific on allocation itself and not coming from the leave
   type configuration anymore. Indeed we now consider accrual to be done
   case by case independently from the leave type;
 * remove negative and balance_limit. Indeed we now consider people have to
   check by hand what is done by accrual;

Leave and allocation are slightly impacted by other changes, such as domain
for default leave types. Changes have been made as small as possible. Future
commits will still improve leave and allocation models and views, going
further in the cleaning process. Some tests are udpated to match the new
configuration of leave type.

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:08:53 +02:00
Thibault Delavallée 2e3b392a6f [REF] hr_holidays: differentiate personal and manager leave / allocation views
Purpose of this commit is to clean allocation and request views and prepare
future modifications. We would like to separate personal views (making a
request for myself) from manager views (giving more options).

Specifications

 * views under "My" menu should be simplified

  * in a general way there should be no action buttons under my. Hide
    approve/refuse buttons in personal mode;
  * show only leave type, description and duration when asking for an
    allocation; hide details about group allocation and accrual; hide
    action buttons;
  * show only leave type, description and from/to choice as well as duration
    when asking for a leave; hide details about group allocation; hide action
    buttons;
  * in list view hide employee and buttons my menu;

 * views under "Manager" menu should be complete

  * display complete form view;
  * add buttons to approve / refuse directly from the list view in manager
    menus;

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:08:50 +02:00
Thibault Delavallée af7901ca29 [REM] hr_holidays: remove inverse on employee leaves fields
Currently code somehow allows people to create allocation requests on the fly
by writing on the computed remaining_leaves field. It work only under some
conditions that are not likely to happen. Moreover creating and validating
allocation requests should be done under the Leaves application while knowing
it and not hidden in an inverse field.

Let us remove that code and let people use the Leaves application to handle
allocation requests. That code comes from old versions of Leave application.

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:08:46 +02:00
Thibault Delavallée 3522fe1b89 [REF] hr_holidays: remove unused views and lint some bits of code
Purpose is to clean a bit the code to prepare some incoming modifications.
More specifically this commit focuses on removing unused views and actions
to lessen future work in shaping them like requested.

This commit contains :

 * small linting of leave fields;
 * remove some unused and unnecessary views and actions;
 * ensure default values for request_unit_all;
 * small linting of tests;

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:08:43 +02:00
Thibault Delavallée 5013323b4f [IMP] hr_holidays: improve Leave application menus
It seems specifications of new menus implemented at 9af6e9070a were not
totally correct and broke some Odoo conventions. New specification for leaves
application menus are now the following :

 * Dashboard
 * My leaves (user sees this only)
  * New request (calendar view by default)
  * Leaves requests (only my, list view by default)
  * Allocation requests (only my, list view by default)
  * Summary (only my, summary list view by default)
 * Managers (HR officers or managers only)
  * To approve
   * Leaves (default filters: to approve, on my department)
   * Allocations (default filters: to approve, on my department)
  * All
   * Leaves
   * Allocations
  * Payroll
   * Leaves to report (default filters: grey kanban state)
 * Reporting (HR officers or managers only)
  * Leaves Analysis
  * Report by Department
 * Configuration
  * Leaves Types

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:08:40 +02:00
Thibault Delavallée 69b1ee65f4 [IMP] hr: better synchronize user and its employee, especially timezone
Currently user name is synchronized with employee name. However it is
interesting to synchronize other fields like image, email and timezone.
Changing an user linked to an employee through the UI already updates those
fields. This commit ensure code handles synchronization like UI. When
updating an user its related employees are updated. When changing the
user linked to an employee through code all fields are also correctly
synchronized.

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:08:36 +02:00
Thibault Delavallée d228dfe498 [FIX] web: correctly find action-related form view ID in calendar
When cliking on a calendar cell user is redirected to a form view to create
a new record. However if the calendar action gives a specific form view ID
it is not taken into account by calendar.

Calendar code still handles views as not being a structure holding viewID and
type but just an ordered list of items with (view ID, type). This commit fixes
that code. One calendar JS test is updated to correctly match the current
structure.

This commit is linked to task ID 1876795 and PR #26571.
2018-09-10 13:08:17 +02:00
Nicolas Martinelli fb22a4db2a [FIX] sale: analytic account in confirmed state
- Activate analytic accounting
- Create a SO, validate
- Edit, and in the tab 'Additional Information' set an 'Analytic
  Account'
- Save

The analytic account is not saved.

The domain applied on the field is:
`attrs="{'readonly': ['|',('analytic_account_id','!=',False),('invoice_count','!=',0),('state','=','sale')]}"`

This means that once the account is set, the field becomes read-only.
However, a read-only field is by default not sent to the server.

opw-1882448
2018-09-10 13:07:22 +02:00
Lucas Perais (lpe) 8fca115b04 [FIX] web_settings_dashboard: give context to search_read planners
Before this commit, the planner section of the settings weren't translated.
This was because the context was not sent along with the search_read that fetches planners data

After this commit, the planner section is correctly translated

OPW 1881092
closes #26766
2018-09-10 12:04:13 +02:00
Christophe Simonis f099486c0c [FIX] sale_timesheet: adapt test.
Set SO in draft before reconfirming it.
2018-09-10 11:52:45 +02:00
Christophe Simonis 767da196ad [FIX] web: tests: refine selector on values only. 2018-09-10 11:33:48 +02:00
Christophe Simonis 6ff1a134e8 [FIX] web: list view: correct sorting by drag&drop
Use newly defined variable introduced by previous forward-port.
2018-09-10 11:31:36 +02:00
Christophe Simonis 0b147d950c [FIX] web: use correct variable name
Oversight of previous forward-port.
2018-09-10 11:26:45 +02:00
Lucas Perais (lpe) bb12890977 [FIX] mail: activity don't loose text of feedback popover
On an activity, click Mark as done, the popover pops over
Now write some text in it, but click somewhere else, like to copy/paste something
The popover looses focus, and your text disappears

After this commit, we store the value of the popover when hiding it,
then, when when showing back the popover, the value is reinjected

OPW 1873999
closes #26315
2018-09-10 11:24:42 +02:00
Nikunj Ladava ec803cc1a0 [IMP] payment: Improved error message for an empty field in payment.acquirer form view
- payment.acquirer have many fields with 'required_if_provider'
   attribute and while saving form it gave an error like "Required
   fields not filled", so it was confusing to know  which required fields were empty.

 - after this commit, it is displayed like "Required fields not filled (field name)"

opw:1881054

closes odoo/odoo#26833
2018-09-10 09:10:13 +00:00
Gustavo Valverde e2819a234c [IMP] hr_payroll: show only employees with a running contract
When generating a batch of payroll, only show the employees with a contract
that is running or to renew.

The employees without contract or a non-running contract should not appear in
the selection to generate a payslip

Closes #26892

closes odoo/odoo#26892
2018-09-11 13:15:13 +00:00
Toufik Benjaa 29cd2c33eb [FIX] payment: allow to set done a payment.transaction in pending state
- If a payment.transaction is in pending state, it was impossible to set
  it to done.
2018-09-10 10:41:37 +02:00
Florent de Labarre 7d581fa66f [IMP] product: make product name clickable again
Feature present in V8 but removed at 0d68a012d0
Reintroduce the name of the template to be able to click on it

closes odoo/odoo#26821
2018-09-10 08:19:21 +00:00
Nicolas Martinelli 0f2292018e [FIX] account: manual reconciliation with tax
In the Manual Reconciliation widget:
- Link 2 entries that do not balance
- Create the write-off line with a tax

When reconciling, the following error occurs:
"It is mandatory to specify an account and a journal to create a
write-off."

Two new lines are sent to the server: the write-off, and the tax of the
write-off. The latter causes the issue, since it doesn't contain the
field `journal_id`.

Actually, the tax of the write-off is not necessary since the taxes will
be recomputed automatically thanks to the context key `apply_taxes`.

opw-1875822
2018-09-10 10:10:46 +02:00
Lucas Perais (lpe) 9671ccb509 [FIX] website_quote: option product discount report print
Before this commit, the suggested products section on a printed SO always showed
the discount, even if it was 0.0

After this commit, we display discounts only if they are different from 0.0

OPW 1882942
closes #26847
2018-09-10 09:58:16 +02:00
David Beguin c6c72a26d2 [FIX] event : wrong footer href in email templates
The href was not correctly build as there was no evaluation of
object.company_id.website. Eval have been added.
2018-09-10 09:20:24 +02:00
David Beguin 314305a486 [FIX] project : rating template wrong font size 2018-09-10 09:20:24 +02:00
Jeremy Kersten a1c01ccb75 [FIX] base: fix dev mode for read_template
Since multiwebsite, views can have not xml_id but only be a copy with the xml_id as the key.
In this case, we want nevertheless read the xml source
2018-09-10 08:54:14 +02:00
Jeremy Kersten 9e1092c61f [FIX] website_theme_install: uninstall theme that have inactive views
Before this commit, if you have some inactive views (option form customize e.g.)
the unload crash since you cannot remove views that is still referenced by
inherit_id. Now with search with inactive views to delete all.
2018-09-10 08:54:14 +02:00
Jeremy Kersten b83a574687 [REM] website_forum_doc: RIP 2018-09-10 08:54:14 +02:00
Aurélien Warnon 19a1cf11d7 [FIX] mail: Fixed missing parenthesis
From forward port branch saas-11.4, commit 68d36512ef
2018-09-10 08:50:24 +02:00
Kishan Gajjar efc1981cb7 [IMP] account: remove 'preview_priority_type' option
Because now attachment previewer supports paging so user can see
all the attachments from the chatter.

Task 1844685
2018-09-10 08:26:59 +02:00
Odoo Translation Bot 5e4d4c305f [I18N] Update translation terms from Transifex 2018-09-09 07:07:47 +02:00
Odoo Translation Bot 01d853e295 [I18N] Update translation terms from Transifex 2018-09-09 04:11:03 +02:00
Odoo Translation Bot 956720ed7f [I18N] Update translation terms from Transifex 2018-09-09 02:25:15 +02:00
Odoo Translation Bot 988cadaf5d [I18N] Update translation terms from Transifex 2018-09-09 00:29:00 +02:00
Romain Derie 3a496f18fa [FIX] web: forward-port 10.0->11.0 (CORS error handle)
CORS error was firsly fixed with 4bd8e3e2ed in 11.0
Then it was cherry-pick'd and improved in 10.0 with 9f1438d5f1.
But the improvement was lost during forward port from 10.0 to 11.0.

This commit adds the lost fix.

Closes #26812
2018-09-08 12:58:53 +02:00