Commit Graph
126133 Commits
Author SHA1 Message Date
Romain Derie b9b1c08837 [IMP] base: add key in ir.ui.view search view
With multi-website support, the `key` field is more important than ever as it
kind of replace the xml_id behavior.

Thus, on the ir.ui.view list view it is common to search on `key`. Having it in
the search bar is mandatory.

closes odoo/odoo#29417
2018-12-11 10:39:55 +00:00
Jeremy Kersten a5f4195432 [FIX] report: don't call subst() if not defined
In case you are printing in html a report with minimal layout, you will have an error
since the function is not defined, but called by the onload of the body tag.

Now we don't call subst if it is not needed (and so not declared)

closes odoo/odoo#29341
2018-12-07 09:05:42 +00:00
Jeremy Kersten 8a05ad7843 [FIX] web: remove report_assets_common JS from minimal_layout
This assets has a lot of JS that is loaded by wkhtmltopdf without any reasons.
Wkhtmltopdf don't like long js to load (it is why subst has been write inline)

This commit allow to print again (on slowly server) several documents in the
same pdf. Before this commit, the JS was not loaded before the default js-delay
and so the subst function never called with as result a pdf of only 1 page.

After this commit you can again print several documents in the same pdf and
subst function is applied.

opw-1909000

courtesy of @beledouxdenis that help to debug this error since it is only
reproductible on paas server.

This commit follow the same logic that commit odoo/odoo@3c61ee5
And issue wkhtmltopdf/wkhtmltopdf#2083 is not yet fixed
2018-12-07 09:02:14 +00:00
Toufik Ben Jaa 37fa21a2af [FIX] account: avoid crash when request not bound to database
- When installing account using a request (e.g. http route auth set to `None`) not bound to a database,
  the installation fails.

  To avoid this, we check if the request we are using is bound to a
  database, if not, the fallback code is executed.
2018-12-12 15:19:25 +01:00
XavierDo 54ad2f57ce [FIX] mail: avoid to post multiple join message on channel
When a new user is subscribed to a channel, (multi-user, without emails)
a message is posted on this channel.

The mechanic used for that is unfortunately not very reliable
Javascript will call channel_join_and_get_info every time a channel
is added (client side) even if the user is already in the channel.

This fix simply check that the action_follow actually add the
user to the channel before sending the message.

We should avoid to call channel_join_and_get_info in this case and only call
channel_info but this fix will temporary fix the issue.

closes odoo/odoo#29441
2018-12-11 17:36:04 +00:00
Antoine Prieels (ANP) e81ef3a603 [FIX] snailmail: Do not resend letters in state 'error' in cron
closes odoo/odoo#29456
2018-12-12 09:36:36 +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
Yannick Tivisse 78f4f95a4b [IMP] l10n_be_hr_payroll: Merge both miscellaneous onss rules
This is useless to have 2 separate rules.
2018-12-06 13:45:59 +01:00
Yannick Tivisse 934b9ccc36 [IMP] 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.
2018-12-06 13:45:59 +01:00
Yannick Tivisse f67636ed2f [IMP] 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
2018-12-06 13:45:59 +01:00
Yannick Tivisse a6a0519171 [IMP] 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.
2018-12-06 13:45:59 +01:00
Yannick Tivisse a6b8b8d3dc [IMP] 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
2018-12-06 13:15:36 +01:00
Yannick Tivisse e956b5d278 [IMP] 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.
2018-12-06 13:15:36 +01:00
Yannick Tivisse d7a2148360 [IMP] hr_payroll: Show only localizations on res_config 2018-12-06 13:15:36 +01:00
Yannick Tivisse 82d4a9a885 [IMP] hr_payroll: Install the correct module when enabling accounting
Closes #29207
2018-12-06 13:15:36 +01:00
Yannick Tivisse c45bb4abda [IMP] l10n_br_hr_payroll_account: Remove useless dependency 2018-12-06 13:15:36 +01:00
Yannick Tivisse 19b6129e90 [IMP] l10n_in_hr_payroll: Add dependency to l10n_in 2018-12-06 13:15:36 +01:00
Yannick Tivisse bac90d6afd [IMP] l10n_be_hr_payroll: Add dependency to l10n_be 2018-12-06 13:15:36 +01:00
RomainLibert 6f5dc5733f [IMP] lunch: reintroduce lunch_alerts, change display of wizard
We want to be able to use alerts in order to display a message to the
users.
We want to have a minimal display in the wizard.
We want to link the toppings to the categories instead of the suppliers.

