Commit Graph
122736 Commits
Author SHA1 Message Date
qdp-odoo fd7aa0cfa0 [IMP] sale: invoice creation for downpayments cleanup
don't set the SO name in the reference/description field of the customer invoice, as it's already copied in the origin field
2018-12-07 09:08:06 +00:00
Thibault Delavallée 8e38d97f69 [FIX] survey: make a specific route for testing surveys
Purpose of this commit is to clean a bit the test mode of surveys before
working a bit on ACLs and survey access. Currently when taking a survey
with a magic 'phantom' token it generates a test answer allowing to go
through the survey process. However it has several drawbacks :

 * 'phantom' is not a real token. Token parameter should be used only for
   real tokens and avoid having corner case when managing simple parameter;
 * token should only be used to ensure people have been granted access to
   answering surveys;
 * it is currently available for every users;
 * it is pure unwanted magic;

In this commit we add a separate route for testing surveys that create the
test answer and then redirects to the survey with this answer. It is now
also limited to survey managers or survey officers testing their own surveys.

Survey JS tour now uses the standard URL and not the testing one. Indeed as
testing is now limited to survey officers and managers tour should test
real life use cases.

This commit is linked to task ID 1916034 and PR #29339.
2018-12-07 09:36:46 +00:00
Aurélien Warnon f5625969be [FIX] survey: properly inherit survey assets in website_survey module
Purpose
=======

Survey assets were incorrectly overridden in the website_survey module and all copy/pasted.

This will correctly include the survey_assets template and get rid of these copy/pasted
assets references, while keeping the website style on survey pages.

Task: #1915790
closes #29314
2018-12-07 14:15:46 +00:00
Robot Odoo 4cd379cf6e [REF] web: move ControlPanel inside controllers/actions
This branch introduces a large-scale reorganization of the
component tree generated by the web client.  The short version is
that now, the control panel is a child of the view controller and
no longer a sibling. Graphically (and simplified), we go from
this:

                  webClient
                 /    |    \
               ...   ...  actionManager
                           /         \
                   controlPanel   viewController
                                    /       \

to this:

           	  webClient
                 /    |    \
               ...   ...  actionManager
                               |
                          viewController
                            /   |   \
          ControlPanelController
              /           \
         CPRenderer     CPModel

The motivation is that this work moves the code where it should be.
Before this commit, it was kind of weird to have code in the
controllers to render buttons outside of their root node (in
renderButtons).  Also, the action manager had to take care of
coordinating search view states between view transitions.

So, this work simplifies the code.  It also makes it easier to
extend. We see day after day that Odoo needs to take care of more
complex UI needs, and in many cases, these needs were quite
difficult to implement (we prefer spaghettis in our plates, not in
our code).  The changes in this branch should open the way to
implement these features.

For example,
- it will now be easy to add the possibility of views (for example,
  the search view or a new ControlPanel view) to add custom buttons
  (of type action or object) in the control panel.
- Another need will be to serialize/ restore the state of the
  search view across action boundaries (needed by the dashboard).
- Another example is the possibility for views to customize easily
  the presence/absence of sub menus (filters/groupbys/favorites/
  time range/...)
- Another need is an easier way for views/client action to customize
  their control panel.

This commit also contains a large rewrite of the search view (so it
is more inline with our architecture and easier to maintain).

Part of task 1893568

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#29106
2018-12-07 23:26:47 +01:00
pha-odoo f14092cbfa [IMP] point_of_sale: Connect with Employee on PoS
=========
PURPOSE
=========

{Any employee can work on a PoS session, even if he has no user. This decreases the cost of PoS App.}

We are not competitive enough on the PoS Market because customers have to pay one user per cashier while they expect to pay one user per cash station.

===============
SPECIFICATIONS
===============

pos.config
- Add a checkbox : "Login with Employees"
- If set to TRUE, an "Allowed Employees" many2many appear
- If employees many2many is empty, all employees can log on this PoS
- If set to FALSE, can only log in with the currently logged user

