Commit Graph
124904 Commits
Author SHA1 Message Date
Yannick Tivisse 27da2eb070 [FIX] hr_payroll: Allow a contract manager to read salary structures
An employee with only the contract user group should be able to create
a contract. It implies to be able to read a salary structure and
a salary structure type.
2019-03-19 09:35:31 +01:00
Lucas Lefèvre dc19707baa [FIX] l10n_be_hr_payroll_fleet: Fix access rights issues
If a user is member of `hr_contract.group_hr_contract_manager`
but not member of `fleet.fleet_group_manager` some access issues arise
The issues are related to the `car_id` field of `hr.contract`
because the user has no access rights for `fleet.vehicle`.

Fix to solve the issue:
Make all car related field of contracts available
to fleet manager only.

If the contract manager want to be able to manage cars on
contracts, he must manually be granted fleet manager access.
This is a requirement if the contract manager want to use the
company car feature.
2019-03-19 09:35:31 +01:00
Lucas Lefèvre 955427bb49 [FIX] hr_contract: group_hr_contract_manager implies group_user
A user with only the contract access rights should be able to create
a contract.
2019-03-19 09:35:31 +01:00
Lucas Lefèvre f3748481ee [FIX] hr_payroll: Fix contract access to approve leave
When a `hr.leave` is approved, a `resource.calendar.leave`
is created in the employee's calendar and in the
contract's calendar if it's different.
However, a user in `group_holiday_user` but not in
`group_hr_contract_manager` does not have access rights
to read a contract.
This leads to an `AccessError`

Fix: use `sudo` to read the contract.
2019-03-19 09:35:31 +01:00
Lucas Lefèvre aec13abc18 [FIX] hr_holidays: Allow Team leader to approve
Currently, a Team leader can't approve a leave of an employee
in his team if the leave type requires an allocation.

The reason is the `ir.rule` for `base.group_user` restricting allocation
read access to only your own allocation (`[('employee_id.user_id', '=', user.id)]`)
There are no `ir.rule` for group Team leader.
Therefore, a team leader can't read allocations for his team members.

Fix: add an `ir.rule` to allow a team leader to read allocations
of employees in his team.

+ add associated tests
2019-03-19 09:35:31 +01:00
Lucas Lefèvre f1fca6dc81 [FIX] hr_holidays: Group team leader imply group user
Currently, group Team Leader does not imply group user.
However a team leader is always a user and should be member of
the corresponding group.
2019-03-19 09:33:07 +01:00
RomainLibert b8805b1d06 [IMP] hr_payroll: rename hr.benefit into hr.work.entry
It makes more sense to name an entry in the employee schedule like that.

TaskID: 1941598
2019-03-19 09:33:07 +01:00
Yannick Tivisse b631280999 [REF] hr_payroll: Remove parent_id hierarchy + Add structures categorization
1/ Remove the parent-children relation on salary structures

Currently it is difficult to see what rules are applied on salary structures.

Most of the structures are inheriting 3 rules (Basic, Gross, Net) from the
'Base for new structures', and those rules are not shown. Same issue if a
structure has another one as parent (as in the French localization).

This bring more annoying issues:

- Since the saas-12.1, we can already set different accounts for different
  companies on the salary rules for which we want to post journal entries.
  But for the parent rules, like the 'NET' amount, it's impossible to post
  the journal entries on different account for different salary structures.
  (eg: for CP200 employees and CP200 workers). As the rules are following
  a M2M relation on the structure, we have to remove the parent_id and to
  recreate all the rules in the final structure.
- If we are not at ease with the M2M relation (which is the case for most
  of the end users), we will simply modify the rule on the parent structure.
  This was already done on the French localization on which we modified the
  code, sequence and the name. This could have some desastrous consequences
  as this will break the order on which the rules are computed for other
  structures for the sequence, or break other integration with the payroll
  as we also modify the code, for example the salary configurator.

As this parent-children relation on structure could cause several issues
difficult to spot and as this is quite difficult to correctly visualize the
structure composition, it is better to remove it and define all the rules
inside the structure itself. This improves also the code readability as we
are not trying to recursively retrieve the rules and find a proper sequence
inside them.

2/ Make the rules on the salary structure a o2m instead of a m2m