closes odoo/odoo#29301
2018-12-06 09:33:30 +00:00
Christophe Simonis e1f9499d26 [MERGE] forward port branch 12.0 up to 053bb45706 2018-12-05 18:46:15 +01:00
qmo-odoo 1da63f0ab0 [IMP] salesteam: Simplify sales team config and improved team dashboard
Reason:
  *Sales team configuration is too complex with fields you
   don't understand and that bring no added value
  *Remove the team type, every team should be able to handle
   a POS or a website for example
Contains:
  *Removal of the team_type, use_quotations, use_leads fields
  *Removal of the graph configuration fields
  *Adapting the filters that were based on the team_type
  *Clear distinction between the team dashboard behavior in crm
   from the one in sales
  *Cleansing of now dead code due to the removal of the previously
   mentionned fields

Task: #1830105
Enterprise PR: #3006
Closes: #28063
2018-12-05 15:32:53 +00:00
Thibault Delavallée 58997a9557 [REV][IMP] base: Improve search and ordering in settings
This reverts commit 01173f3745.

This commit added improvements in search and ordering of settings. However
due to DOM manipulation some events are not bound correctly. Notably saving
settings could be broken if several different tabs are modified before
saving.

After checking more in-depth settings code it appears it will be difficult
to ensure a proper re-rendering and re-ordering of settings without having
to modify deeply the code. This is therefore more a task for JS framework
team.

closes odoo/odoo#29285
2018-12-05 14:38:41 +00:00
qsm-odoo 73987067fc [REF] website_sale: use new colored cards
Since https://github.com/odoo/odoo/pull/29253, we change the way cards
can be colored by always using the background color class on the card
element itself instead of its header and footer (and by changing the
way it looks by doing so).

