Commit Graph
126256 Commits
Author SHA1 Message Date
Nicolas Martinelli 1c912767d1 [FIX] stock_account: dropship & AVCO
- Activate: 'Order-Specific Routes' and 'Dropshipping'
- Create a stockable product in AVCO + AUTO
- Purchase the product at $10 and validate the receipt
  => One product @ $10 in stock
- Sell the product via dropshipping
- A PO is generated, change unit price to $20, validate
- Validate the picking

The product in stock has now a cost of $15, i.e. the dropship impacted
the cost of the product.

Now if the product in stock is sold, the product will go out at a cost
of $15. This will lead to a wrong accounting valuation (0 product in
stock with -$5 in stock).

opw-1922289
opw-1935272
opw-1937672

closes odoo/odoo#31786

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-13 09:55:40 +00:00
Martin Geubelle 170c7632f2 [FIX] web: hide handle on readonly x2m
The widget handle was displayed on x2m fields in form views, even when
the field was readonly, which makes no sense.

It is now correctly hidden.

Fixes #30580
opw-1937833

closes odoo/odoo#31743

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-13 09:31:37 +00:00
David Beguin 85b0b37dcc [IMP] survey : add retry survey button if no scoring or nbr of attempts left > 0
In order to allow the user to ealisy retake the survey he just either passed
or failed (in case of scoring activated), a retry button is added not only
in case of failed scoring survey (like it was already the case)
but also for non scoring survey.

This button is also added in the review survey page, to get direct access to
retry the survey.

The rule is the following and apply to all survey types :
If not quizz passed (this will be always true for non scoring survey):
    if is_attempts_limited
        if attempts left
            Add retry button
    else
        Add retry button

Task ID : 1950429
PR #31802

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-13 08:20:54 +00:00
Jeremy Kersten 20fa4e7ba1 [FIX] website_form_editor: fix dependencies 2019-04-08 08:09:26 +02:00
Jeremy Kersten 20f17a0948 [MRG] website_form_editor: move to community 2019-04-08 07:28:34 +02:00
Jeremy Kersten a8f83f6541 [FIX] website_form_editor: prepare move to community 2019-04-08 07:26:57 +02:00
asa-odoo e16fbee993 [IMP] sale: terms and conditions improvement
purpose: de88a727b2 introduced
a change in the sale order view. it reduced dramatically the size
of the 'terms and conditions' widget.
This commit set back easily readable dimensions

Task : 1950799

closes odoo/odoo#32129

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-05 11:55:01 +00:00
Thibault Delavallée 0b47b2f22c [REF] l10n_it_edi, website_forum: give email_from / author when creating messages and mails
Purpose: clean mail.mail creation code and use standard mail creation or
template send_mail method. In those addons we ensure author and email_from
are set to maching values, leading to more consistent emails.

Related task ID 1965040
PR #32459

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-05 14:05:31 +00:00
Thibault Delavallée ea3f4690aa [REF] crm_iap_lead: correctly use template to send emails
Purpose: clean mail.mail creation code and use standard mail creation or
template send_mail method.

In crm iap lead we can avoid custom mail creation by correctly using
send_mail method of mail template and its arguments.

Related task ID 1965040
PR #32459
2019-04-05 14:05:31 +00:00
Thibault Delavallée e7905b820d [REF] calendar: clean strange email send code
Purpose: clean mail.mail creation code and use standard mail creation or
template send_mail method.

In calendar there was strange code creating an email based on a template
then updating some values on its mail.message record created through
inherits. It seems simpler to correctly set some specific email arguments
to MailTemplate.send_mail() method and avoid this kind of code construction.

Related task ID 1965040
PR #32459
2019-04-05 14:05:31 +00:00
Thibault Delavallée 742effec8d [FIX] mail_template: correctly compute / update attachment_ids in send mail
Attachments when generating an email based on a template are done in two
steps, see notably [1]. However mail generation replaces attachments using
a 6 command. This means existing attachments given through email_values
are not correctly managed and this leads to invalid command given to the
m2m field.

This commit fixes that by correctly generating a list of commands, using
4 (add) for new attachments coming notably from reports linked to the template.

Related task ID 1965040
PR #32459

