Commit Graph
140385 Commits
Author SHA1 Message Date
Jorge Pinna Puissant 4b750f3a3c [FIX] product: price list reports with too many fractional digits
Before this commit, when printing the Price List report of a Product
Variant, the price is printed directly from the float result of the
calculation of the price, even if this price is rounded, the
representation of the float can have, sometimes, float precision errors
(a lot of 0 after the decimal point, and a 1 or 2 at the end).

Now, the function returns a string formatted to the correct number of
fractional digits.

opw-2069305

closes odoo/odoo#36705

closes odoo/odoo#36770

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-12 11:15:48 +00:00
Pierre Paridans c24a132ee1 [FIX] point_of_sale: missing Deffered to Promise conversion
Follow-up of the commit odoo/odoo@53285f1

closes odoo/odoo#36752

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-12 10:07:36 +00:00
Nicolas Martinelli 11a9089dd8 [FIX] mrp_bom_cost: cost without BOM
- Activate variants
- On a product variant without BOM, go to Action > Compute Price from
  BOM

A zero-division is raised because of `... / bom.product_qty`.

opw-2067520

closes odoo/odoo#36733

closes odoo/odoo#36736

closes odoo/odoo#36749

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-12 08:56:47 +00:00
Alexandre Kühn 057d3eba2e [FIX] web: use search view input with composition mode
Forward-port of #36688 (original: #36284)

Before this commit, search view was barely usable with Japanese IME.

For instance, when pressing ENTER while in composition mode and
IME prompts some suggestions, it made a search with the updated input
content. The expected behaviour should have been to update the input
content, without making the search yet.

This commit fixes the issue by turning off some actions of the
search view when typing during composition mode.

opw-2061590

closes odoo/odoo#36728

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-12 09:26:06 +00:00
Lucas Perais (lpe) 0fdc914a67 [FIX] web: search panel handles archived parent category
Have a model with a parent field
Set his parents like

Parent 0
  |
  -- Parent 1
	|
	-- Parent 2

Now, put the Parent 1 as inactive
Open a view with a search panel, which will fetch the parent field as categories

Before this commit, it crashed, because the inner record memory
did not contain a reference to the parent of Parent 2

After this commit, it doesn't crash, and the search panel
just doesn't display parents categories that are archived, nor any children of those

OPW 2070266

closes odoo/odoo#36699

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-09-12 07:42:38 +00:00
Florimond Husquinet (fhu) 9359f5b036 [FIX] web: spanish translation of page numbering in the footer for 2 templates
-Choose the document template 'external_layout_boxed' or
'external_layout_standard' for client in Spanish.
-Print an invoice.

Before this commit:

the page numbering in the footer is not displayed properly.

After this commit:

the page numbering in the footer is displayed properly

closes odoo/odoo#36741