The issues described just above indicates that it would be better to remove
the M2M relation between salary structures and salary rules, and make it
a O2M relation instead. That way, no more confusion and misconfiguration of
the rules fields (code, sequence, accounts, ...).

3/ Remove the parent-children relation on rules

A salary rule can have a parent salary rule. This mechanism, which is
not obvious at all for an end user allows to specify a parent rules.
If the condition is met for the parent rule (eg: the employee has at least
1 child), all the children rules could be applied (eg: Deduction of 90 euros
if the number of children is between 1 and 1).

Visually it doesn't make a lot of sense, as it displays one line with an
amount of 0 for the parent, and one line with the real amount for each
applied child. On the other hand, no child rule is linked to the structure
and an end user has to click on the parent rule, to see the children and
understand that something mystic and hidden is existing.

This is equivalent to define as many classic rules as we have children, or
even better, define 1 rule that will compute the real amount directly,
as the number of children can be accessed from the localdict when computing
the salary line.

This commit also removed the relation.

4/ Clean some brols in the code (technical)

The 3 first points of the spec allow us to clean a little the code readability
and complexity.

5/ Adapt all the localizations for these changes

All the localizations are impacted by those changes. What is done in this commit
is mainly:

- l10n_be_hr_payroll: Make 3 separated files for the 3 existing structures (the
  fourth one, belgian worker, is not correct and is removed). For each
  structure, define explicitely the rules (in the correct order by sequence).
  This multiplies the total number of rules as some of them were shared (like
  the withholding tax rule for example), but all the code that is supposed to be
  modified each year/quarter/whenever the government decides to modify the law
  has been moved into a python file, and is available the computation context.
  This will also allow us to update the computation rules without having to
  update the module.
- l10n_fr_hr_payroll: There were 3 rules following this scheme:
                              Base for new structure
                                        |
                                 Basic structure
                                        |
                              ----------------------
                              |                    |
                           Cadre                Non-Cadre
  All the rules parent rules have been duplicated into the 2 remaining
  structures, cadre and non-cadre. There were a lot of parent-children relations
  between the rules that have been adapted to the new model.
- l10n_in_hr_payroll: There was a lot of rules in data, and a structure in demo
  data, which was using 4 or 5 of these rules. As the rules doesn't seem to make
  a lot of sense altogether, everything was moved in demo data.

6/ Introduce a new Salary Structure Type model

Currently we have a model hr.contract.type with a M2O on the contracts. This has
never been used in 9 years and is removed in this commit. On the other hand, we
would like to define a new model hr.payroll.structure.type (eg: CP200 Employee),
which will line all the salary structures the Belgian localization could bring
(Classic salary, double holidays, 13th month, ...). This field is defined on the
structure, and is displayed on the contract (as the same place than the contract
type we just removed).

On this model we could also define some fields like:
- The default pay period: Selection field, default = monthly. This is applied on
  the contract when selecting the structure.
- The Working Schedule, m2o. This is applied on the contract when selecting the
  structure

For example, on the 'commission paritaire' for teachers, we could set the
default pay period to 'Every 15 days' and the working schedule to '19 hours /
week'. Every contract under this structure would take those values.

Migration
=========

For a migration point of view:
- All the rules that had a parent_rule_id should be set to
  appears_on_payslip=False. The column parent_rule_id can be dropped afterward.
- All the rules that are coming from a parent structure or higher should be
  duplicated and the field 'struct_id' should be set on the current structure.
  The column parent_id can be dropped afterward.
- All the rules that were defined on the structure should have the field
  'struct_id' defined on them.
- The rules that are not linked to a structure should be unlinked.
- The column type_id on the contract could be dropped, no need to keep the
  values too.
- A default structure type is defined in data ('Employee'). This could be set to
  all the existing structure for the newly created 'type_id' field.

TaskID: 1942832
2019-03-19 09:24:23 +01:00
qsm-odoo edd659f9da [REF] website_event: no use of cards to wrap menus
With https://github.com/odoo/odoo/pull/30559 we introduced cards to
wrap menus. We changed our mind, only use card for records and
title/body contents.

closes odoo/odoo#31912

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-18 12:05:53 +00:00
qsm-odoo cab053dc5a [FIX] website: restore default h1 color in customize dialog
Since the bootstrap update that was merged with
https://github.com/odoo/odoo/commit/754ec4450832dceef83c3a0abb79401f2e7ec05d
the customize theme dialog was showing transparent colors for the
headings. This was because bootstrap changed the value of the related
variable from 'inherit' to 'null' to avoid an useless css rule if the
headings are supposed to have the same color as the body text.

