Commit Graph
126133 Commits
Author SHA1 Message Date
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
XavierDo 49db3d92e7 [FIX] mail, test_mail: don't notify inactive users
We don't want to notify inactive followers,
especially in the case of oddobot that was considered
as a inactive partner in _notify_compute_recipients.

The computed recipient data for odoobot are
(pid:2 active:False pshare:True notif:None)

It was considered as a partner and notified by email.
This fix simply removes inactive partner from partner to notify.

closes odoo/odoo#31734

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-11 12:50:05 +00:00
Priyanka Kakadiya 67990f91f1 [IMP] website_sale: adapt wishlist tour to product configurator fixes
Before this commit the flow of using wishlist with dynamic attributes was not
tested, and it also wasn't tested when combinations were not possible.

Those cases are now tested too.

closes #29859
PR: #31752
task-1920065

Signed-off-by: Sébastien Theys <seb-odoo@users.noreply.github.com>
2019-03-12 16:26:09 +00:00
Jorge Pinna PuissantandSébastien Theys 47016a1df3 [FIX] portal: sent form without signing
In the portal, when the client signature is asked (for a SO for example).

Before this commit, the client could send the form without really signing
the document.

Now, a warning is shown if the form is not signed.

opw-1943702

closes odoo/odoo#31768

Signed-off-by: Sébastien Theys <seb-odoo@users.noreply.github.com>


Co-authored-by: Sébastien Theys <seb@odoo.com>
2019-03-12 14:58:17 +00:00
Nans Lefebvre 37689b189e [FIX] payment: do not retry indefinitely to post process transactions
Suppose that a payment transaction cannot be reconciled for any reason.
Then _cron_post_process_after_done will try to process it every 10 minutes until
the end of time.

Moreover, if the user takes some manual action before
_cron_post_process_after_done,
even if in principle it would have been able to go through,
then it is likely to fail, e.g. on invoice_open.

Meaning that a transaction that could have been processed will become
an undead transaction.

To avoid that situation we set an arbitrary retry_limit_date set to 2 days,
which seems a reasonnable compromise.
It gives some time for the transaction to go through, but not exaggeratedly so.

opw 1945953

closes odoo/odoo#31791

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-12 14:17:38 +00:00
Martin Trigaux 7e2f9634d2 [FIX] web: do not use t-if inside assets
This makes the assets to be recomputed everytime somebody with a different
language load the page.

closes odoo/odoo#31782

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-03-12 10:58:53 +00:00
Sébastien Theys cd773e79df [FIX] website_sale: prevent crash if setting qty to 0 in cart update
When there is an optional product for which the quantity is set to 0 because
there is no stock available, the cart update would raise because it tried to
read the order line even though it was deleted above.

Now we apply the logic only if the order_line actually exists.

Part of task 1950712

closes odoo/odoo#31779

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-03-12 10:59:27 +00:00
Nicolas Martinelli 77584bee3c [FIX] website_sale: price precision
- Set company currency as VND and Enable the Multi-currency with USD
- Create Pricelists for VND & USD, set them as 'Selectable'
- Without being logged, go to eCommerce
- Select the USD pricelist
- Open a product page

The price has zero decimals, while it should have 2.

When the product page is opened, a RPC call is performed on
`get_combination_info_website`:

https://github.com/odoo/odoo/blob/7612f2c55cd4795b109a3b3dc3099f280ce99a7f/addons/sale/static/src/js/product_configurator_mixin.js#L71

When the response is received, the price is updated in:

https://github.com/odoo/odoo/blob/7612f2c55cd4795b109a3b3dc3099f280ce99a7f/addons/sale/static/src/js/product_configurator_mixin.js#L472

However, `_priceToStr` uses the decimal precision of
`product.currency_id.decimal_places`:

https://github.com/odoo/odoo/blob/7612f2c55cd4795b109a3b3dc3099f280ce99a7f/addons/sale/static/src/js/product_configurator_mixin.js#L543

This is incorrect: it should be the currency of the website, not the
curency of the product.

opw-1947140

closes odoo/odoo#31770

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-12 09:56:19 +00:00
RomainLibert 602a485f52 [FIX] hr_recruitment: create applicant in the right stage
Closes: #31733

closes odoo/odoo#31773

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-03-12 10:03:57 +00:00
Johan Demaret Rivarola 7612f2c55c [FIX] payment: remove transaction from session
Sequentially previewing and paying two sale orders was causing a
redirection issue. Instead of being redirect to the SO preview
(/my/orders/<:order_id>), the user was redirected to /payment/process.

The issue was due to processed transactions not being removed from the
session.

opw-1948288
Closes #31741

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-11 15:44:39 +00:00
Yoshi Tashiro 084246a54e [FIX] l10n_jp: wrong user type, add accounts
- Fixes incorrect user type assignments on some accounts
- Fixes incorrect account assignments on taxes
- Adds a few accounts that Japanese companies would typically need
- Changes some account codes to make the structure more consistent
- Updates descriptions of some taxes to make them appear more natural
  on PDF reports

