Commit Graph
123505 Commits
Author SHA1 Message Date
Sébastien Theys 130af96dc1 [IMP] portal,sale: improve signature widget and move it to portal
Purpose
=======

The goal is to avoid duplicate code between portal and sign (enterprise), and
also to allow the user to use the signature mode 'auto' and 'load' in portal
(before this commit only 'draw' was available in portal).

The sales order signature (currently the only portal signature) has been changed
to use this new code.

This signature widget has been improved:

Improved style:
 - better structure and use of BS classes
 - removed most of custom CSS
 - made it more responsive

Changed code to follow guidelines, added JSDoc.

Technically
===========

New widget NameAndSignature common to portal and sign (enterprise).

Reworked existing portal signature form to use new widget.

Related to enterprise PR https://github.com/odoo/enterprise/pull/3266

task-1894903

closes odoo/odoo#29453
2019-01-28 09:48:32 +00:00
Xavier Morel a0e05e2ab9 [IMP] fields: selection fields only use strings
closes odoo/odoo#29039
2019-01-26 14:25:44 +00:00
Darshil Trivedi c48c3e6155 [IMP] stock, purchase_stock: Stock move description
Display product picking,receipt or delivery description depending
the picking type. The purpose is to display usefull information/note at
the right place at the right moment.

This commit is related to task ID : 1880135

closes odoo/odoo#28175
2019-01-28 10:35:11 +00:00
Christophe Simonis cf52a04979 [MERGE] forward port branch saas-12.1 up to d3b8422c9c
closes odoo/odoo#30614
2019-01-28 13:58:11 +00:00
Nicolas Martinelli cd1f57e9de [FIX] website: misspellings
opw-1931844

closes odoo/odoo#30561
2019-01-28 07:13:21 +00:00
qha-odoo 5b563549fa [IMP] website_event, *: refactor website events layouts
* base, portal, website, website_event_sale, website_event_track

- The previous event registration form was not clear on mobile