Opw: 2066838
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-12 06:55:57 +00:00
Jairo Llopis 5dad570423 [FIX] *: remove buggy calls to with_context
When .with_context() is called with a dictionary as 1st positional
argument, it will replace context (and not modify the referenced keys)
It may create bugs when losing the content of the context (e.g. remove
partner's language)

This is a partial merge of #36164 without the inventory part as
discussed.

closes odoo/odoo#36729

X-forward: 4717ccfa
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-12 06:18:18 +00:00
Alex Tuyls e7697ea472 [FIX] account_analytic_default: missing analytic tag on invoice
When adding an analytic tag on a sale order line, if there is
a default analytic tag defined matching the criteria, the tag
on the SO line is overwritten in the invoice while it should be
kept.

opw-2068196

closes odoo/odoo#36685

closes odoo/odoo#36727

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-12 06:29:13 +00:00
Benjamin Vray a15d3a710c [FIX] crm_iap_lead_enrich: correctly fill name and description
The company description in the chatter was replaced with our internal note
Same thing if we filled the company name in the Follow-Up tab before the lead was enriched

TASK-ID : 2069155

closes odoo/odoo#36625

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2019-09-11 08:23:28 +00:00
wan beaa293377 [IMP] account: tell which invoice are duplicated
There was no way of knowing which vendor bills were duplicated if you
uploaded multiple vendor bills and the warning from
_check_duplicate_supplier_reference was raised.

closes odoo/odoo#37131

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-19 10:10:18 +00:00
wan b487537c24 [FIX] account: wrong filter_domaini on move_id from aml
closes odoo/odoo#36964

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-16 11:18:50 +00:00
Florimond Husquinet (fhu) 6abfdd37b2 [FIX] lunch: add test for domain generation when location false
Fine tuning of 988e201d2e

closes odoo/odoo#36628

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-10 14:47:11 +00:00
Florimond Husquinet (fhu) 63321d6e90 [FIX] web: french translation template Page X on Y
-Go to Settings > General Settings and choose the external_layout_background
template.
-Set a client's language to French.
-Go to Invoicing.
-Select any invoice for this client, and click Print > Invoices

Before this commit:

At the bottom of the page you would see "XY" for the page number.

After this commit:

You now see "Page X sur Y".

closes odoo/odoo#36643

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-10 15:45:39 +00:00
Goffin Simon cac9b4e58a [FIX] l10n_de: VAT Number not correctly displayed
Steps to reproduce the bug:

- Install l10n_de
- Go in General settings
- Set external_layout_din5008 as Document Template
- Let's consider the customer C with an address and a VAT number
- Create a SO with C
- Print the SO

Bug:

The VAT number of C was not correctly displayed.

opw:2069128

closes odoo/odoo#36673

X-original-commit: b50f51207aa2b4c2d264fc47797a6c123a8ea15e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-11 09:19:24 +00:00
Jorge Pinna Puissant f21778590e [FIX] point_of_sale: buttons pushed out of view
Before this commit, in a session with too many open orders the buttons
in the upper right corner, next to the 'delete order button', i.e., the
print button, the connection status, the print button and the close
button, will be pushed out of view. This makes it impossible to check
out, to print, etc., without closing orders.

Now, a scrollbar appears when to many open order and allows to see the
buttons in the right upper corner.

opw-2064409

closes odoo/odoo#36724

X-original-commit: ace930f74c46feafa0759c975e619e7fd1a30780
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-11 15:30:04 +00:00
Florimond Husquinet (fhu) b1afea13d4 [FIX] account: chart of account installation cannot find a transfer account
Before this commit:

For a couple of clients, the installation of a chart of accounts crashes
because a transfer account is not found. This account should have been created
automatically, but hasn't, or has been deleted.

After this commit:

If no transfer account is found, no account is linked to the "Transfer account"
field of the company, but the installation doesn't crash.

closes odoo/odoo#36693

Opw: 2066557
X-original-commit: d93e5c12bab233d727a6cfb519e77f5fabb73912
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-11 11:41:50 +00:00
Nans Lefebvre 682067f54e [FIX] base: fix logger message
Simple typo; instead of a logger message, an exception is output in the logs.

closes odoo/odoo#36686

X-original-commit: 83030b6ae20bc9d32b2c7a83ea5a1dca33e5f9cf
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-11 10:28:24 +00:00
Goffin Simon 555a49b403 [FIX] purchase_stock: RFQ automatically created with an inactive vendor
Steps to reproduce the bug:
- Let's consider the storable product P and the vendor V
- Set V as a supplier of P
- Archive V
- Go to product P and click on button "Replenish"

Bug:

A RFQ was created with the vendor V

Now when archiving a vendor V, all the product.supplierinfo records linked to V
will be archived.

opw:2066616

closes odoo/odoo#36672

X-original-commit: 5040c17e873b8476c754f1f3e1686c2a02b36e48
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-11 09:18:52 +00:00
Nicolas Lempereur 10f15a4faf [FIX] l10n_multilang: ignore customized data conflict
If you:

- have a multilang COA
- create an account.account manually
- add a XML ID with structure {company_id}_{anything} manually
- reload COA translations (install COA language, install COA, set
  installed COA since c346e7af3)

=> there is an error since the code try to copy translations of
account.account.template associated to custom XML ID.

fix: ignore this torcivous use case

fixes #36310
opw-2063207
closes #36544

closes odoo/odoo#36659

X-original-commit: 0fc0b7484c48fbdcf549e199b5c8cabff3ab726c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-10 19:04:53 +00:00
Nicolas Martinelli 9e30276556 [FIX] base: address and name split on 2 lines
The name and address printed on any PDF report (e.g. SO or RFQ) is very
likely to be split on 2 lines once it is long enough. For example,
'My Company (Chicago)' will be displayed on 2 lines.

This is due to 0c6e0d660e and 064eb0a4f4.

opw-2061553

closes odoo/odoo#36498

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-11 10:38:33 +00:00
Laurent Smet 01854457c5 [FIX] account: Fix editing mail alias on account.journal
Since https://github.com/odoo/odoo/commit/01d0523fd76e6d616f36c872f9bff9ca9cd9cbb9, the
_get_alias_values methods is called during the write on the mail.alias.
In this method, the r.sub seems wrong & useless since the alias_name is also checked when
writing on the mail.alias (alias_name is a related="alias_id.alias_name") with a different
behavior that the r.sub.

closes odoo/odoo#36668

--task: 2069650
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-11 07:24:17 +00:00
Lucas Perais (lpe) 6ebbea1681 [FIX] base: barcode qweb field correct API
Before this commit, the barcode Qweb Field had a
option called "type", which meant what is the mapping between
numbers and barcode, that mapping is called a symbology
https://www.barcoding.com/resources/barcoding-basics/barcode-symbologies/

This option "type" collided with what the qweb engine does
at
```
qweb > _compile_directive_field
that calls
ir_qweb > _get_field
```
It resulted in a crash where type = "barcode" was not a valid symbology
to pass to the barcode lib

It is safe to say that this barcode widget was never user, otherwise it would have crashed

This commit changes that non-functioning API, and the barcode renders well

OPW 2066870

forward-port of #36499 (330d862513dba5bbc4716fe9c8694fd0db696934)
closes odoo/odoo#36499

closes odoo/odoo#36658

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-11 08:05:34 +00:00
Raphael Collet 5032fc16b4 [FIX] orm: in modified() force target search ordering by 'id'
Some model can have really complex _order, which can induce unnecessary slow
queries; here as we don't need the right business order we force ordering by
'id' instead

OPW-2007478

closes odoo/odoo#36660

X-original-commit: a1fe8976156a7b6e14aa2d68650176a0e64ba73f
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-10 19:05:12 +00:00
Saad Thaifa 50e571acf7 [CLA] Corporate signature for Karizma Conseil
closes odoo/odoo#36642

X-original-commit: 8fbb3c4a68bb1ba2f1863c1172b4f50c130a0ed2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-10 14:22:41 +00:00
Saad Thaifa a2eaf79663 [FIX] l10n_ma: Fixed CoA
- fixed account types for few accounts
- set reconcile field for few accounts
- added new 'Achats des prestations de service'(code: 61263) account
- reflected accounts in chart template configuration

was task: 1913323
diff taken from PR #30772

X-original-commit: b04477dfa69517a93c3f2209ee98749e30741541
2019-09-10 14:22:41 +00:00
Christophe Simonis 9ae6a2f6fe [FIX] stock: correctly works on non unique recordsets
Followup of 3d6e917899 to avoid leaking
the company of first warehouse on all others when writing on multiple
records.

closes odoo/odoo#36656

X-original-commit: ca5def07346ac85bfb53304d6a73aaa85882d3d8
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-10 17:50:10 +00:00
Lucas Perais (lpe) 3c43fb61a3 [FIX] account: i18n: de: online sync partner form
In german
In account > settings
click on add a bank account

search for a bank that doesn't exist
And click, on the middle of the modal, on "create ..."

Before this commit, it crashed, because the term was wrongly translated

After this commit, it opens the form view to create a bank account

OPW 2068507

closes odoo/odoo#36652

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-10 15:44:35 +00:00
Yoshi Tashiro 1eee83c362 [CLA] update quartile CCLA
Add nakometal

closes odoo/odoo#36648

X-original-commit: dea26325f517594d975c3cba8fd90fe707c999ab
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-10 15:07:12 +00:00
Nicolas Martinelli 256f099586 [FIX] website_blog: feed when no posts
When no post exist for a blog, accessing `/blog/<id>/feed` crashes
because `blog.blog` has no field `post_date`.

opw-2066587

closes odoo/odoo#36591

X-original-commit: 2a16935ab86cb9635704ce03ef925b80954ca247
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-10 07:30:28 +00:00
Goffin Simon 18335d355e [FIX] payment_sips: Wrong test and production URLs
The production/test urls were inverted.

opw:2061123

closes odoo/odoo#36623

X-original-commit: 5325c4388c5cae38b78b88d74220f3a5dca3fc26
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-10 11:59:26 +00:00
Nicolas Martinelli 0cda05853e [FIX] website_blog: Latest Posts
On the website, when the widget "Latest Posts - Big Images" or "Latest
Posts - List" is added a 404 error is raised in the console.

This is because the regular expression of the background image is too
'greedy' and also match the trailing double quote, e.g.:
`website_blog.blog_post_cover_02"` instead of
`website_blog.blog_post_cover_02`.

By making it match the minimum pattern, the trailing double quote is not
selected.

opw-2061596

closes odoo/odoo#36622

X-original-commit: 0797a4ab90ec4d9be55e16d917da98909ce0ece4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-10 11:59:10 +00:00
Lucas Perais (lpe) 0c5409f254 [FIX] sale: i18n: fr: translation downpayment
Before this commit, a french translated term missed the string format symbol
It crashed when making a so with a downpayment and issuing invoices

After this commit, the term is corrected, and no crash occurs

OPW 2069089

closes odoo/odoo#36574

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-09 14:45:12 +00:00
RomainLibert 988e201d2e [FIX] lunch: allow location_id to be NULL
In case the last location of a user was NULL in databse, lunch was
crashing because lunch_kanban was adding an undefined leaf to the load
domain.

closes odoo/odoo#36571

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-09 14:04:12 +00:00
Nicolas Lempereur 25bba05710 [FIX] account: wrong html in AR translation
This translation causes a traceback when opening accounting app in
arabic.

opw-2068360
opw-2068513
opw-2069010
closes #36570

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-09 14:02:04 +00:00
Romain Estievenart 00d65a9495 [FIX] calendar: Attendance buttons doesn't exist on mobile
Step to reproduce :
For small screens
 > enter the debug mode
 > go to the calendar app
 > access one of your meetings
 > access the tab "invitations"
 > try to change the state of attendance

It's due to the missing kanban view used by the o2m field 'attendee_ids'
We had to create this missing kanban view to allow theses actions on mobile.

opw-2058770

closes odoo/odoo#36501

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-09-09 11:42:53 +00:00
Ankita Raval 0a9bec8f18 [FIX] account : fix statbutton of partner invoices
Before Commit:
The statbutton on partner form does not work properly.

After Commit:
we change the domain because use the wrong domain in filter so
statbutton not work properly on partnerform.

task-id : 2041822

closes odoo/odoo#35290

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-09-09 08:36:21 +00:00
Joren Van Onder 5e13e13a20 [FIX] payment_authorize: create a customer profile for ACH transactions
The response profile of an ACH transaction won't contain a credit card
number since ACH transactions use bank accounts instead. It looks like
this:

<getCustomerPaymentProfileResponse
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <messages>
    ...
  </messages>
  <paymentProfile>
    <billTo>
      <firstName>XXX</firstName>
      <lastName>XXXX</lastName>
      <address>XXX XXX XXX</address>
      <city>XXX</city>
      <state>XX</state>
      <zip>XXXXX</zip>
      <country>XXX</country>
      <phoneNumber>XXXXXXXXX</phoneNumber>
    </billTo>
    <customerProfileId>XXXXXXXXX</customerProfileId>
    <customerPaymentProfileId>XXXXXXXXX</customerPaymentProfileId>
    <payment>
      <bankAccount>
        <accountType>checking</accountType>
        <routingNumber>XXXXXXXX</routingNumber>
        <accountNumber>XXXXXXXX</accountNumber>
        <nameOnAccount>XXX</nameOnAccount>
        <echeckType>WEB</echeckType>
      </bankAccount>
    </payment>
  </paymentProfile>
</getCustomerPaymentProfileResponse>

This causes the transaction not to get confirmed in Odoo:

...
File ".../authorize_request.py", line 241, in create_customer_profile_from_tx
  res['name'] = response_profile.find('paymentProfile/payment/creditCard/cardNumber').text
AttributeError: 'NoneType' object has no attribute 'text' - - -

To solve it fall back on the accountNumber if there's no cardNumber.

opw-2062784

closes odoo/odoo#36298

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-05 17:25:27 +00:00
Sébastien Theys d0a4b20d36 [FIX] auth_signup: prevent crash if http_routing not installed
Follow up of 269aa59411

`request.lang` is only set on `http_routing` so it cannot be used here.

The fix here is the same as what was done on `web` on the mentioned commit.

To reproduce the issue:
- install any module, but not `http_routing`
- use reset password
- try to set a new password from the received link with token

A few notes about the mentioned commit:
- the `lang` `lazy_property` was removed because it was a string before and a
  record now, and lazy_property cannot return a record
- the `lang` on the `request` is now a record
- the `lang` on the `context` is still a string

closes odoo/odoo#36468

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-09-05 12:31:57 +00:00
wan 8ad3e221bb [IMP] account: name get unification
f67ee39c0c4639d7445cc341189a0b1092937f22 added Change the label "/" by "Draft <document type>" for draft entries (change name_get() of account.move)

We should have used _get_move_display_name instead. Not using it was
causing 2 different behavior (group by name in Sale/Purchase/... and
Journal Entry in Partner Ledger list view)

Also, _get_move_display_name was only differentiating draft invoices,
not bills, credit notes,...

closes odoo/odoo#37273

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-23 11:49:58 +00:00
Raphael Collet 85f33da8ed [FIX] models: also consider inactive records in modified()
closes odoo/odoo#37257

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-23 10:09:14 +00:00
Denis Ledoux 1ee3ec071e [FIX] base, hr_attendance: missing else in compute field, following odoo/odoo@9920f20e4c
closes odoo/odoo#37258

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2019-09-23 10:09:59 +00:00
Yannick Tivisse 5cc0c447aa [IMP] website: Improve test robustness
Purpose
=======

A lot a demo data are added in enterprise for the Belgian company.

It implies for example a private address for a Belgian employee for
Mitchell Admin.

This commit improves the test to work even with this new demo data.

closes odoo/odoo#37088

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-23 09:03:44 +00:00
Yannick Tivisse dea1add336 [FIX] crm: Harmonize some demo data 2019-09-23 09:03:44 +00:00
Yannick Tivisse 4f6de10d41 [FIX] resource: Fix typo 2019-09-23 07:56:12 +00:00
Yannick Tivisse b72aaca051 [FIX] hr: Correctly compute last_activity date 2019-09-23 07:56:12 +00:00
Yannick Tivisse cb55db51b7 [FIX] hr,hr_presence: Correctly retrieve config parameters values 2019-09-23 07:56:12 +00:00
RomainLibert 39ebe4094e [FIX] hr: fix button layout 2019-09-23 07:56:12 +00:00
Yannick Tivisse 285f2f9d47 [FIX] hr*: Grant user's rights to demo user for HR applications 2019-09-23 07:56:12 +00:00
Yannick Tivisse 1b21a9cf55 [FIX] hr_holidays: Reset leave type if employee changes actually 2019-09-23 07:56:12 +00:00
Yannick Tivisse 213b9bda7d [FIX] hr_holidays: Fix expected singleton issue 2019-09-23 07:56:12 +00:00