closes odoo/odoo#30780

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-11 07:15:54 +00:00
Jon Zaballa 71471a957e [FIX] l10n_es: apply the correct groups to accounts
Groups with more than 3 digits exist, but none of the accounts are
"hanging" from them. For example, the group of accounts 1030 and 1034 is
103, even though 1030 and 1034 groups exist. The account structure
should concur with the account group structure.

closes odoo/odoo#28420

Signed-off-by: Josse Colpaert <jco-odoo@users.noreply.github.com>
2019-03-08 15:17:12 +00:00
Adrien Dieudonne b2c8963357 Revert "[FIX] barcodes: let focus in number, password, tel, phone inputs"
This reverts commit 1cdf2bdaf6.
$(':focus') seems not working depending on browser version but
we don't know yet exactly why.

opw-1948266

closes odoo/odoo#31807

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-03-13 09:51:14 +00:00
Christophe Simonis ecd8c023b7 [MERGE] forward port branch 11.0 up to e5f93b83c6 2019-03-08 15:08:16 +01:00
Christophe Simonis e5f93b83c6 [IMP] base,account: unmute logger
Since 8da3750cee, logger does not need to
be muted anymore.

This reverts commits c3764265de and
1693a27f28.
2019-03-08 14:59:01 +01:00
Lucas Perais (lpe) 6b676f6235 [FIX] web: record datapoint context without group_by or orderedBy
Have a list view, apply a group_by and a filter with a sort parameter

Click on one record to access the form view
Have a x2m within it

Before this commit, the x2m records were loaded with a context containing
the keys orderedBy and group_by
It seems harmless at first, but even conceptually those keys should not be here
- they apply on a list of records, and not to individual ones
- they may contain field names not existing in the x2m model
Hence, when accessing another list view through an action button, the list
will try to be orderedBy or group_by with the given context
Which is plain wrong in the first place and may cause crashes

After this commit, the context of a record datapoint (representing a single record)
is stripped from the keys

Read the opw for a concrete use case
OPW 1943583

closes odoo/odoo#31706

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-08 13:30:30 +00:00
Nicolas Martinelli 4524dcd691 [FIX] sale: fiscal position
- Create a fiscal position FP which maps the deposit product account to
  another account
- Create a SO, use the fiscal position FP.
- Create a downpayment

The account is not mapped following the fiscal position.

opw-1947069

closes odoo/odoo#31781

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-12 12:52:10 +00:00
Christophe Simonis fabbcf1579 [MERGE] forward port branch saas-15 up to 21c84f1532 2019-03-08 14:10:38 +01:00
Christophe Simonis 21c84f1532 [MERGE] forward port branch saas-14 up to b47749effd 2019-03-08 13:09:26 +01:00
Christophe Simonis b47749effd [MERGE] forward port branch 10.0 up to 88de931141 2019-03-08 13:08:58 +01:00
Jairo Llopis 8da3750cee [FIX] core: remove extra exception log, redundant in P3
Reverts 2b1d3ff82d introduced in 10.0 via

It was relatively useful in Odoo 10.0 because in Python 2 the exception
was missing a root cause traceback. But Python 3 includes exception
chaining by default, so it comes for free.
See [PEP3134](https://legacy.python.org/dev/peps/pep-3134/)

On top of being redundant in P3, it can also break some testcases
by causing an extra ERROR log entry, even when the final exception is
expected and caught. So it's simpler to remove it.

closes odoo/odoo#31699

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-03-08 10:46:23 +00:00
Romain Derie 88de931141 [FIX] payment_authorize: use SHA-512 instead of MD5 as not supported
Authorize.Net is phasing out the MD5 based hash use for transaction response
verification in favor of the SHA-512 based hash utilizing a Signature Key.

Instead of hashing with md5 the transaction key, it is now required to hash
the signature key (binary format) with SHA-512.

Support for MD5 will be dropped the 7th March 2019 for sandbox environment and
the 28th March 2019 for production environment, initially planned for the 14th.

Note that as of February 11, 2019 authorize removed the ability to configure or
update MD5 Hash setting in the Merchant Interface.
Merchants who had this setting configured have been emailed/contacted.

opw-1943030

Usefull links:
https://developer.authorize.net/support/hash_upgrade/
https://support.authorize.net/s/article/What-is-a-Signature-Key
https://support.authorize.net/s/article/MD5-Hash-End-of-Life-Signature-Key-Replacement
https://support.authorize.net/s/article/Do-I-need-to-upgrade-my-transaction-fingerprint-from-HMAC-MD5-to-HMAC-SHA512-and-how

closes odoo/odoo#31642

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-03-08 10:14:57 +00:00
Florent de Labarre 5aa00c3362 [IMP] web: allow to override the number of buttonbox buttons
See odoo/odoo#31546

closes odoo/odoo#31698

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-03-08 09:38:23 +00:00
svs-odoo 776cab07d0 [FIX] mrp: tracked products follow putaway strat.
Before this commit, when a product goes from manufacturing order to
location having putaway strategy, if this product is tracked, the
putaway strategy don't apply.

opw-1948514

closes odoo/odoo#31808

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-14 15:22:36 +00:00