This commit removes the use of the old way (introduced by
https://github.com/odoo/odoo/commit/64719b71d5997c0463a9f8cde4fb8d1f5c88967a).
Note that this commit leaves the `bg-*-light` definitions for now; they
are meant to be improved in the future anyway.

closes odoo/odoo#29253
2018-12-05 10:33:48 +00:00
qsm-odoo ddf2d2dd66 [IMP] web: patch BS4 to have beautiful colored cards
BS4 colored cards do not have a very popular design. This will reset
them to a BS3-like one: only the header and footer are colored and the
body will use the color of a default card background with a light
opacity (to let the chosen color appear).
2018-12-05 10:31:37 +00:00
David Beguin a1aec33736 [IMP] crm, mass_mailing_crm : remove useless override of message_get_default_recipients
As CRM inherits directly of blacklist mixin, no need to re-override
the message_get_default_recipients in the bridge module.
This code was even not in the good place.

Anyway, email_normalized can be directly used in the
message_get_default_recipients override in crm module itself.

Task ID : 1915317
Related Task ID : 1896677

Closes PR #29261
2018-12-05 08:36:14 +00:00
Robot Odoo 5ae1432ae6 [MERGE][FIX] survey: allow to launch tours by fixing assets, tour declaration and dependencies
Purpose of this merge is basically to allow launching survey tour in browser and command line. Several fixes are necessary to achieve that purpose. See sub commits for more details.

This merge is related to task ID 1915356.

closes odoo/odoo#29264
2018-12-05 12:18:52 +01:00
Thibault Delavallée 63bfd0c1bf [FIX] survey: make dependency to web tour explicit
This commit is related to task ID 1915356 and PR #29264.
2018-12-05 10:24:52 +00:00
Thibault Delavallée 987a249719 [FIX] survey: fix base URLs for survey tours tests
Currently surveys tours are launched starting from / . However on this page
survey assets are not launched meaning ready code for survey tours is never
true.

Correctly setting base URL to be on a page loading survey assets unlocks the
ready code computation and allow to launch tests from command line notably.

This commit is related to task ID 1915356 and PR #29264.
2018-12-05 10:24:06 +00:00
Aurélien Warnon 1291ac11af [FIX] survey: add missing assets to launch tours
Tours in survey cannot be launched due to missing assets. Currently on runbot
website is installed before survey and with a nice side effect tours are
launched and green. However with survey installed without website tours
cannot be launched either in browser or using command line.

This commit is related to task ID 1915356 and PR #29264.
2018-12-05 10:10:39 +00:00
Juhil Somaiya b77c924563 [IMP] mrp: Operation set manual time as default
When the user create an operation, the system set the
operation time based on previous workorders. However they
don't exists since we just created the operation and the
default time is 60 minutes. It would be easier to ask for
a default value based on fixed time and let the user modify
it later manually after some workorders.

The commit is related to task id: 1910342

closes odoo/odoo#29208
2018-12-05 09:14:11 +00:00
Antoine Prieels (ANP) 523f3a0e68 [IMP] crm_reveal: Usability Improvements
- Rename labels and reorder fields
- Add support for states
- Add contact_filter_type
- Add filter_on_size

closes odoo/odoo#28968
2018-12-04 09:25:16 +00:00
lul-odoo 48254cc8a1 [IMP] hr_org_chart: Allow recursion in hierarchy
Employees can appear multiple times in the org chart

Purpose
=======

Allow recursive hierarchy (an employee can be its own manager; e.g. the CEO is manager of everyone
but is also member of a department managed by the CTO who is himself managed by the CEO).
This means an employee might appear in multiple place in the organisational chart.

The button to see more of the hierarchy in the organisation chart opens all employees under the N+2 of the
current employee being displayed but does not open the view of the N+2.

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

Add 'subordinates_ids' computed field on 'hr.employee' to get all subordinates (direct and indirect).

closes odoo/odoo#27900
2018-12-06 13:56:45 +00:00
lul-odoo 24609722f1 [IMP] hr_payroll: Add tests for benefits
Some behaviors were not tested.
Add 2 tests for payslip generation with additional benefits (type leave or not)
It checks that corresponding worked_day_lines are created in the payslip.

Add a test for validating a multiple day benefit: it should be split by day.

closes odoo/odoo#29304
2018-12-06 09:21:48 +00:00
qsm-odoo 8f184b3585 [FIX] web, *: make gray utilities available for all bootstrap
* web_editor

Before this commit, the web_editor app defined gray utilities: bg-* and
text-* classes for gray colors (on top of theme colors). Those are now
defined for all bootstrap (note that this was already the case as the
web_editor file was put in the backend and in the frontend). The
difference is that now the gray utilities are defined just after
the standard bootstrap. This allows to complete and fix
https://github.com/odoo/odoo/pull/29253/files as text-muted in gray
card bodies were not using the correct color without this (see code
comments for details).

closes odoo/odoo#29290
2018-12-06 10:05:57 +00:00
Robot Odoo a98f1319d5 [IMP] web: add better modal scrolling for frontend
Odoo overrides the modal behavior to make the modal-body scroll
instead of the <body/> when the modal would overflow the window. This
was however only done for "technical" modals i.e. the ones of the Odoo
UI, not the website/portal ones which are displayed to visitors.

This commit makes the behavior active for all bootstrap modals wherever
bootstrap is used.

closes odoo/odoo#29277
2018-12-06 14:38:08 +01:00
qsm-odoo c59a7e1b80 [IMP] web: add better modal scrolling for frontend
Odoo overrides the modal behavior to make the modal-body scroll
instead of the <body/> when the modal would overflow the window. This
was however only done for "technical" modals i.e. the ones of the Odoo
UI, not the website/portal ones which are displayed to visitors.

This commit makes the behavior active for all bootstrap modals wherever
bootstrap is used.
2018-12-06 11:13:05 +01:00
Christophe Monniez 3671d41ab7 [FIX] lunch_hr: remove deprecated pycompat helper
Python 2 helpers were removed in 758382b3a .
Also, fix a typo in a search domain.

closes odoo/odoo#29258
2018-12-05 07:38:58 +00:00
David Beguin 3ca10b9692 [IMP] im_livechat : optimize reports queries
Before, the duration and time to answer where computed based on the
mail channel creation date and
- the first message date from operator (for time to answer)
- the last message date (for duration)
But as the mail channel can be created long ago before the first message,
the result was not really representative.

Now, we are basing the computation only based on the messages.
Time to answer : first message date from operator - first message date
Duration : last message date - first message date

It allows, with the add of the second join on mail_message,
to simplify the extraction of those two indicator by removing the long
subselects.

Also, we fix the nbr_message in operator by adding the missing distinct.

Special mention to @jem-odoo who clearly did (almost) all the work :
This guy is amazing ! After a long and mature reflexion,
he finally put all his mighty power to enhance thoses reports
to give the users a wonderfull experience full of flowers and
peacefull sun, but also fast as a energized rabbit superhero !
Hail to him ! The One, the Only, the Chosen..
If you see him around the corner, please give him all your love
and gratitude ! Voilà voilà..

Task ID : 1895998
Closes PR #28283
2018-12-06 09:30:22 +00:00
David Beguin f513ee902c [IMP] im_livechat, website_livechat : add livechat username
To avoid that people know the complete name of the support members
(for privacy purpose), a username can be used.
Users have the opportunity to set and modify their username in
their user preferences.

If the username is not set, the complete name will still be used.

If the username is set, it is used for the discussion title, the
name of the message sender, the name of the team members in the
channel statistics. All of this, only in the livechat context.

Task ID : 1895998
Closes PR  #28283
2018-12-05 14:37:14 +00:00