Commit Graph
123443 Commits
Author SHA1 Message Date
Nicolas Lempereur de3ff2e533 [FIX] analytic: account search no partner=>work ok
The name_search of account.analytic.account do not find records that
have no partner set.

This is because some ORM search may breaks when it contains a
auto_join relational field. We will try to fix this (at least in master
version).

In this changeset, we avoid the issue by combining 2 searches instead.

opw-1941547
opw-1950010
closes #31881

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-15 15:29:08 +00:00
Julien (juc) Castiaux 82c4393fd0 [FIX] website: facebook page id regexp
Some valid facebook pages appear as broken by the preview although
they load perfectly fine afterward.

At facebook, an id is required to perform requests to their graphql
endpoints. The ID is part of the URL of the page, sometime (like Odoo)
the ID is the name of the page and sometime (like LACME France) it is
a generated 9-digits id shown in the URL after the name of the page.

Example of two valid page URL and their page ID:

    https://www.facebook.com/Odoo
                             ^^^^
                             ----

    https://www.facebook.com/LACME-France-910072559192969
                                          ^^^^^^^^^^^^^^^
                             ----------------------------

`^` denotes the page id and what odoo uses as page id after the commit
`-` denotes what odoo used as page id before the commit

opw-19494444

closes odoo/odoo#31922

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-03-19 10:26:58 +00:00
Johan Demaret RivarolaandMarius Stedjan 36435b4ad7 [FIX] website_sale: fix authorized message
Field `auth_msg` never existed, this is an uncaught mistake. This commit
removes its usage and displays the fallback message to avoid runtime
error.

Closes #31903

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>


Co-authored-by: Marius Stedjan <marius@stedjan.com>
2019-03-18 09:58:45 +00:00
Swapnesh Shah 0719559904 [FIX]website: Themes should be installed from website_theme_install only
closes odoo/odoo#31854

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-14 17:04:04 +00:00
Christophe Simonis 15a78da0c9 [FIX] account: avoid using non existant field in test
Oversight of previous forward-port.
2019-03-19 10:36:17 +01:00
Christophe Simonis bd63913326 [MERGE] forward port branch saas-11.3 up to 4e39328a76 2019-03-18 20:03:24 +01:00
Christophe Simonis 4e39328a76 [FIX] mrp: use correct XMLID in test
Oversight of previous forward-port.
2019-03-18 17:55:50 +01:00
Christophe Simonis a73a47d692 [FIX] account_asset: correct forward-port 2019-03-18 17:27:21 +01:00
Christophe Simonis 9b6e37a983 [MERGE] forward port branch 11.0 up to 7e33b54771 2019-03-18 16:51:57 +01:00
Toufik Ben Jaa ec327d3f86 [FIX] project: Access to attachments with CDN
- The attachments in the tasks page on the portal can be accessed by
  clicking on them.
  They are delivered by the controllers at URL `/web/content/XXXXX`.

  By default when enabling the Content Delivery Network feature on the
  website module, the content delivered by the controller
  `/web/content/` is done through the CDN which has no user account,
  thus may not have access to the attachment.

  To fix the issue, we disable the CDN feature for the attachments in
  the tasks portal page.

  OPW-194571

closes odoo/odoo#31924

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-18 15:33:14 +00:00
Nans Lefebvre eee6e26b37 [FIX] mail_enterprise: display all attachements in preview widget
If res_id is not defined, this method used to crash.
Made obvious by commit a26496b6e7,
which added a call to that function in the main controller of web.

opw 1950403

closes odoo/odoo#31923

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-18 15:27:20 +00:00
Adrien Dieudonne 7e33b54771 [FIX] barcodes: let focus in number, password, tel, phone inputs
Before this commit, users wasn't able to input values in some
input elements like password, email and phone in mobile.

Steps to reproduce:
- Go to user
- Select Preferences
- Select Change password
- Try to input something
=> The focus was lost and the keyboard disappeared

In fact, a hidden input always have the focus when no other fields
need it. This input is used to intercept a value from a barcode
scanner.

So now, we added some input types to avoid to set the focus on the
barcode input.

The barcode input is now always defined (even if not used in desktop)
to be able to mock a Chrome mobile environment in a test.

opw-1936712
opw-1948266

closes odoo/odoo#31841

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-03-18 13:16:57 +00:00
Christophe Simonis 2940ee6b35 [MERGE] forward port branch saas-15 up to c6353942ff 2019-03-18 14:17:54 +01:00
Christophe Simonis c6353942ff [MERGE] forward port branch saas-14 up to 5162ca7be7 2019-03-18 10:53:01 +01:00
Christophe Simonis 5162ca7be7 [MERGE] forward port branch 10.0 up to 36ba37a7a1 2019-03-18 10:20:06 +01:00
Xavier MorelandDaniel Reis 1f008a439a [FIX] stock: inefficient traceability domain
PR #31086 converted the not-downstream traceability domain to use a
filter instead as =/!= False on an o2m can lead to memory issues due
to the way they're currently implemented / transformed. This also
converts the downstream versiom just in case and to limit deviations
between the branches.

Co-Authored-By: Daniel Reis <dgreis@sapo.pt>