- Review some layouts to match the new design general idea, using cards
  (see forum refactoring of https://github.com/odoo/odoo/pull/29235)

- Use correct bootstrap components (like a menu instead of a breadcrumb
  on event pages)

- Review options to be able to disable the left / right column and
  choose the exact options you want to appear in them

task-1858034

closes odoo/odoo#30559
2019-01-25 14:30:55 +00:00
Florent de Labarre 340bc5c42e [IMP] hr_holidays: archived leave type
Add a filter for archived leace types.

closes odoo/odoo#30279
2019-01-25 14:41:58 +00:00
Siddarth Gajjar b43fcd6700 [FIX] mass_mailing: restore email templates
Following the new editor's merge at https://github.com/odoo/odoo/pull/29775,
the classes 'o_mail_wrapper' and 'o_mail_wrapper_td' were renamed to
'o_mailWrapper' and 'o_mailWrapper_td' because of what appears to be a
JS-variable-search-replace fail. Strange enough, the scss was not
impacted which allowed to see the bug in master.

closes odoo/odoo#30544
2019-01-25 12:43:43 +00:00
Robot Odoo 26f828e6c9 [MERGE][REF] survey: further refine access mode
Purpose of this merge is to improve access mode and authentication management
introduced at 9771fdfe8f . Purpose of this cleaning is to simplify options and make
them clearer. Instead of a selection with 4 entries we propose to use two
fields on survey model :

 * access_mode: everyone with a public link can access and answer; or only
   invited people;
 * login required: whether people have to login to answer or not;

All main use cases are covered with combination of those two options.

In this merge we also refine survey routes now using an access token defined
on survey model instead of its ID. It allows to keep surveys somehow private
especially for surveys on invitation only.

Some fixes related to last changes are also done in this merge. Some
improvements in survey templates are also provided to ease their update.

This merge is linked to task ID 1932508 and PR #30508.
2019-01-25 15:57:41 +01:00
Thibault Delavallée 61bce6958c [IMP] survey: slightly improve result template
Purpose is to remove an unnecessary template by directly including the "no
result" inside the main result template. It eases understanding and updating
of templates.

This commit is linked to task ID 1932508 and PR #30508.
2019-01-25 13:13:30 +00:00
Thibault Delavallée 2e4ea7c49a [IMP] survey: improve token and answer management
Purpose of this commit is to improve a bit management of user input tokens
and state

 * allow to test closed surveys;
 * better management of answers already filled;

This commit is linked to task ID 1932508 and PR #30508.
2019-01-25 13:12:35 +00:00
Thibault Delavallée 82f5ec044b [IMP] survey: better manage login required and signup
Purpose of this commit is to provide a real signup URL and redirection when
login is required on survey. It depends correctly on current partner state
and auth signup parameters. Redirection is now correctly managed so that
customer will be back on survey with their token.

This commit is linked to task ID 1932508 and PR #30508.
2019-01-25 13:12:32 +00:00
Thibault Delavallée e65bcb24fd [IMP] survey: refine access mode option on survey
Purpose of this merge is to improve access mode and authentication management
introduced at 9771fdfe8f . Purpose of this cleaning is to simplify options and make
them clearer. Instead of a selection with 4 entries we propose to use two
fields on survey model :

 * access_mode: everyone with a public link can access and answer; or only
   invited people;
 * login required: whether people have to login to answer or not;

All main use cases are covered with combination of those two options.

This commit is linked to task ID 1932508 and PR #30508.
2019-01-25 13:12:22 +00:00
Thibault Delavallée c801eecf23 [IMP] survey: access survey through access tokens
Purpose of this commit is to use an access token to access survey instead
of their ID. Routes are updated to use that token instead of the survey ID.
Purpose is to have less discoverable routes and be able to control a bit more
survey access even if it is not really a security parameter.

Some renaming is performed to avoid confusion in terms. Survey token and
answer token are now clearly labeled differently in the code to know which
model we are working on.

Some templates are updated to directly use the answer as base record to
have access to token and test_entry fields instead of giving those parameter
values directly in the controller. It makes some more diff but also allow
easier edition and improvement in templates when having directly survey
and answer record available.

This commit is linked to task ID 1932508 and PR #30508.
2019-01-25 13:11:50 +00:00
Thibault Delavallée 970cb47f57 [IMP] auth_signup: allow direct URL redirection instead of action when computing signup URL
Purpose of this commit is to improve the redirection done after signup.
Currently everything is tailored to create an Odoo action (action, model,
res_id, ...). This action is used to forge an URL that is the redirection
URL after signup. In some cases you would like to directly give the redirection
URL when no Odoo standard action is involved.

An example of use is the redirection when subscribing to take a survey. We
want customers to be back on survey that is a frontend URL, not a backend
URL linked to an action.

This commit is linked to task ID 1932508 and PR #30508.
2019-01-25 13:11:46 +00:00
Pierre Paridans 9f7e6bb798 [IMP] web: Deactivate swipe between form view in mobile
The swipe between the form view is taking too long to load, and the pager is a
more clean option to switch between form view.
Moreover, the swipe on tabs is not clear anymore.

- Deactivate swipe between form view
- Swipe should only be available on tabs when tabs are too long to fit in one screen.

Was originally introduced by https://github.com/odoo/odoo/commit/f4ee61f950dc1eeb7b3653ca96ea72721512b5e5

Related task: 1924764

closes odoo/odoo#30413
2019-01-25 13:02:46 +00:00
David Beguin 3dac18f9e9 [IMP] sale_crm : review quotations and sales smart buttons on opportunity
various improvements and fixes:
    - View quotations was incorrect
        -> should be real quotation view and not SO view
    - Cotation count was incorrect
        -> Should only include Quotations with state='draft' or state='sent'
    - SO button should be visible if number of SO > 0 and not the total amount

Task ID : 1908622
Closes PR #29461
2019-01-23 16:08:35 +00:00
David Beguin 73e9647b06 [IMP] crm : prefill partner info based on opportunity info
If the user is creating a res.partner from the partner_id m2o on crm.lead,
prefill contact information from the opp in it
(email, phone, mobile, street, street2, etc.).

If 'contact_name' is set on crm.lead, the created res.partner should have:
    > is_company = False
    > name = contact_name (from crm.lead)
    > company_name = company_name (from crm.lead)

If 'contact_name' is not set on crm.lead, the created res.partner should have:
    > is_company = True
    > name = company_name (from crm.lead)

Task ID : 1908622
Closes PR #29461
2019-01-23 13:49:54 +00:00
qsm-odoo 04fcbc7b22 [REF] website, *: remove 'web_editor.ready'
* website_event

Following the new editor's merge at https://github.com/odoo/odoo/pull/29775,
'web_editor.ready' was moved to website without being renamed.

Following https://github.com/odoo/odoo/pull/30409, this will remove
that 'web_editor.ready' module.

See upcoming improvements with https://github.com/odoo/odoo/pull/29442

closes odoo/odoo#30548
2019-01-25 11:04:24 +00:00
sed-odoo 37e0c5787a [IMP] l10n_be_hr_payroll_fleet, fleet: Adapt CO2 Tax
Specification
=============

- Adapt the formula used in the code with the current legal value.
- Add the LPG fuel type in standard fleet module.
- Adapt the atn furmula in the code with the current legal value.

closes odoo/odoo#29833
2019-01-25 09:07:19 +00:00
Thibault Delavallée bde36a276e [FIX] survey: fix invite mail template
Purpose of this commit is to improve the recently-introduced mail template
used to invite people to surveys. Containing

 * fix the display of deadline that is not required;
 * correctly talk about survey, not apparaisal;

This commit is linked to task ID 1932508 (side-dish fix).

closes odoo/odoo#30537
2019-01-25 09:21:50 +00:00
Arnaud Baes db1c43649d [MOV] sale_mrp, mrp: compute quantities for kit
The quantities for kits were computed only if sale_mrp was installed.
That's why the override of the method 'compute_quantities' needs to be moved in MRP.

TaskID: 1929518

closes odoo/odoo#30271
2019-01-25 09:00:55 +00:00
Arnaud Baes 8298142574 [IMP] mrp, purchase_mrp: Quantity received for kits in a PO
This commit generalize the method made for computing the quantity delivered in a sale order
in order to be used for the quantity received for a kit in a purchase order.

TaskID: 1929518
2019-01-25 09:00:55 +00:00
Antoine Prieels fae4de5c34 [IMP] mrp: Plan WO in the future
Add possibility to set a Start Date on Manufacturing Orders. Once the user clicks on Plan, the Work Order are planned at the first time available from this date.
When clicking 'Unplan', Work orders are now completely deleted

TaskID: 1889399

closes odoo/odoo#30184
2019-01-25 09:24:09 +00:00
Antoine Prieels 2ad8ebc461 [IMP] mrp: Add test for planning of MO
Check that workorders are planned directly

TaskID: 1889399
2019-01-25 09:24:09 +00:00
Antoine Prieels 43a7087354 [MOV] mrp: Move code from mrp_workorder
Move code that fills in date start and date end on the Work Orders and that does the unplan from Enterprise

Linked to odoo/enterprise#3420
TaskID: 1889399
2019-01-14 13:49:01 +00:00
Dipalee Bhalodia 78ab56e797 [MOV] stock_zebra,stock: Move reports from stock_zebra to stock
All the reports and test file from stock_zebra to stock  and mrp_zebra to mrp

closes odoo/odoo#27676
2019-01-22 11:38:56 +00:00
Robot Odoo 0f6b38b2bc [MERGE][IMP] survey : add datetime format and various improvements
Purpose of this merge is to add support of both date and datetime questions
in survey. Validation and check is added accordingly to current survey
question type support.

In this merge we also add some various improvements

 * Change the default value of the Validation Error message on
   the Date : "The answer you entered is not valid."
 * If long page, click on next and one error, the page should go up
   to allow the visitor to see where the error is.

This merge is related to task ID 1911291 and closes PR #29054.
2019-01-25 10:23:10 +01:00
Antoine Prieels (ANP) 8f486db52d [IMP] mail, snailmail, snailmail_account: improve error management
When a letter is sent through snailmail and encounter an error, it used
to create an activity to the user to notify him that there was an error
with its letter.

When a user had this activity, he didn't have any clues of what was the
error and how to manage it. So we decided to better handle snailmail
errors and give the possibility to the user to easily fix the source of
the snailmail errors.

First to give a better feedback on the letters in errors, we've made
features similar to ones existing for emails:
 - We add a mail message on the document that sent the letter, and put a
   small paper plane icon, which is red when an error occurs (like the
   envelope for email)
 - As letters can be sent in batch, we've also added an entry in the
   systray to easily manage the different documents having snailmail
   errors like for emails.

Then we identified, the most common errors encountered with the
snailmail letters and give proper way to let the user fix them:
 - Missing Required Field:
    - The address is not complete, some of the fields are empty.
    - We open a wizard allowing the user to modify the partner address
      and we try to resend all letters having this error on the modified
      partner.
    - We also try to avoid this error, by opening the wizard before
      sending the letter, but it only works for single documents, not
      for batch.
 - Trial/Credit Error:
    - The user has not enough credits to send letters anymore.
    - We open a wizard that give a redirection lnk to add credits on its
      iap account.
 - No Price Available:
    - The destination country is not supported by any of our providers,
      and we cannot do anything to send this letter.
 - Format Error:
    - The format of the pdf report send by the user is refused by our
      providers, because some visual stuffs are not respected, for
      example blank zone to print barcode or margins.
    - We show a wizard to the user letting him check a setting option
      that add a cover page in the envelope and the documents will be
      send with this extra page containing the address.
 - Unknown Error:
    - This is not one of the listed error above.
    - A wizard suggesting the user to contact support is displayed.

The cron that try to resend letters on error, has been addapted to only
try to send the error of type Trial/No Credit, because the account might
have been reloaded, and other errors, won't change if they have not been
fixed locally.

closes odoo/odoo#29685
2019-01-24 13:36:51 +00:00
RomainLibert 7274c0aa74 [REF] l10n_be_hr_payroll: Replace computed fields
The double holidays and the thirteen months fields are used for the salary
package configurator. But these fields are computed as in a perfect world.

As these values are now available with a specific salary structure,
replace the computed values in the salary package and remove the fields

closes odoo/odoo#30516
2019-01-24 14:35:50 +00:00
RomainLibert 5232670add [IMP] l10n_be_hr_payroll: add Double Holidays/13 Month salary structures
Adds the salary structure for 13th month
Adds the salary structure for double pecule
2019-01-24 14:34:49 +00:00
Yannick Tivisse c89c0e70da [IMP] hr_holidays: Avoid 2 leaves on the same day when changing state
Purpose
=======

There is already a check triggered when we modify the start/end date.

But it's still possible to:
- Create a leave A
- Refuse it
- Create a leave B on the same day
- Reset the leave A in draft state

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

The test should also be done when modifying the employee or the state.

closes odoo/odoo#30480
2019-01-24 11:22:46 +00:00
Rohan PatelandLucas Lefèvre 4ba8f51d87 [IMP] hr_expense: improve mail gateaway
1/ Send mail notification if expense is registered successfully

Before this commit, when user submits the expense via email, user is not getting
information about whether expense is registered or not. After this commit user
will get a confirmation email.

Few other usability improvements,
- Improved tooltip for the field 'default_code' in expense's form and in the
'Emails' config setting.
- Added product's default code in product's kanban view
- Filtered uom based on category of product's uom.

2/ Better parsing of expense mail subject

Criteria for matching expense product from email subject is changed,
  - The product code should be the first word of the subject.
  - Only expense products are allowed, previously there was no filter and user was
    able to select any product in expense via mail.

Currency support is added,
  - Now user can specify currency symbols and ISO code in expense mail subject.
  - If subject contains multiple numbers in that case, number with currency will
    get higher priory, and it selected as an amount in expense.
  - If multi currency is active, user can use any active currency symbol/ISO code
    in mail subject. Respective currency will be selected in registered expense.
  - If multi currency is not active, user can only pass company currency. Other
    currencies are ignored and expense will be registered as default company currency
  - If user pass non active currency in subject then that currency will be ignored
    and expense will be registered as default company currency

Examples:
PROD_CODE 2 foo $1205.91 baz

Added python test cases for mail subject parsing.

Related to task #35093
closes #22168

Co-authored-by: Lucas Lefèvre <lul@odoo.com>
2019-01-24 13:08:27 +00:00
Robot Odoo af1728fddf [IMP] hr_payroll_account: Include employee's contract analytic account
If the employee's contract has an analytic account it should be considered for the payroll.
This is actually the way analytic accounts are meant to be used in the payroll, to segregate
information based on specific groups of employees or departments.

This does not override the default behavior, it just uses the analytic account on the
contract if it has it and the salary rule doesn't.

Ticket #1927941
Closes #30119

closes odoo/odoo#30491
2019-01-24 14:29:16 +01:00
Gustavo Valverde 691712eb43 [IMP] hr_payroll_account: Include employee's contract analytic account
If the employee's contract has an analytic account it should be considered for the payroll.
This is actually the way analytic accounts are meant to be used in the payroll, to segregate
information based on specific groups of employees or departments.

This does not override the default behavior, it just uses the analytic account on the
contract if it has it and the salary rule doesn't.

Ticket #1927941
Closes #30119
2019-01-24 12:28:02 +01:00
Yannick Tivisse 0fa32b27c8 Revert "[IMP] hr_payroll_account: Remove unused field"
This reverts commit 89b12e9857.
2019-01-23 18:36:40 +01:00
David Beguin d2ed4ba93d [IMP] survey : add datetime question type
to be able to choose between asking for a date or a date with time,
a datetime question type is now added.

Task ID : 1911291
Closes PR #29054
2019-01-23 13:28:30 +00:00
David Beguin f2e2b6260b [IMP] survey : scroll up to first survey validation error
- Change the default value of the Validation Error message on
    the Date : "The answer you entered is not valid."
- If long page, click on next and one error, the page should go up
    to allow the visitor to see where the error is.

Task ID : 1911291
Closes PR #29054
2019-01-23 13:02:56 +00:00
Deep Patel 4704128dc4 [IMP] point_of_sale : add keyboard events on pos product selection interface
Keyboard Shortcuts: Numbers on the keypads (0 to 9), Backspace and Delete

related to task: #33518

closes odoo/odoo#17162
2019-01-11 08:54:26 +00:00
qsm-odoo a00e6f3dd1 [FIX] website, *: restore 'animation' system to the way it worked
* website_forum

Following the new editor's merge at https://github.com/odoo/odoo/pull/29775,
the website 'animation' system was 'extended' to vaguely use a
'Registry' instance instead of an object. This was however left
undocumented, with a require in the middle of a file, restarting all
animations when used, only used by website_forum... with more code for
no reason at all, ...

This commit restores the system to the way it was before and re-adapts
website_forum:
- No need to check if website_forum is in the DOM as it is already
  checked by the animation system (on top of that... the new code was
  checking the DOM before it was ready...).
- No need of a dynamic add on a registry, this is always done before the
  DOM is ready, so before the animations are started.
- No need to know the root instance in website forum, just use the
  animation as the Wysiwyg instance's parent.

The goal of this commit is also to avoid useless conflicts with
https://github.com/odoo/odoo/pull/29442 (that should not have had any
conflict at all as totally independent of the editor task...)