closes odoo/odoo#31909

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-18 11:29:57 +00:00
Aurélien Warnon 7cc7828547 [FIX] website_slides: make correct use of frontend widget
Purpose
=======

This follows up commit d946b7a85d that cleans
wrong uses of sAnimations for non-animated behaviors.

closes odoo/odoo#31794

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-12 14:24:41 +00:00
Swapnesh Shah 9bfe6ef04b [base]IMP: Improved logger message of PDF report generation
closes odoo/odoo#31891

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-03-16 10:19:11 +00:00
Juhil Somaiya 5356f368bb [IMP] im_livechat, web: custom placeholder image
When the user has not set any image, it now displays the default
user image placeholder instead of the image placeholder in livechat.

Task-ID 1924666

closes odoo/odoo#30821

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-03-18 09:19:02 +00:00
Olivier Colson 7b91d3e020 [IMP] point_of_sale: accounting lock dates and POS sessions
Forbid locking the fiscal year or period in case there is an open POS session into it. Without that, it will be impossible to close these sessions, as the lock date will not allow posting accounting entries for them.

Also forbid to create a session before lock date, as it would be impossible to close.

closes odoo/odoo#28257

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-03-18 09:22:23 +00:00
qsm-odoo a58a115e40 [FIX] website: restore broken promises in website
Since the switch to jQuery 3, Odoo uses native promises in its JS. Some
mistakes were made in the website app during conversion from old jQuery
deferred to native promises.

- `this` -> `self` when wrapping in a promise
- `.always(fct)` -> `.then(fct).guardedCatch(fct)`
- a function returned sometimes a jQuery deferred, sometimes a native
  promise. This made the caller fail when using `always` or fail
  when using `guardedCatch`

closes odoo/odoo#31887

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-15 16:03:00 +00:00
David Monjoie 31983e0c2e [IMP] web: only display missing view erorr in debug assets
This error is there to help developpers realize their view has not
been loaded due to an error.

However, we have cases where we define actions containing views
that only exist in Enterprise to avoid creating an entire bridge
module just to add one view to an action.

The error was triggered in this case which resulted in a red build
for the click all runbot test, even though this was not really a
true error, as it was intended.

This commit changes the error to only appear in debug=assets such
that it will no longer put the click all runbot tour red while
still providing help for the developper trying to debug his view
since he will need to be in debug=assets to debug his view anyway.