hr.employee
- The barcode and pin fields were be moved to the hr.employee
- Set a barcode (not pin) by default at the creation of any employee
- No Employees module with PoS > dependency to hr

Open the PoS if "Log in with Employees" = FALSE
- Same behaviour than now, when I open the PoS, I'm logged in with the current user and can start working at once. The only difference is that it is not possible to switch users anymore.
- The button to close the session is visible

Open he PoS if "Log in with Employees" = TRUE
- When I open the PoS, the first screen I see is the login screen.
(a) I choose my employee and enter my pin code (if there is pin code on my employee, otherwise not required) (I can only see employees that have access to that PoS)
(b) I scan my barcode
(c) I scan my rfid card (future development)
- When I click on the employee name, I can log in with another employee
- If the employee is linked to a user that has the pos user/manager access right, I can see the button the close the session. Otherwise I cannot close the session (and thus cannot access backend).
- Add field employee on all records created by PoS (and replace the field user by that one) (on pos.orders)

Lock Screen
- Improve the PoS Interface
- Add a new feature to allow to "lock" the session. When a session has been locked, the user/employee has to re-log-in to access the PoS
- When I try to re-log-in, by default suggest the last employee logged in in the login screen

Migration
Plan a migration strategy > barcode and pin is now on the employee and not on the user anymore

closes odoo/odoo#28567
2018-12-07 14:31:56 +00:00
Mathieu Duckerts-Antoine 1e0b370b16 [FIX] google_spreadsheet: adapt code to refactoring
This commit adapts the code for the 'Add to Google Spreadsheet'
entry in the Favorites menu, according to the large refactoring of
the SearchView/ControlPanelView in web.

Part of task 1893568
2018-12-07 13:16:11 +00:00
Mathieu Duckerts-Antoine 38dc5c18b4 [REF] board: adapt code to search refactoring
This rev. adapts the code of the 'Add to Dashboard' entry of the
Favotires menu, according to the large SearchView refactoring. It
also does some tweaks for the dashboard app due to the move of the
ControlPanel from the ActionManager to the controllers.

Part of task 1893568
2018-12-07 13:16:10 +00:00
Aaron Bohy 84a1d7bd59 [FIX] point_of_sale: adapt webclient template
according to changes in web.

Some changes have been made to the webclient template (and widget)
in web, and the pos (using the webclient widget as well) needed to
be adapted.

Part of task 1893568
2018-12-07 13:16:09 +00:00
Géry Debongnie 86b6bd5ad1 [REF] point_of_sale,web: move backbone to pos
This rev. moves the backbone library from web to pos, as one of its
two usecases (the search view) has just been removed. From now on,
it is only used in the pos.

Part of task 1893568
2018-12-07 13:16:08 +00:00
86870b89bd [REF] *: adapt views outside web
to ControlPanel/Search view refactoring.

*: mail,sale,web_diagram

The ControlPanel being now inside the DOM of views' controller,
those existing widgets needed to be adapted (in the way they define
if and how they want a ControlPanel, and in the way the manipulate
their DOM as it slightly changed). Tests needed to be adapted as
well.

Part of task 1893568

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
2018-12-07 13:16:08 +00:00
b1ef0001f6 [REF] *: adapt all client actions
to ControlPanel/Search view refactoring.

The ControlPanel being now inside the DOM of client actions, those
existing widgets needed to be adapted (in the way they define if
and how they want a ControlPanel, and in the way the manipulate
their DOM as it slightly changed). Tests needed to be adapted as
well.

Part of task 1893568

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
2018-12-07 13:16:07 +00:00
40dd121938 [REF] web: move ControlPanel inside controllers/actions
This branch introduces a large-scale reorganization of the
component tree generated by the web client.  The short version is
that now, the control panel is a child of the view controller and
no longer a sibling. Graphically (and simplified), we go from
this:

                  webClient
                 /    |    \
               ...   ...  actionManager
                           /         \
                   controlPanel   viewController
                                    /       \