[1] https://github.com/odoo/odoo/commit/f789005c9a6c26322565a1af7cc4e57a60eab9f0
2019-04-05 14:01:13 +00:00
Christophe Monniez f60636aefa [IMP] web_tour: add a startTour helper on odoo
As a start_tour helper was added on the python side (PR #32316),
a javascript helper counterpart was needed as suggested on the PR.

closes odoo/odoo#32441

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-04-05 08:53:14 +00:00
Darshil Trivedi bedfaac989 [IMP] point_of_sale: point of sale onboarding improvement.
- Improved description of point of sale application
- Removed status from card like 'In Progress' and 'Unused'
- Click on top-right corner of POS kanban card, it shows 'Sessions' and 'Sales Orders', now it will shows 'Orders' and 'Sessions'. (for usability purpose).
- Improved Multi-Currencies wording same as invoicing
- Removed 'Advanced Currencies Setup' from settings(when clicking on 'Multi-Currencies').
- Improved list view label on 'Point of Sale'.
- Added 'PoS Product Categories' feature in 'Restrict Available Product Categories'.
- In PoS config setting, 'Pos Interface' string is put instead of 'Order Interface'.
- Filter and display issues were there when setting 'Currencies' from 'Multi-Currencies', now it is resolved.
- String 'PoS Product categories' is put instead of 'PoS Category', as it seems meaningful.
- 'Restrict Available Product Category' is ticked but any category is not selected (it means it is kept blank), then all categories are shown at POS screen.
- Allow to set default category from the available categories
- 'iface_start_categ_domain_ids' is removed because domain for 'iface_start_categ_id' is given directly in the model. So 'iface_start_categ_domain_ids' will not be required anymore.

 This commit is related to task id: 1925458

closes odoo/odoo#30808

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-04-04 12:34:01 +00:00
Shreya Modi c7c0221a48 [IMP] Delivery: Hide shipping button
On a sale order, if all for product are services, we hide
the delivery related button ('add a shipping cost' and 'recompute delivery price')

Task : 1940491

closes odoo/odoo#32145

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-05 06:59:03 +00:00
Juhil Somaiya 6f42b5ed0f [IMP] website_sale: make 'description_sale' editable in frontend
With this commit, `description_sale` is now editable in frontend.
We also display a clear placeholder to warn user that anything in this field
will be reflected on backend document (SO/Invoices).

task-1951231

closes odoo/odoo#32206

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-05 04:50:32 +00:00
Sébastien Theys 1b8b76cf7a [IMP] tests, *: add start_tour helper
Enterprise counterpart of https://github.com/odoo/odoo/pull/32316

closes odoo/enterprise#3987

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-04-04 08:45:38 +00:00
Sébastien Theys df7326f0be [IMP] tests, *: add start_tour helper
Before this commit, the syntax to start a tour was extremely verbose.
With this new method, it is possible to start a tour by just giving the
essential parameter: the tour name.
The full set of features from browser_js are kept by using **kwargs.

closes odoo/odoo#32316

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-04-04 08:44:59 +00:00
Robot Odoo 7529bd35fa [MERGE][IMP] sale_*: report and portal fine tuning
This merge changes lot of small things in sale modules. The 3
main points are
- Sales Orders form view: reorganize fields for a better usability
and renaming labels
- Sale PDF report: renaming labels and titles, moving some report section
- Quotation Portal: improving style, moving section and renaming labels

Task-1920476

closes odoo/odoo#30550

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-04 16:28:14 +02:00
asa-odoo fb2fc0b3d8 [IMP] sale, account, purchase, repair, POS, delivery: shorter fields label
In described Modules, there are some fields label like Unit of measure, Discount,
Ordered Quantity, etc... in views(list,form), report and portal, that are messy
and barely readable when lots of features are installed.

Purpose of the task is to shorter that all fields label to make clean view in
order to make it more readable without getting labels uselessly spread out on
several lines

Related to task #1933746
Closes #31962

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-04 09:38:18 +00:00
Prakash Prajapati f5628b1b8d [IMP] sale: Improve the Sale order mail template.
Rename the attachment file name.

Restore the option : have the name of the customer who viewed the quotation on the email notification

TaskID: 1920476

closes odoo/odoo#30550
2019-04-04 08:59:01 +00:00
Prakash Prajapati c76c93a9ac [IMP] sale, website_sale, *: Improve the sale order form.
Relabel placeholder of terms & conditions.

Restructure tab "Other Information".

Improve the tooltips.

TaskID: 1920476

closes odoo/odoo#30550
2019-04-04 08:59:01 +00:00
Prakash Prajapati 407834d1ca [IMP] product: “Public Price” into “Sales Price” in the pricelist.
TaskID: 1920476

closes odoo/odoo#30550
2019-04-04 08:59:01 +00:00
Prakash Prajapati 4327fbebfd [IMP] sale, sale_management, sale_stock: Improve in the portal view.
Small changes in quotation portal view:
* Reposition the 'Expiration Date'
* Added Incoterm info
* Added ":" after address
* Rename Details => Pricing
* Rename Optional Products => Options
* Remove "discount" in the column "discount" after the % In the
section "Options" add "10% discount" like in the printed report
* Add payment terms note

Purpose is to make it a little more beautiful and cleaner
for end user.

Task-1920476
2019-04-04 08:59:01 +00:00
Prakash Prajapati ed7efc1f3e [IMP] sale, sale_management, sale_stock: Improve the sale order report.
Change capital letter "A" in Invoicing Address ..etc

Added space between address and "Quotation number"

Remove the time of the quotation date

Replace "expiration date" next to "quotation date"

Rename Optional Products to "Options" and place it above the terms and conditions.

TaskID: 1920476

closes odoo/odoo#30550
2019-04-04 08:44:01 +00:00
Martin Geubelle 44a5460d43 [IMP] account: editable list with buttons for move lines
The list view of account.move.line is now editable (and grouped by
account.move by default).

Morever, when grouping by move, there are now action buttons in the list
view header.

Part of task 1915702

closes odoo/odoo#32337

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-04-02 16:37:27 +00:00
Sébastien Theys 25a8be0e7e [IMP] website_sale(_coupon): improve promo code alert style
By using proper BS4 classes for alert, so it looks better and it is more
compatible with themes.

Also removed the unused "Option not available".

closes odoo/odoo#32061

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-02 09:28:34 +00:00
Thibault Delavallée 8160c62a5b [IMP] mail: remove inheritance of composer on message
Base issue: unnecessary inherit of composer on mail.message. Indeed there are
a lot of unused fields coming from mail.message as well as message specific
behavior (notify, check access, various business methods) not relevant for
composer.

Specifications
 * remove inherit from mail.message;
 * re-define used fields;
 * ensure everything still works;

Commit linked to task ID 1907153 and PR #28464

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-04-03 13:01:27 +00:00
Thibault Delavallée 1fc047a2a2 [FIX] website_forum: remove not working channel_ids given to composer
Mail composer does not support channels. Indeed as it can be used to post
a message or send an email it only supports partners. Previously field
channel_ids given to the composer was used only in website_forum. However
it is not used and therefore simplest way of solving it is to remove it.

Anyway allowing to have channels followers of forum tags and being notified
of new publications is probably more spammy than really necessary. Especially
that it never worked.

Commit linked to task ID 1907153 and PR #28464
2019-04-03 13:01:27 +00:00
Thibault Delavallée 79c082c45a [IMP] test_mail: update counters
Some counters are not up to date notably taking in to account community-only
and test-mail with enterprise only counters. Those are used notably when
developing to ease quick check of counters.

closes odoo/odoo#32370

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-03 09:40:52 +00:00
wan 1fac092c35 [IMP] account,pos: better distinction between customer payments
Task 1934667

1. That's the partner type (and not the payment type) that should define if a payment is a customer or a supplier payment :
a. When the partner type on the payment is "customer", the payment should be considered as a customer payment
(and thus be visible from the menu customer payments)
b. When the partner type on the payment is "supplier", the payment should be considered as a supplier payment
(and thus be visible from the menu supplier payments)

2. The PoS should only create customer payments (you never pay suppliers through the PoS)
The payment created should be with a partner type "Customer"
But the partner field can stay empty if the customer wasn't set on the PoS Order

3. When I change the payment type while creating a payment from scratch, it shouldn't change the partner type
Example : I'm creating a payment for a reimbursement, I'll create it from the customer payments menu (as I'm paying a customer), I'll tick the payment type "Send money"
I don't expect the partner type to change to vendor.

closes odoo/odoo#32201

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-02 14:45:04 +00:00
svs-odoo 1774fcf778 [REM] *: removes 'show reserved' Picking option
Removes the 'Show Reserved' option in operation type (PickingType).

Task #1944853

closes odoo/odoo#31523

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-02 12:35:07 +00:00
svs-odoo 7ffaa69e72 [IMP] stock: operation types options' tweaks
In case it's appropriate (using multilocation or lots/serial numbers)
the 'show detailed operations' option is active by default when a new
operations type is created.

Task #1944853
2019-04-02 12:35:07 +00:00
Denis Vermylen 791a38a655 [FIX] web: qweb2: allow null values in a foreach iteration
Before this commit iteration in a t-foreach containing null or
undefined values crashed because they have no attributes.

closes odoo/odoo#31828

Signed-off-by: Fabien Meghazi <amigrave@users.noreply.github.com>
2019-03-12 16:15:39 +00:00
Nicolas Lempereur 79d5d57d0a [FIX] l10n_be_intrastat: typo EXTRF now 29/19
Intrastat was modified on january 2019 to backport some features for new
regulation of belgian intrastat in c5a8e3975.

There was a coding typo so EXTRF was <Report/> code attribute instead.

sources:
 https://www.nbb.be/doc/dq/e_pdf_ex/docxml-en.pdf
 https://www.nbb.be/doc/dq/f_pdf_ex/docxml-fr2019.pdf

opw-1948336
closes #31875

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-15 12:28:07 +00:00
Antoine Prieels fa10ba3416 [FIX] hw_screen: Use full width of display
The customer display used only a small part of the available width.

closes odoo/odoo#31865

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-03-15 09:24:28 +00:00
Toufik Ben Jaa 7ac7c97762 [FIX] portal: Portal User creation login check
- When creating a user from the "Grant Portal Access" wizard, the code
  checks for duplicate users.
  It does so by checking if there is a user with the same login as the
  one we want to create.

  The check is case sensitive which could lead to issues.
  For example a mistyped email (with a uppercase somewhere) could fail
  the duplicate user check.
  Since emails are not case sensitive, we want the check to be case
  insensitive too.

  OPW-1932918

closes odoo/odoo#31818

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-13 12:46:21 +00:00
xmo-odoo 747e05db55 [IMP] base: remove prefetch when getting commercial fields
This is related to issue #31549, fixing it in 10 since it's already a
minor issue here (importing 500 partners which all have the same parent,
on my system the import time goes from 2:30 to 2:00).

This is mostly a problem for such fields as `property_product_pricelist`
(added do the commercial fields list by `product`): since we're first
getting it then writing a field it depends on (updating the address,
which contains the country), the field gets invalidated for all records
on each record being imported, so if we're importing a bunch of partners
which all have the same parent (e.g. company employees)
`property_product_pricelist` is going to be re-computed for every
partner imported so far as well as the one parent we're interested in,
for every new partner we're creating.

The problem is much more prevalent with 12.0's batched creates as we're
first creating all the new partners then doing the updates, and thus for
each new partner we're computing `property_product_pricelist` for all
new partners and the one parent we're interested in, roughly doubling
the import time of a series of partners which all have the same parent.

closes odoo/odoo#31804

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-03-13 08:45:11 +00:00
Nicolas Lempereur fa4552926c [FIX] website_sale_comparison: no compare variant=False
When comparing product, there was already an exceptions that would not
list the attributes if they were only "create_variant=False" type.

But if we mix attribute create_variant False or not on a product, we
could get an error.

With this changeset, create_variant=False attribute are ignored also
when mixed with create_variant=True attributes.

opw-1946361
closes #31680

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-12 14:50:52 +00:00
Christophe Simonis 2602642a78 [IMP] mail,*: remove useless field is_master_data
This field is a non-sense. By using the same logic, it should be added
to any low level model.
Replace the check by a simple verification of presence of an XMLID.

A more generic opt-in solution should be integrated into ORM.

Partially revert commits 0db0e66e96 and
bbd64c22ab.

See #29257 odoo/enterprise#3550

closes odoo/odoo#31778

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-12 10:29:51 +00:00
Lucas Lefèvre 6207391276 [FIX] survey: Display datetime answers in results
Currently, user input lines of type ´datetime´ are not
correctly displayed in both situations:

1. not displayed at all in the survey result frontend page

2. the answered value is not displayed in the form view of
a user input line.

This commit fixes both issues

closes odoo/odoo#31815

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-03-13 12:47:33 +00:00
Lucas Lefèvre 8f8c508034 [FIX] survey: Do not parse datetime as date
Commit 98d0424 (merged in saas-12.1) fixed a Deprecated warning by using
`field_utils.parse.date` instead of relying on
moment to parse the date.
However, a datetime question type was added in saas-12.2.
When the fix commit was forward ported, the parsing of datetime
broke as `field_utils.parse.date` can't parse a datetime.

Fix: use `field_utils.parse.datetime` if `questiontype === 'datetime'`.

Also, defining `toJSON` method is no longer necessary because
it is already done in the field_utils methods.
2019-03-13 12:47:33 +00:00
Pierre Paridans ad8a6afa4f [FIX] lunch: rpc call cannot be performed in Widget.init()
The Widget's init function is synchronous.

The 'then' will execute after the end of the function so
self.group_portal_id will not be set immediately.

Also, RPC's in the init function is really not a good idea, it should be
putted in the willStart.

Original commit: https://github.com/odoo/odoo/commit/855c6dac25fccaf9312543022001ed0b360d6e13

closes odoo/odoo#31508

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-13 09:14:47 +00:00
Denis Ledoux d3453f7d15 [FIX] account, pos: speed cash basis entries
Which was basically creating n² account move lines.

If a POS session has 100 orders with each 10 lines,
100 * 100 * 10 account move lines were being created.

closes odoo/odoo#31736

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-03-11 17:22:09 +00:00
Denis Ledoux b3c3ed3a09 [FIX] point_of_sale: improve performance when calling button_confirm_bank
By disabling the tracked fields.

Doing a `message_post` invalidates the whole cache
https://github.com/odoo/odoo/blob/07e89c5c8d9f3b793a380ecf5ac0cdfee76fcf76/addons/mail/models/mail_thread.py#L2034

Therefore, if messages are posted due to a tracked field during the confirmation
of the statement, the whole cache is invalidated and everything is prefetched
over and over.

e.g. for the field
`l10n_mx_edi_sat_status` of `account.payment` in `l10n_mx_edi`
which is tracked and which is triggered during the reconciliation
https://github.com/odoo/odoo/blob/07e89c5c8d9f3b793a380ecf5ac0cdfee76fcf76/addons/account/models/account_bank_statement.py#L936

The whole cache was being invalidated for each reconciliation of each statement,
which slowed down the reconciliation process a lot.
2019-03-11 17:22:09 +00:00
Denis Ledoux 570f8ee71e [FIX] account: bank statement confirm performance improvement
`fast_counterpart_creation` creates new move lines.
The ORM doesn't know if these new move lines changed
or not the value of the field `journal_entry_ids` of each
of the bank statement lines, and for that reason
this field got invalidated from the cache at each iteration,
and the value was prefetched as soon as
`st_line.journal_entry_ids.ids` was asked.

Storing the value of this field for each line in the dict
`journal_entries` overcome this problem as we get the value
from this dict during the loop.
Of course, this relies on the fact the value of `journal_entry_ids`
doesn't change during the loop
2019-03-11 17:22:09 +00:00
Rémi Rahir 49ca43d75c [FIX] website_sale: filter fiscal positions on company v2
Sequel of cc54194e13.
The mentioned fix only worked when the user was public.

The problem arises when calling the function `_get_fpos_by_region()`
in `sudo` without specifying the company and this happens, for instance,
in every `onchange_partner_*` function of a sale order.

We propose to add the `force_company` key in the context of the sale
order to ensure the right company when selecting the fiscal position.

closes odoo/odoo#31751

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-03-11 14:57:21 +00:00
Yannick Tivisse 0ab333c6e8 [FIX] hr_skills: Don't set 'false' line in no value to set
closes odoo/odoo#31334

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-11 14:28:14 +00:00
Lucas Lefèvre f6d2d0fd87 [FIX] hr_skills: Allow searches on employee skills/resumé
Search term should match in the resumé line title or
in the resumé line description.
2019-03-11 14:28:13 +00:00
Lucas Lefèvre d03bff47f3 [IMP] hr_skills: Add demo data for all employees 2019-03-11 14:28:13 +00:00
Nans Lefebvre 75e7759afa [FIX] mrp: start the next workorder in a function to allow for overrides
When a workorder is processed, it starts the next workorder.
We put that logic in a function to allow other modules to override it.

opw 1943674
2019-03-11 14:05:33 +00:00