closes odoo/odoo#31901

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-03-18 08:53:21 +00:00
qsm-odoo 2a39ab0579 [FIX] web_editor: handle snippet option submenus of submenus
Commit https://github.com/odoo/odoo/commit/8ca92330b367d54fddf1c02089ee9d0bc3edbfdc
did not think about submenus inside submenus, which is the case in the
website animate option. This made snippets potentially have multiple
animations on them, with undesired behaviors.

This commit also accordingly reviews the _setActive method for the
select-class option and also adapts following the recent forward-port of
https://github.com/odoo/odoo/pull/31440

Related to task-1929133

closes odoo/odoo#31477

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-15 13:58:50 +00:00
Nicolas Martinelli 36ba37a7a1 [FIX] base: default rate
We set the default rate to be 1.0 instead of 0.0, since a rate of 0.0
doesn't make sense.

Partial backport of 298491597c

opw-1949866

closes odoo/odoo#31866

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-15 09:58:51 +00:00
Lucas Perais (lpe) 04f7c650d0 [FIX] l10n_fr_fec: float representation when summing
Before this commit, it may happen that the the grouped account move lines
sum will be business-wise "zero" but that its representation in SQL will not be
rather, it will be equal to "10^[-high number]"

After this commit, we round the sum to the number of digits of the company's currency
to see if it is equal to zero, or not.

We also need to filter out the specific case of unaffected earnings

OPW 1942177

closes odoo/odoo#31755

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-14 13:14:07 +00:00
Jorge Pinna Puissant 1ceb689805 [FIX] account: missing partner bank account in vendor credit note
Have a partner (vendor) with a bank account.
Create a Vendor Bills. Change the form view of the vendors bills to
display the field partner_bank_id ('Bank account').
The field shows correctly the bank account of the vendor.

Before this commit, when creating a Credit Note, the field
partner_bank_id is empty.

Now, the field parnet_bank_id is the one of the Company.

opw-1903143

closes odoo/odoo#31554

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-18 08:47:57 +00:00
Nicolas Martinelli a03bd36ec8 [FIX] point_of_sale: picking on move line
- Activate Lots and S/N
- Track a product A by unique S/N
- Receive one unit of A
- Sell the unit of A through the POS
- Go to Invnetory > Products > Lots/Serial Numbers, and open the
  Upstream Traceability report

The line corresponding to the outgoing move line is not linked to the
corresponding picking.

The field `picking_id` is empty on the `stock.move.line`, so the link is
not directly retrieved.

Related to #31879 which fixes the issue for existing `stock.move.line`.
opw-1939413

closes odoo/odoo#31880

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-15 13:21:25 +00:00
Nicolas Martinelli e7c92352be [FIX] stock: picking of move line
- Activate Lots and S/N
- Track a product A by unique S/N
- Receive one unit of A
- Sell the unit of A through the POS
- Go to Inventory > Products > Lots/Serial Numbers, and open the
  Upstream Traceability report

The line corresponding to the outgoing move line is not linked to the
corresponding picking.

The field `picking_id` is empty on the `stock.move.line`, so the link is
not directly retrieved.

Even if the POS should set the `picking_id` field, the traceability
report should fallback on the picking of the move.

opw-1939413

closes odoo/odoo#31879

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-15 13:03:36 +00:00
Odoo Translation Bot 6b4a35facd [I18N] Update translation terms from Transifex 2019-03-17 03:13:11 +01:00
Cedric Snauwaert 1834b80bfa [FIX] account: error in concurrent update while reconciling
In reconciliation widget, when clicking reconcile with some existing line. if by any chance the transaction gets rolled back because of a concurrent update, the next replay attempt will use the modified parameters, and we will get a KeyError. Retrying the operation will succeed as soon as no other transaction conflicts again.
Altering mutable RPC parameters is a bit risky in a public RPC method, particularly when those altered parameters will modify the effect of the method. Making a deepcopy of the parameters before using them is an easy workaround. The framework does not do it by default because of the hard-to-foresee memory overhead it would have.

fixes #25403

closes odoo/odoo#31882

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-03-15 13:01:03 +00:00
Antoine Prieels f3ea68c909 [FIX] point_of_sale: Remove padding from customer display
closes odoo/odoo#31869

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-03-15 09:35:38 +00:00
Christophe Simonis f5ab04ce50 [FIX] web: adapt new test to extra rpc call made on view loading 2019-03-13 17:55:13 +01:00
Christophe Simonis afe8e97800 [MERGE] forward port branch 11.0 up to c23d1186e7 2019-03-13 16:52:40 +01:00
Christophe Simonis c23d1186e7 [MERGE] forward port branch saas-15 up to 21ef0f4f6d 2019-03-13 16:15:34 +01:00
Christophe Simonis 21ef0f4f6d [MERGE] forward port branch saas-14 up to d5a8b238fa 2019-03-13 16:06:34 +01:00
Christophe Simonis d5a8b238fa [MERGE] forward port branch 10.0 up to 49ca43d75c 2019-03-13 13:23:43 +01:00
tarteo a9a8eeac1d [FIX] account: show missing 'Go to bank statements' button
When importing bank statements, a rainbow man is shown but with no action button
The active model is account.bank.statement.import in this context

Before this commit, the rainbow man was staying with no possible action

closes odoo/odoo#30723

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-13 10:44:15 +00:00
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
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
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
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