to this:

           	  webClient
                 /    |    \
               ...   ...  actionManager
                               |
                          viewController
                            /   |   \
          ControlPanelController
              /           \
         CPRenderer     CPModel

The motivation is that this work moves the code where it should be.
Before this commit, it was kind of weird to have code in the
controllers to render buttons outside of their root node (in
renderButtons).  Also, the action manager had to take care of
coordinating search view states between view transitions.

So, this work simplifies the code.  It also makes it easier to
extend. We see day after day that Odoo needs to take care of more
complex UI needs, and in many cases, these needs were quite
difficult to implement (we prefer spaghettis in our plates, not in
our code).  The changes in this branch should open the way to
implement these features.

For example,
- it will now be easy to add the possibility of views (for example,
  the search view or a new ControlPanel view) to add custom buttons
  (of type action or object) in the control panel.
- Another need will be to serialize/ restore the state of the
  search view across action boundaries (needed by the dashboard).
- Another example is the possibility for views to customize easily
  the presence/absence of sub menus (filters/groupbys/favorites/
  time range/...)
- Another need is an easier way for views/client action to customize
  their control panel.

This commit also contains a large rewrite of the search view (so it
is more inline with our architecture and easier to maintain).

Part of task 1893568

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
2018-12-07 13:16:06 +00:00
Géry DebongnieandAaron Bohy 48a50b4bc0 [IMP] web: add MVC Factory
This rev. adds a factory class to generate MVC components, to
properly standardize the way MVC components should behave (in the
odoo way). The most popular MVC of the webclient concerns views
(Model, Controller, Renderer, for each view type). However, we
wanted to generalize the notion of MVC (and extract it from the
views), as we will use it in a future commit for the ControlPanel.

Part of task 1893568

Co-authored-by: Aaron Bohy <aab@odoo.com>
2018-12-07 12:49:50 +00:00
David Arnold 9a95781439 [FIX] hr_payroll: Fix localdict ambiguity on rule computation
Purpose
=======

On a payslip rule computation you can return 3 parameters:
- result_qty
- result_rate
- result

From this, we compute the total amount as following:

tot_rule = amount * qty * rate / 100.0

If we set parameters result_qty=0 or result_rate=0 to force the tot_rule to
be equal to 0, then their values are set to the default one, which is ambiguous.

So
result_qty = 0
result_rate = 0

Become
qty=1
amount=100

We can't fix this in a stable release as this could imply unwanted
behavior changes for customers, and also quite difficult to spot.

closes odoo/odoo#29206
2018-12-07 10:02:12 +00:00
Robot Odoo f0d5a5ba13 [MERGE][IMP] im_livechat, website_livechat : update website default livechat
In order to facilitiate the configuration of a livechat on the website,
the first livechat channel that was demo data from im_livechat
is now set as data. Website is now using this first livechat channel
instead of creating a new one and using it.

Merge related to task ID 1912056.

closes odoo/odoo#29020
2018-12-07 12:38:34 +01:00
Robot Odoo f420544aaa [MERGE] base, web: split the documents features from ir.attachment
The first implementation of `documents` was based on `ir_attachment`,
adding fields only useful when the attachment was a document.

This task splits documents in a new model called documents.documents,
and clean the logic accordingly.

This task also recovers the "attachment" action button, to list attachments on a model
without chatter.

related to: odoo/enterprise#3048
task: #1908896

closes odoo/odoo#28563
2018-12-07 10:33:03 +01:00
Jeremy Kersten 72905feee0 [FIX] website: redirect_type oversight
Related to #2924b77b6f5
Similary to #8ca728bb9312

closes odoo/odoo#29330
2018-12-06 21:07:32 +00:00
Robot Odoo 9f6f9c71d3 [MERGE] mail, *: several UX/UI improvements
*: bus, im_livechat, mail_bot, website_livechat

Several improvements for Discuss app:

1. Improved "is typing..." notification
2. Merged private & public channels
3. Quick channel search
4. No push notification right after accepting them, and transparent odoo bot icon in native notification
5. Selected emojis are inserted in composer based on cursor position
6. Set surname to people for DMs name
7. Discard replying to a message in Inbox
8. Broadcast "seen" notification ('v' and 'vv' on messages)