closes odoo/odoo#30478
2019-01-24 09:48:47 +00:00
Yannick Tivisse 7a2394c631 [IMP] hr_contract_salary: Change the legal/extra legal leaves behavior
purpose
======

In salary configurator, improve the cusrsor to select only extra leaves.

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

Specification
==========

Section legal leaves:
- Rename "Legal leaves" into "Extra Time Off"
- change the cursor  0 -> 15

Change the text (rmove completely old one if you go below 20)

In addition to your legal leaves, you can choose any number of extra time off you want. If you worked a full time 12 months last year, you will get a total of  [  27   ]  day(s) off.
The amount of annual time off (legal leaves) you get depends on your work schedule in the previous year. A full-time work schedule through the 12 months of the last year will grant you 20 annual time off (legal leaves)

In yearly advantages (on the right right)
- Cash                          4000 €
- Annual Time Off         20  day(s)
- Extra Time Off             7  day(s)

closes odoo/odoo#30425
2019-01-24 09:47:07 +00:00
qsm-odoo 0be8a1e43e [FIX] portal: remove useless dependency to 'web_editor.ready'
Following the new editor's merge at https://github.com/odoo/odoo/pull/29775,
the 'web_editor.ready' module was moved to website without caring about
where it was used.

Fortunately the only non-website app which uses it is portal in a module
which in fact does not need it.
It would probably make more sense if it was in portal though (see
https://github.com/odoo/odoo/pull/30409) but as an upcoming PR is about
to fix those problems (https://github.com/odoo/odoo/pull/29442), this
can stay in website for now.

closes odoo/odoo#30473
2019-01-24 09:51:00 +00:00
Thanh Dodeur d3b8422c9c [FIX] document_indexation: removes the attachment sidebar button
This commit removes the attachment button from the sidebar.

Reason:

following the introduction of the attachment button in the chatter (7f97c9fc05)
and the partial removal of this feature (1dbb555aab) in V12.0,
it has been decided that the chatter button will completely replace this feature.

closes odoo/odoo#29468
2018-12-12 14:05:48 +00:00
Jeremy Kersten 1599d0bc42 [FIX] sale: use team_id of saleman before team_id of partner
Before this commit, when we crate a sale, we use the team_id of the partner
even if a saleman has been assigned from another team.

Now we use the saleteam of the saleman if it exists before the saleteam directly.

Task-phung

Fixed case:
Partner are created from lead assigned to Partnership
So team_id on partner are Partnership
After, we assign a saleman to the partner from AM
At each SO, the team_id is Partnership instead of AM

closes odoo/odoo#30549
2019-01-25 10:32:38 +00:00
Odoo Translation Bot 94a3b3ca8f [I18N] Update translation terms from Transifex 2019-01-27 06:03:55 +01:00
RomainLibert 6c522c823c [FIX] hr_fleet: count car only once when address_home_id = user_id.partner_id
If employee had the same address_home_id as it's user_id.partner_id then
we counted twice the same car.

Eg: specify address_home_id on demo user using it's partner, system
would have counted two cars. But demo has only one car

closes odoo/odoo#30546
2019-01-25 10:39:02 +00:00
Lucas Lefèvre 607fd63545 [FIX] hr_fleet: fix access rights with employees without user
Commit 55a48e3 added support for computing car count and car reports
for employees without a linked user..
It is computed by accessing the field `address_home_id` (res.partner) to find the driver.
However, this field is private.
Therefore a user in `fleet_group_manager` has an ACL error when accessing
an employee form view which contains a stat button with the car count.

This commit compute the car count and the car report
with `address_home_id` as sudo to fix the issue.

Also fix a typo in attribute `groups` instead of `group` and fix its
value from `fleet_manager` to `fleet.fleet_group_manager`.
2019-01-25 10:37:27 +00:00
Jeremy Kersten 1e1ea00e66 [FIX] website_forum: avoid traceback on ack notif
Before this commit, notification_read raise a traceback on some button click.
Eg: Flag/unglaG

It was hidden in the console, but we can just avoid it too

closes odoo/odoo#30524
2019-01-23 17:03:04 +00:00
Jeremy Kersten 7805c55b0c [FIX] website_forum: small ui fix
Force image to stay in their container (img_fluid could be removed by end user)
Stop to use row_users
    now that we use bs4,
    allow to be more responsive,
    force height to be the same for each card.
Small imp replacing multiple if by elif
Decrease big margin between questions
Place tag on the top (if you have many tag, or very long, the ui is broken)
2019-01-23 17:03:04 +00:00
Jeremy Kersten fe62c45e70 [FIX] website_forum: use same dom for all icon
Before this commit we try to imitate the btn with the form (eg. flag button)
But if you style in a theme your button and not the form (like odoo.com) you
will see a difference between the 4 icons.
2019-01-23 16:35:32 +00:00