closes odoo/odoo#31884

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-15 14:08:21 +00:00
Aaron Bohy 9a8f59a674 [FIX] web: update domain when switching between views
Let's assume the following scenario on an action with two multi
records views (e.g. kanban and list). In the kanban view, activate
a domain or groupby, switch to list view, remove the domain or
groupby, switch back to kanban: the domain or groupby is still
applied (even though it's no longer displayed in the search view).

This is due to the jQuery update (ab56e637b7) and the use of
native Promises (always async) instead of old jQuery 1.11 Deferreds
(which where sync when already resolved). In the new version, the
domain/context/groupby were added to the params a 'tick too late',
so the view was updated without that information (and thus the old
domain/context/groupby were kept).

Issue reported on the jquery update pad.

closes odoo/odoo#31859

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-15 07:35:21 +00:00
David Monjoie b9da175574 [FIX] pos_restaurant: fix table editing broken after jQuery update
The table edition feature of pos_restaurant was using an old lib
that was never updated to newer versions of jQuery by its author.

For unknown reason, this library went unnoticed when we updated our
codebase to jQuery 3.

Since this library is impossible to update per se, I decided to
remove it entirely and replace it by calls to jQuery.ui.

However, the point of this lib was to handle touch events, which
jQuery.ui does not. For this, this commit introduces a new
library which translates touch events to their click counterparts.

Tested on:
- Chrome (Windows, MacOS, Linux, Android, iOS)
- Firefox (Windows, MacOS, Linux, Android, iOS)
- Safari (MacOS, iOS)
- Edge (Windows, iOS)
- IE11 (Windows)
- Samsung Internet (Android)

closes odoo/odoo#31719

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-14 10:11:26 +00:00
Pierre Masereel 1f68cb87f0 fixup! [IMP] delivery: manage return label for all carrier
closes odoo/odoo#31347

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-03-15 09:10:44 +00:00
Pierre Masereel 43497d51f4 [IMP] delivery: margin set on carrier from int to float
Some customers need to have a float instead of a in for the percentage
of the margin taken on the delivery. So we modified the integer value
into a float.
2019-03-15 09:10:44 +00:00
Pierre Masereel 11ece72e24 [IMP] delivery: manage return label for all carrier
Until now, only fedex was providing return label printing, and as we
want to integrate it with other carriers, we have mande a generc
mecanism to easily implement it with new ones.

We've also added an option that allow to print return label from portal
if one has been generated on delivery.
2019-03-15 09:10:44 +00:00
Pierre Masereel d0b8811d34 [REF] delivery, website_sale_delivery: portal template in delivery
The portal template that add the tracking number on the picking in the
sale order report in portal is still in website_sale_delivery, even if
the portal does not need the website anymore. More over, the inherited
template has been moved from website_sale_stock to sale_stock.

So to be consistent and not forcing having website for a feature that
doesn't need it, we move this template inheritance in delivery
2019-03-15 09:10:44 +00:00
Pierre Masereel 6e77653eb4 [IMP] sale,sale_stock,website_sale_delivery: SO portal
Change the design to let the delivery_tracking_ref beeing displayed
properly.
2019-03-15 09:10:43 +00:00
Pierre Masereel 86a454dae3 [IMP] base: only show date of datetime in qweb 2019-03-15 09:10:43 +00:00
Robot Odoo 1191579a6f [MERGE][IMP] sale_timesheet: select project on Sale Order to create task
Purpose
=======

The 'service_tracking' selection field on the 'product.template' model in the 'sale_timesheet' module
had its 'task_new_project' option renamed to 'task_in_project'.

If one or more sale_order_line have a product configured with this option, a new 'project_id' field appears
on the sale_order under the 'Sales Information' section.
When a project_id is selected, the analytic account on the sale order is automatically changed
to this project's analytic account.

This allows handling more use cases on sale_order:
- If a sale_order_line has a service product with that new option and no project_id configured on the sale_order:
  -> create a new project based on the configured project_template_id and then create a task in that project
     (same behavior as before)
- If a sale_order_line has a service product with that new option and a project_id is configured on the sale_order:
  -> directly create a task in the selected project_id

The behavior does not change for the 3 other options ('no', 'task_global_project' and 'project_only').

Specs
=======
- Add project field on sale order in "other infos" tab, shows only when a product on the SO has the option activated
- If projec is selected on SO, create task in this project, otherwise it creates a new project (as before)
- Rename 'task_new_project' into "task_in_project"
- Allow to have the new option with project template
- Selectable projects on Sales Order are `billate_type` in 'no' and 'task_rate'
- Never link SO's project to SO or AA
- Add onchange on project_id to select this project's analytic account on the SO
- Non stored computed field to check if at least one SOL has the new option

Use cases
- 2 SOL with new option (no template) will create 2 tasks in SO's project
- 2 SOL with new options (one no template, one with) + 1 SOL "create new P no T" --> create 2 tasks in SO's project and one new project

Task #1915660

closes odoo/odoo#29772

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-03-14 16:25:32 +01:00
Aurélien Warnon 0af717bf0e [IMP] hr_timesheet: add group visibility to project's analytic_account
Task #1915660

Purpose
=======

Analytic Account field of a project should not be visible for non-members
of the "analytic.group_analytic_accounting" group.

This is now consistent with the other analytic account fields of the application.
2019-03-14 14:31:04 +00:00
Aurélien Warnon 016a99f745 [IMP] sale_timesheet: improve 'task_in_project' to handle more use cases
Task #1915660

Purpose
=======

If one or more sale_order_line have a product configured with this option, a new 'project_id' field appears
on the sale_order under the 'Sales Information' section.
When a project_id is selected, the analytic account on the sale order is automatically changed
to this project's analytic account.

This allows handling more use cases on sale_order:
- If a sale_order_line has a service product with that new option and no project_id configured on the sale_order:
  -> create a new project based on the configured project_template_id and then create a task in that project
     (same behavior as before)
- If a sale_order_line has a service product with that new option and a project_id is configured on the sale_order:
  -> directly create a task in the selected project_id

The behavior does not change for the 3 other options ('no', 'task_global_project' and 'project_only').

Specs
=======

Add project field on sale order in other info tab, shows only when a product on the SO has the option activated
if projec its selected on SO, create task in this project

Tech Spec (jem)
=======

On product:
- rename 'task_new_project' into "task_in_project" (help message precise either new project (based on template) or
  SO's project is prior
- allow to have the new option with project template

On sale order:
- non stored computed field to check if at least one SOL has the new option.
- if so, display project field
- selectable project are billate_type in 'no' and 'task_rate' (TBC for the 2nd)
  [awa: also add 'analytic_account_id' != False in domain]
- setting project on SO should change the AA of the SO.
  [awa: add onchange on project_id to select this project's analytic account on the SO]
- Never link SO's project to SO or AA
  [awa: do not touch the project_id's sale_order_id and analytic_account_id fields for this use case]
- 2 SOL with new option (no template) will create 2 tasks in SO's project
- 2 SOL with new options (one no template, one with) + 1 SOL "create new P no T" --> create 2 tasks in SO's project
  and one new project
2019-03-14 14:31:04 +00:00
Christophe Monniez 7282a354c2 [FIX] tests: catch runtime exceptions during browser_js tests
Actually, when running browser_js tests, the test automatically fails
when a console error is seen.
In some cases, an exception can be thrown during a tour but without
console error. In that case, another type of devtools protocol event is
fired: Runtime.exceptionThorwn. This event is not catched by the
browser_js test.

With this commit the above mentioned event is catched and the test is
directly considered as failed.

closes odoo/odoo#31555

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-03-14 10:59:49 +00:00
Christophe Monniez 9450469a1c [FIX] website_event: wait drag and drop to be finished
During the event tour, the save button is clicked before the drag and
drop is finished and cause an uncaught exception.

With this commit, an extra trigger is used to check the presence of the
dirty flag that is set when the page is changed and is ready to be
saved.
2019-03-14 10:59:49 +00:00
mreficent bef385d3d1 [IMP] hr_holidays: typo in action xmlid
closes odoo/odoo#30900

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-13 10:24:26 +00:00
Pierre Masereel 5e58be6508 [FIX] stock: show all not scrapped move
When a move is created in a picking through the scrap button, it must
not be visible in the picking, and should be accible through the
stat button showing the srap.

Now to hide, those moves from the picking view, we are checking that the
move has a different picking type than the one on the picking, which can
lead to invisible moves, that are not in the picking view because they
have a different picking type and not in the scrap stat button because
they don't have scrap object.

To fix this behavior, we are hiding from the picking the ones having a
scrap object linked instead of the one having a different picking type

closes odoo/odoo#31810

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-03-13 10:43:36 +00:00
Vincent Schippefilt 3f8b04484b [REF] doc: add async javascript code section
in javascript Cheatsheet, add a bunch of example about asynchronous code

closes odoo/odoo#31716

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-13 14:34:05 +00:00
Christophe Simonis 44515bc7be [MERGE] forward port branch saas-12.2 up to c9f832d9f0
closes odoo/odoo#31790

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-13 14:24:51 +00:00
Cedric Snauwaert bf69975b54 [FIX] account: reconciliation popover with lines detail was empty
commit 4697d74480 update our bootstrap version to 4.3.1, one change of that version is that
bootstrap now escape the content of popover and title removing the table element. https://blog.getbootstrap.com/2019/02/13/bootstrap-4-3-1-and-3-4-1/
This result in the popover in the reconciliation widget being empty.

Therefore since the content of the popover was safe as it was rendered by Qweb.render, we disabled completely the sanitizer
for the popover in the reconciliation widget.

closes odoo/odoo#31797

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-03-12 15:40:01 +00:00
Cedric Snauwaert 4e110972fa [FIX] account: fix error when trying to open manual reconciliation from accounting menu
closes odoo/odoo#31785

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-03-12 10:30:33 +00:00
Yenthe666 0d33e7d28c [IMP] base: use sequence widget on view tree in action form
To reorder views using drag and drop

closes odoo/odoo#31437

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-12 16:02:28 +00:00
Yenthe666 fd24c240fb [IMP] base: improve source term
Use the "There are" form when followed by plural

closes odoo/odoo#30731

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-12 16:06:08 +00:00
wan 54a5fc7302 [IMP] account: allow to filter by account code in reconciliation widget
Task 1945477

closes odoo/odoo#31589

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-03-12 10:18:22 +00:00
Romain Derie c9f832d9f0 [FIX] test_website: restore test now that fix has been forward-ported
Commit ef03db9ed added back the reset_templates functionality and some tests in
Odoo 12.0.
Commit fcb972db9 skipped one of the tests in Odoo saas-12.2 as there was a race
condition (new editor).
Commit 7c045dda0a fixed the race condition in Odoo 12.0 even if the error never
showed, it was safer.

Now that the fix got forward-ported to Odoo saas-12.2, we can add back the
skipped test.

closes odoo/odoo#31780

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-12 10:17:27 +00:00
Aaron Bohy 5ee9e1d200 [FIX] web: correctly display crashes in firefox
After the update of jQuery, crashes were no longer displayed (in
dialogs) on browsers using the unhandled-rejection-polyfill lib
(e.g. firefox). This was due to a bad conversion from ES6 to ES5.

Issue reported on the jquery update pad.

closes odoo/odoo#31767

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-12 09:46:04 +00:00
Christophe Simonis 8f1daaf937 [FIX] {,test_}mass_mailing: set mail.mass_mailing subject
Field is required.
2019-03-11 15:44:32 +01:00
Christophe Simonis 71faa19af0 [MERGE] forward port branch saas-12.1 up to 2b3296bbf8 2019-03-11 14:42:34 +01:00
Aurélien Warnon 266c6657a6 [REF] sale_timesheet: rename 'task_new_project' option to 'task_in_project'
Purpose
=======

The 'service_tracking' selection field on the 'product.template' model in the 'sale_timesheet' module
had its 'task_new_project' option renamed to 'task_in_project'.

This is a preliminary renaming for task #1915660.
2019-03-11 13:36:01 +00:00
Robot Odoo 0c1eff0d95 [MERGE][IMP] survey: apply small tweaks on survey views (certification)
Purpose
======

This merge implies several small tweaks on the survey views, mainly to add support for the new certification fields.

Show the quizz_passed field in the answers views
-------------------------------------------------------------------

The quizz_passed field is now more important because it determines whether
a certification has been successfully taken or not.

The quizz_passed field is added in:
- The search view of user_input
- The list view of user_input
- The form view of user_input (along with the score)

Fix survey statistics computation
-------------------------------------------

Fix the shared dict in the survey statistics computation that
causes surveys to incorrectly share the same stats when computed in batch.

Add a stat button on survey to show the certified count
------------------------------------------------------------------------

Add a stat button on the survey form view showing the amount
of answers with the quizz_passed field set to True.
It allows to quickly see people that have been granted the certification.

On click, the stat button redirects to the answers list view with the "Quizz passed"
filter defaulted to True.

Task-1936539

closes odoo/odoo#31467

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-03-11 13:07:38 +01:00
Aurélien Warnon 7070fa3219 [IMP] survey: rename 'Survey' to 'Certification' when relevant
Purpose
=======

This commit reworks some views to rename 'Survey' to 'Certification'
for a better visual integration of the new certification flow.
2019-03-11 10:46:11 +00:00
Christophe Simonis 2b3296bbf8 [FIX] web: use stricter css selector in new test
It allow not matching the dropdowns of the search view.

closes odoo/odoo#31738

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-11 10:16:53 +00:00
Odoo Translation Bot ae8aac2a18 [I18N] Update translation terms from Transifex 2019-03-10 06:02:07 +01:00
Christophe Simonis 2c5c9b8342 [MERGE] forward port branch 12.0 up to c023d0784f 2019-03-08 17:56:14 +01:00
Sébastien Theys 2f932e3a46 [IMP] web: add filename to qweb image widget
It's better to always have a relevant name in the image URL for SEO.

Also make sure there is always an alt on the image.

closes odoo/odoo#31705

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-08 15:41:52 +00:00
svs-odoo 08866930ed [FIX] *: no tracking for consumable product
Before this commit, you can configure tracking for consumable type
product. Now, tracking and date settings are hidden when the product's
type is set on consumable.
Also, resets tracking when change type on consumable.

We chose to not enforce this constraint in the model because we consider
it a bit overkill and we did not want to block migrations.

Task #1938594

closes odoo/odoo#31355

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-08 15:52:36 +00:00