[1] [image1](https://drive.google.com/file/d/11_H6ZJh0wFaegAV0fTLdc68z37nhVKnW/view?usp=sharing), [image2](https://drive.google.com/file/d/1s9g_hUCMesuTLAqpeGMwLWzHCYnzanr6/view?usp=sharing)
[2] [image1](https://drive.google.com/file/d/1WUBqc2lScfWV8Yrtq6Zk4MO4jC0CdaiG/view?usp=sharing), [image2](https://drive.google.com/file/d/13XVcW0Nookwea_4xz02mIwPi5dPhXu18/view?usp=sharing)
[3] [image1](https://drive.google.com/file/d/1FuV3xH9cK6qR7ljd5vELOHc4icvHIJTF/view?usp=sharing), [image2](https://drive.google.com/file/d/1hwuu5ejlj9ou02NF5XmL-XHTiD-Ty6XT/view?usp=sharing)
[4] [image](https://drive.google.com/file/d/1si1TYtCpdyOgw9IRaMWmxuUb1d8M4ccF/view?usp=sharing)
[5] [video](https://drive.google.com/file/d/19knQ47F1wzlNvxT2nJH3A9V34wO1D9Bn/view?usp=sharing)
[6] [image1](https://drive.google.com/file/d/11ot_DtySN2cIN_bM8n7fhFV2JXNoz0lH/view?usp=sharing), [image2](https://drive.google.com/file/d/1aNyapzKePIRg903woCo3kXJhy-ZFwfEG/view?usp=sharing), [image3](https://drive.google.com/file/d/1AtVlOG67YjsS8ax1ErWhXfSDOtKhLQhC/view?usp=sharing)
[7] [image](https://drive.google.com/file/d/1U-VEut7M7-t9WzdKVagfyy6ZrbOJrflp/view?usp=sharing)
[8] [image1](https://drive.google.com/file/d/1_32q8iqPBhW4sPhAtY5mIO968gj1o9o-/view?usp=sharing), [image2](https://drive.google.com/file/d/1Ne6HMEgJxHAWYN3e3SlrF6Qqg70LDvAW/view?usp=sharing)

Task-ID 1881001

closes odoo/odoo#29191
2018-12-07 09:33:01 +01:00
ThanhDodeurOdoo 4345394e08 [REF] attachment_indexation, *: replace old references to document
*: hr_recruitment, web, website_sale_digital

This commit replaces the references to 'document' by 'attachment_indexation'
following the rename of the module.

Task #1908896
2018-12-06 19:09:34 +00:00
ThanhDodeurOdoo adab361fb5 [REF] document, attachment_indexation: renames the module document
This commit renames the module document into attachment_indexation
to provide a more descriptive name and avoid confusion with
enterprise's documents module.

task: #1908896
2018-12-06 19:09:34 +00:00
ThanhDodeurOdoo 20cbb6dc0b Revert "[FIX] document: JS feature disabled"
This reverts commit 1dbb555a

Bring the sidebar attachment dropdown feature back.

This feature was removed due to be considered as useless,
but since some models can have attachement without a mail_thread,
this feature is still necessary.

task: #1908896
2018-12-06 19:09:34 +00:00
7d85ab1eac [REF] base, *: refactor binary_content
*: tools, web, website, website_forum, mail, im_livechat

This commit refactors ir_http to make it more readable
and flexible.

Move the resize function of web/image to odoo.tools

Co-authored-by: XavierDo <xdo@odoo.com>
Co-authored-by: Antony Lesuisse <al@openerp.com>

closes: #28563
task: #1908896
2018-12-06 19:09:33 +00:00
ThanhDodeurOdoo 89f20d2c29 [REF] base, mail: splits the documents feature from ir attachment
Moved the field 'active', 'res_model_name' and 'thumbnail' from
ir.attachment to enterprise's documents.document.

Moved the pdf split feature to enterprise's Documents module.

task: #1908896
2018-12-06 19:09:33 +00:00
Alexandre Kühn 844fb2b51e [IMP] mail: channel seen icon indication ('v' and 'vv')
This commit adds the seen icon next to a message for all channels
except livechat.

It tracks received and seen messages for all members of the channel.
Icon is either 1 or 2 check(s) ('v' or 'vv').

Those are the different states of this 'seen' icon:

  ICON:                           DESCRIPTION:

  no check .................. no one has received the message.
  1 check ................... some members have received the
                              message, no one has seen it.
  2 checks (greyed-out) ..... some members have seen the message,
                              some or everyone has received it
  2 checks (green) .......... all members have seen the message

This icon is not shown for messages preceding the last message seen
by everyone, in order to reduce visual noise.

Task-ID 1881001
2018-12-06 16:18:10 +00:00
Alexandre Kühn 15bbadb69b [REF] im_livechat, mail, website_livechat: clean mail model folder
The utility classes `Timer`, `Timers` and `CCThrottleFunction`
were only used by the feature 'is typing...', thus all those files
were in the same folder.

This commit moves the utility classes in a dedicated folder,
and introduces a folder for thread mixins, in preparation for
future features on threads that will be implemented as mixins.
2018-12-06 16:18:09 +00:00
Alexandre Kühn 50dfa865ea [IMP] mail: discard replying to a message in discuss
This commit adds a button to discard replying to
a message from the Discuss inbox.

Task-ID 1881001
2018-12-06 16:18:09 +00:00
Alexandre Kühn f372ac541f [IMP] mail: rename DM conversation
This commit adds the possibility to customize the name
of a DM conversation. To do so, click on the gear icon
when hovering on a DM in the discuss sidebar.

This feature intentionally removes the access to the
settings of a DM, because the settings view only makes
sense for non-DM conversations.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn ef1c342b7c [IMP] mail: put emoji in composer based on cursor position
Before this commit, when selecting an emoji from the composer,
the emoji was put at the end of the composer content.

With this commit, the selected emoji is now put in the composer
based on the position of the cursor. It also focuses the input
and set the cursor just after the newly inserted emoji.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn 64f044761a [IMP] bus, mail, mail_bot: improved native notification
With this commit, no push notification is sent to user when
to acknowledge that he just has accepted them. Also, on native
push notifications, the Odoo Bot icon now has a transparent
background.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn f3bd34b870 [IMP] mail: merge private and public channels in discuss
Discuss sidebar now has a single category for public and
private channels called "Channels". Private channels are
prefixed with a keylock icon.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn a669d89565 [IMP] im_livechat, mail: quick search when several channels
Discuss sidebar now shows a quick search when there are
at least 20 channels or DMs or Livechats that are pinned.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn 7ad45a04e1 [IMP] im_livechat, mail: improved "is typing" notification
With this commit, the UI for "is typing..." notifications
has changed.

** before **:

In Discuss & chat windows, "is typing..." notification bar
at the bottom of the thread, inside the conversation.

** after **

In chat windows, animated '...' next to conversation name.
In Discuss, animated '...' next to conversation name in sidebar,
and text below the composer.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn 9117d968e0 [FIX] mail: get members on channel_info
Before this commit, when accessing a channel after a page reload,
the list of members in a channel was not known until the composer
on this channel has the focus, either in the Discuss app or in a
chat window.

This was a good-enough condition when information about members
was limited to mention suggestions, which requires having the
focus on the composer. However, with the 'is typing' features
on channels, it requires being aware of the members of the channel
at the moment of the rendering in discuss or in a chat window.

This commit fixes the issue by providing the list of channel
members when retrieving information about the channel.

Without this fix, the 'is typing' notifications could sometimes
not determine the name(s) and email(s) of user(s) typing something.
2018-12-06 14:51:28 +00:00
Alexandre Kühn ae5d22fa07 [FIX] bus,mail:tests: do not use deprecated test helpers
`testUtils.addMockEnvironment` is deprecated since https://github.com/odoo/odoo/commit/abf32b8b21394491040e5c11c1fea809c1d7c62c
We should use `testUtils.mock.addMockEnvironment` instead.
2018-12-06 14:51:28 +00:00
David Beguin a12f693b21 [IMP] im_livechat : set admin as default operator in demo data
To avoid having to configure the livechat channel when testing on runbot,
the admin is already set as operator of the livechat channel.

Task ID : 1912056
Closes PR #29020
2018-12-06 13:01:39 +00:00
RomainLibert 37212fe655 [FIX] lunch: fix lunch_supplier test
In https://github.com/odoo/odoo/commit/e8ac4d79964b852f21e272bc804d151b5b356791 we introduced an
error in the test_search_available_today which broke the test before 10
am everyday

closes odoo/odoo#29265
2018-12-05 10:10:09 +00:00
Jeremy Kersten 1c5ffe1737 [REF] website_forum: mass moderation, modern UI bs4 and clean type
Now forum only allow to post message of type 'question'.
New 'modern' UI with Bootstrap 4
New moderation modal for bulk spam

Co-authored-by: qha <qha@odoo.com>
Co-authored-by: qsm <qsm@odoo.com>
Co-authored-by: jke <jke@odoo.com>

Thanks to @qha-odoo for UI
Thanks to @qsm-odoo for reviewSsss

closes odoo/odoo#29235
2018-12-06 20:49:42 +00:00
qsm-odoo 08807fcba9 [IMP] website: keep social media popover on one row
Before this commit, the social media popover (used in forum but
available everywhere) may break over multiple rows if used on a relative
positioned small button. This however never occurred in standard <= 12.0
so we will consider this not a bug fix. This will however occur with
the upcoming forum refactoring, so we needed a fix for master.

This commit forces the social icons on one row and take the opportunity
to refactor the template to make a simpler and more beautiful popover
by using conventional icons and social media own colors.

closes odoo/odoo#29327
2018-12-06 18:09:54 +00:00
Antoine Prieels (ANP) 8b930c648d [IMP] partner_autocomplete: Notify when user out of credits
closes odoo/odoo#29309
2018-11-28 10:32:20 +00:00
qsm-odoo fea93a9dd6 [FIX] web: restore card-body border corners
Again (and definitely?) completes https://github.com/odoo/odoo/pull/29253

As the mentioned PR forces a background on card bodies, that background
went over the card border corners as those are rounded. This commit
fixes that by adding the correct border radius on card bodies, the same
way bootstrap does it by default for card headers and card footers.

closes odoo/odoo#29325
2018-12-06 15:38:16 +00:00
qsm-odoo a8fec3b5cd [IMP] portal, website: change the default website body bg
Use a very very very light gray as body background color for
the website so that default white cards have some contrast with the
body. Also adapt the portal system to use the portal colors when the
body bg color is equal to that very very very light gray (while it was
compared to $white before).

closes odoo/odoo#29318
2018-12-06 14:18:36 +00:00
Cedric Snauwaert a6d250a053 [IMP] sale: notify matching SO in reconciliation widget
We now display a message informing the user that the statement line is matching a sent/to_invoice SO. The user can thus decide to follow the link and confirm the SO, create the invoice and come back on the reconciliation widget to reconcile the prepayment with the validated invoice (automatically detected).

Was task #1879015

closes odoo/odoo#29312
2018-12-06 14:01:38 +00:00
Robot Odoo ee2b9554ed [MERGE][REF] survey*_: improve survey demo data
Purpose of this merge is to update the demo data for surveys used in various
applications, notably the base one in survey.

It impacts survey (feedback survey to make coherent with odoo demo data and
remove references to odoo as a product in odoo), hr_recruitment_survey (sample
recruitment survey moved from data to demo and simplified).

This merge is linked to task ID 1912228 and PR #29303.
2018-12-06 18:53:04 +01:00
Andrea Ulliana 4a350ff8cc [IMP] product: clean forms and improve archiving
Several last cleaning in the product and product variant form :
- various labelling and design improvements
- sales, purchased and manufactured stat button (number of sales was
incorrect and click will now open normal sales analysis)
- now archiving related product.template if there is only one active product.product

Task-1880039  closes #28633
2018-12-06 14:27:14 +00:00
Robot Odoo 03bcd2235b [MERGE] (l10n_be_)hr_payroll: Clean data and code
1/ hr_contract_salary: Remove hr.contract.advantage.template model

   It was a failed attempt to make somethig generic. Sometimes we are not the only ones to choose.

   Closes #28727

2/ hr_payroll: Retrieve localdict default value from a method

3/ l10n_be_hr_payroll: Merge both miscellaneous onss rules

   This is useless to have 2 separate rules.

4/ l10n_be_hr_payroll: Move withholding tax reductions into the same rule

   Compute the 'precompte professionnel' directly instead of having more than
   10 rules just for that.

5/ l10n_be_hr_payroll: Update 'Bonus à l'emploi' up to 01/09/2018

   See: https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/instructions/deductions/workers_reductions/workbonus.html

6/ l10n_be_hr_payroll: Remove duplicated salary rule

   This rule is a reduction for the ONSS contribution, not a reduction for
   the précompte professionnel.

   The reduction for the ONSS contribution is already implemented.

7/ l10n_be_hr_payroll: Rename C.P. 218 into CP 200

   The CP 218 is deprecated since 2015. See https://www.jesuisemployeur.be/banque-d-info/actualites/la-cp-218-devient-la-cp-200-qu-en-est-il-des-entreprises-qui-relevent-actuellement-des-cp-100-et-200

8/ l10n_be_hr_payroll: Use the magic formula for the PP computation

   The 'Précompte Professionel' can be deducted from a formula if you're
   patient enough to read https://finances.belgium.be/sites/default/files/downloads/700-formule-cle-20180101.pdf

   This commit remove all the hr.salary.rules from the official tables
   and use the formula instead. This should improve the performances too.

9/ hr_payroll: Show only localizations on res_config

10/ hr_payroll: Install the correct module when enabling accounting

   Closes #29207

11/ l10n_br_hr_payroll_account: Remove useless dependency

12/ l10n_in_hr_payroll: Add dependency to l10n_in

13/ l10n_be_hr_payroll: Add dependency to l10n_be

TaskID: 1915125

closes odoo/odoo#29246
2018-12-06 17:47:54 +01:00
Thibault Delavallée 7df9cd7ca6 [IMP] survey: improve demo survey
Purpose of this commit is to provide a new simpler survey as demo data in
survey application. Current survey is about Odoo use which is not coherent
with the demo data set used currently in Odoo. It is now a survey about
ecommerce use with an example of each different questions.

Survey tour is updated accordingly. It now uses a standard routing instead
of the test route. Indeed purpose of tests is to use real life use case
not corner case like testing capabilities of survey application.

This commit is linked to task ID 1912228 and PR #29303.
2018-12-06 14:49:15 +01:00
Thibault Delavallée 0ed7499a34 [IMP] hr_recruitment_survey: clean demo survey
Purpose of this merge is to simplify demo survey in hr_recruitment_survey,
make it shorter, simpler and a bit more updated.

This commit is linked to task ID 1912228 and PR #29303.
2018-12-06 14:46:57 +01:00
Thibault Delavallée c71c87ee87 [MOV] hr_recruitment_survey: set demo survey as demo instead of data
It is absolutely not necessary to have a small recruitment survey as a
data. It should be a demo, notably because it is used in demo jobs in
order to have a sample survey available.

This commit is linked to task ID 1912228 and PR #29303.
2018-12-06 14:46:27 +01:00
Yannick Tivisse db0de92122 [IMP] hr_contract_salary: Remove hr.contract.advantage.template model
It was a failed attempt to make somethig generic. Sometimes we are not the only ones to choose.

Closes #28727
2018-12-06 13:45:59 +01:00
Yannick Tivisse cc2703026a [IMP] hr_payroll: Retrieve localdict default value from a method 2018-12-06 13:45:59 +01:00