Commit Graph
127612 Commits
Author SHA1 Message Date
Xavier-Do dd85e312cd [FIX] core: backport of 62533ec7 and f167ae7d
The ready code warning timeout of 2 seconds can be confusing since
it is triggered just after the 2 seconds. We can log this message
at the end in order to give the real timeout.

In JS tests, when the ready code takes too much time, a warning is
logged. As a consequence, the runbot updates the github status as a
failure, causing real pain to people who simply wants to merge their
features.

With this commit the warning is changed into an info and the runbot will
be happy.

closes odoo/odoo#34865

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-07-15 11:37:14 +00:00
Goffin Simon 0e44904267 [FIX] stock: Delivery slip with serial number
Steps to reproduce the bug:
- Select template type boxed in general settings
- Select show serial/lot number in Delivery slip (in inventory - settings)
- Print the delivery slip with a non tacked product

Bug:

The delivery slip report displayed wrong columns.

opw:2031985

closes odoo/odoo#34852

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-15 08:43:59 +00:00
Arnold Moyaux ccbd6712f6 [FIX] mrp: MO change the quantity to 0
Usecase to reproduce:
- Create a MO for 5 final units
- Reserve all the components
- Produce 3 units
- Post Inventory (debug mode)
- Edit/Unlock
- Edit a line to consume to an arbitrary amount of quantity
- Change the product qty and set it to 3.

At this point, the reserved quantity and the quantity to consume
still the same than intialy even if the final quantity was updated.

- Mark as done

Then a move is marked as done withtout quantity done and still have
reserved quantity.

It happens because the _update_raw_move function do nothing if the
new quantity to consume is equals to 0.

The arguments returns in _update_raw_move still exists for override
but are not used by the chang_prod_qty method. It's not possible to
cancel the move and then find its parents in order to log the activity.

opw-2023653

closes odoo/odoo#34471

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-07-15 11:52:47 +00:00
mreficent d9b7cc7ab7 [FIX] purchase: not setting domain is not empty domain
Previous versions of this action had a domain. It was removed at 2d3e6d7383
Set explicitly an empty domain to force the removal when upgrading the module
Similar to 2d03ed43a5

closes odoo/odoo#34581

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 10:02:28 +00:00
Daniel Blanco 0eadcb9c53 [CLA] signature for Blanco Martin & Asociados Signing CLA
closes odoo/odoo#34844

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:30:05 +00:00
Grégory Schreiner 6a2be418f9 [CLA] signature for gregory-moka
closes odoo/odoo#34803

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:48:10 +00:00
bumanit eab60bd2e0 [CLA] Update bumanit CCLA
closes odoo/odoo#34713

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:46:00 +00:00
Nicolas Vannieuwerburgh 43bec98da8 [FIX] hr_timesheet_attendance: Allow update module
In PostgreSQL, we can't CREATE OR REPLACE VIEW if there is the type of the column change.
To fix it, just drop the view before creating it

closes odoo/odoo#34851

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-15 07:04:26 +00:00
Odoo Translation Bot 5306fbb2c5 [I18N] Update translation terms from Transifex 2019-07-14 01:19:24 +02:00
Martin Trigaux 30f760d534 [FIX] doc: adapt header to the new eLearning
closes odoo/odoo#34837

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 14:44:38 +00:00
Nans Lefebvre 1c51963cab [FIX] website_sale: _compute_abandoned_cart with multiple records
This is an api.multi method, which should therefore not call self.field.
Fortunately there's a loop just below.

opw 2035374

closes odoo/odoo#34832

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-07-12 11:43:21 +00:00
lejeune quentin a8004118b2 [IMP] point_of_sale: Updating the date of the IoT Box
before this commit the date of the IoT Box did not update.
With this commit we restart the service timesyncd on the IoT box

Task: 2034930

closes odoo/odoo#34789

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-07-11 13:54:53 +00:00
Goffin Simon f94b09dbf2 [FIX] point_of_sale: payment method journal in wrong currency
Steps to reproduce the bug:
- Install point_of_sale and account_accountant
- Create a company C in USD
- Create a cash journal CJ with no currency set
- Activate Multicurrency
- Create a pricelist P in EUR
- Create a sales journal SJ with currency = EUR
- Create pos.config in company C
- Assign SJ in the Sales Journal field
- Set P as default pricelist
- Set the cash journal CJ as payment method and save

Bug:

As CJ is implicitly in USD, it was wrong to set CJ as payment method in a pos.config
in EUR.

With courtesy of <jcb@odoo.com>

opw:2031883

closes odoo/odoo#34790

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-11 11:13:44 +00:00
Goffin Simon 8271be23cf [FIX] product: _inverse_product_pricelist uses wrong company
When reading the non stored computed field property_product_pricelist,
the force_company set in the context is taken into account. But when
writing on property_product_pricelist, the force_company was not taken
into account. So it was inconsistent as you could read a record with a
force_company in the context and wrote on an other record as the inverse
function didn't take the force_company into account.

closes #31561

opw:2032024

closes odoo/odoo#34757

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-10 13:46:51 +00:00
Aaron Bohy 8f9e1e40a3 [FIX] web: batch read of m2m in o2m after onchange
Let's assume a one2many field (editable list) in a form view with
a many2many (e.g. many2many_tags), and an onchange on the one2many
such that, when a row is added to the relation, the server returns
update commands for (a subset of) the records being already in the
relation. For thoses updated records, the many2many field needs to
be read (the onchange only returns the ids in the relation).

Before this rev., the many2many field was read independently for
each record in the one2many. This could cause a performance issue
on large relations. For instance, this was the case on
account.invoice records with a lot of lines.

This commit must be forwardported up to 12.2, not further.

Issue 2027356

closes odoo/odoo#34771

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-07-11 09:38:03 +00:00
Xavier-Do 95b4f2ab4b [IMP] core: improve test_tags
Add the support to be able to specify exlicitely module, class and method name in test_tags

Before this commit, there is no distinction between module tag and test tag. Meaning
that --test-tag module_name will replace the default +standard tag and execute all test
of the module.

This commit tries to keep the initial behaviour, while addind new features, like explicit
modules tag with /module_name, as well as class (:class) and method (.method)

Some usage examples:
--test_tags /module will execute all standard test of module
--test_tags :class will execute all standard test with class name 'class'
--test_tags .method will execute all standard test with method name 'method'
--test_tags external/module will execute all external test of module
--test_tags */module will execute all tests of module,
--test_tags */module,-standard will execute all non standard tests of module,
--test_tags -/website:TestUiTranslate.test_admin_tour_rte_translator will disable only rte translator test

closes odoo/odoo#34756

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-07-11 09:03:14 +00:00
Raphael Collet b8f4ad585e [FIX] test: assertRaises() without environment 2019-07-11 08:48:18 +00:00
Jorge Pinna Puissant a8dfc7fb73 [FIX] website_payment: consider authorized transactions as done
Before this commit, when a transaction has as status 'authorized', the
transactions' confirm page gives an error : 'Oops! There was a problem
with your payment.'

Now, the page gives the same message as when the transaction has the
status 'done' : 'Your payment was successful! It may take some time to
be validated on our end.'

opw-1984325

closes odoo/odoo#34652

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-07-08 11:15:44 +00:00
Romeo Fragomeli 885a7b5689 [FIX] web: jSignature not able to sign on "pen touch" device
Before this commit, on a device with a "pen" (e.g. Surface Pro, ...),
it was not possible to sign a document on some browsers recently
updated (e.g. Chrome, Firefox, ...) only Internet Explorer was working.
Instead of drawing continuous lines only few dots appeared.

For Chrome and Firefox we have to catch events with "addEventListener".
For Edge we add touch-action property to convert touch events into click.

Steps to reproduce:
1) Go to sales app
2) Then go to quotations (menu Sales)
3) Create a new quotation
4) Click on preview
5) Click on the "Accept" button at the end of the preview
6) Use the "pen" to draw the signature (BUG)

We use a custom version of the jSignature lib (c.f. odoo/odoo@eddcb46),
so we have to patch the file in the Odoo repo with a mix of some
pull request found in the official repo and forks.

Link:
https://github.com/brinley/jSignature/pull/109
https://github.com/brinley/jSignature/pull/159
https://github.com/willowsystems/jSignature/pull/96

opw-2029684
2019-07-08 10:23:50 +02:00
Julien Castiaux f6556b19a5 [FIX] portal: show emails in portal chatter
Create a quotation and send an email to the customer, let the customer
reply by email, as a portal user go on the portal view of that
quotation, he does not see the emails.

opw-2008653

closes odoo/odoo#34611

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-07-05 08:40:59 +00:00
Julien Castiaux 04d9715766 [FIX] website_blog: list only published posts
On the webiste, add the Latest Posts widget. Create a new blog post,
publish it on website but set its "Publishing Date" `post_date` to a
future date. The blog post is not publicly available but is listed on
the latest blog posts.

opw-2027368

closes odoo/odoo#34760

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-07-10 14:32:58 +00:00
Robot Odoo ba28a0a1b1 [FIX] hr_timesheet_attendance: Disable pivot linking and use correct field type
[FIX] hr_timesheet_attendance: disable link from timesheet attendance report
---------

Before this commit, linking was enable for pivot view of hr.timesheet.attendance.report
Opening the record is useless since all information is in
the pivot view.
Also, no list view is defined, therefore an empty list view is opened.

This commit disable linking.

[FIX] hr_timesheet_attendance: Fix report date type
---------

The field `date` of `hr.timesheet.attendance.report` if of type Date.
However, in the SQL view, the value is wrongly set
to a datetime in the database.
Therefore, the value is a datetime in database, but it's considered
as a date by the ORM. This can lead to a traceback.

The postgreql function `date_trunc` is misused because it returns
a datetime.

Fix:

1. The date value from hr_attendance.checkin is a datetime
=> cast to date

2. The date value from account_analytic_line.date is already a date
=> don't do anything

closes #34046 #34612

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#34741

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-10 18:06:43 +02:00
Lucas Lefèvre 937acb53f6 [FIX] hr_timesheet_attendance: Fix report date type
The field `date` of `hr.timesheet.attendance.report` if of type Date.
However, in the SQL view, the value is wrongly set
to a datetime in the database.
Therefore, the value is a datetime in database, but it's considered
as a date by the ORM. This can lead to a traceback.

The postgreql function `date_trunc` is misused because it returns
a datetime.

Fix:

1. The date value from hr_attendance.checkin is a datetime
=> cast to date

2. The date value from account_analytic_line.date is already a date
=> don't do anything
2019-07-10 12:19:47 +02:00
Swapnesh Shah b471ec98ed [FIX] hr_timesheet_attendance: disable link from timesheet attendance report
Before this commit, linking was enable for pivot view of hr.timesheet.attendance.report
Opening the record is useless since all information is in
the pivot view.
Also, no list view is defined, therefore an empty list view is opened.

This commit disable linking.
2019-07-10 12:19:13 +02:00
Romain Derie cd7d3a7671 [FIX] website: be able to save settings when monosite multicompany
Before this commit, `language_ids` field would be required through python code.
It is the only website res settings field that is required=True.

That's an issue since the website settings can be empty if there is no readable
website. In that case, the settings won't save.

Website res settings should be set as required XML side, in the view,
conditionned on the fact there is a website selected or not.

For the reason why there is not always a website selected, see bb473003d7.

closes odoo/odoo#34706

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-09 14:03:17 +00:00
Martin Trigaux 0481b06131 [FIX] account: correctly translate the message
Introduced at 4eeaf6c0e2

closes odoo/odoo#34738

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 09:58:28 +00:00
Valerian Dorcy 6d9fdb643d [FIX] point_of_sale: Fix initial balance for bank type
The balance start should only be set with the ending balance of the
previous session when journal type  is 'cash'. When the journal type
is 'bank', it must be 0.

Fine tuning of this commit: 46d0b461cd

opw:1981984

closes odoo/odoo#34735

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-10 09:45:15 +00:00
Nicolas Lempereur 0eee7c68ff [FIX] payment: translated in frontend
Same reason as: 4ba4d61903

Some messages from payment are displayed on the frontend (eg. when the
transaction is being done on the ecommerce), but only translations of
module matching a given domain (computed with the method of ir.http
model: _get_translation_frontend_modules_domain) are made available on
the frontend.

With this changeset, payment is added in the domain (which can be done
since payment depends on account, account on portal, and portal in
http_routing that declares the method).

opw-2033528
closes #34712

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-07-09 16:42:54 +00:00
Julien Castiaux fa58a842f4 [FIX] mass_mailing: company logo on unsubscribe url
Setup a multi-company account and multiple website (one for each
company), create a mail campaign from a different company than the
superuser, send the emails and unsubscribe, the company logo is the logo
of the company the superuser is in instead of the logo of the company
sending the email.

opw-2026528

closes odoo/odoo#34701

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-07-09 13:37:53 +00:00
Xavier Morel 3e63d8efce [ADD] core: support for parent.xxx in modifiers of o2m sub-fields
closes odoo/odoo#34699

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-07-09 12:41:41 +00:00
Goffin Simon 88a12afdf4 [FIX] purchase: purchase VATs in a multi-company
Steps to reproduce the bug:

- Create two companies C1 and C2 where C2 is the child of C1
- Create two purchase taxes T1 and T2 where T1 is in C1 and C2 is in T2
- Create a prodcuct P with T1 and T2 as supplier taxes
- Be in C1 as current company
- Create a RFQ and add P

Bug:

T1 and T2 were set on the order line of P instead of T1

PS: This fix is insired from product_id_change in model sale.order.line

opw:2032113

closes odoo/odoo#34658

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-08 12:09:51 +00:00
Nans Lefebvre a3e504eff5 [FIX] sale_timesheet: let employees officers/project users access private tasks
Have a user U that is Project User, Timesheets User, Employeed Officer.
Give him access to a private task T (by adding U as a follower of T)
on private project P.
Because of Employeed Officer rights, view_task_form2_inherited is rendered.
This shows field is_project_map_empty, which computation depends on project_id.
If U does not have access to P, then this triggers an access error, so the Task
cannot be displayed.

It is in general a legitimate configuration to allow U to interact with T
without being given full access to P, since it works in all cases but the rights
described above.
Since the computation of is_project_map_empty is the only blocking point,
we put it in sudo.

opw 2031124

closes odoo/odoo#34676

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-07-09 10:34:46 +00:00
Lucas Perais (lpe) 674ee035ca [FIX] account: vendor display name multicompany
In multicompany mode,
/!\ Adress book sharing should be deactivated

User A in company A creates a vendor bill without a partner

User B in company observes the list. The new bill is present

User A changes companies and goes to company B
User B doesn't have access to company B

User B reloads the list

Before this commit, there was an access right error on User B side because the partner associated
with User A changed company, and is now unreadable from User B perspective

After this commit, there is no crash and we have the string: Created By User A in the list
in place of the vendor display name

OPW 2028451

closes odoo/odoo#34668

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-08 15:03:50 +00:00
Jairo Llopis fb95cf7b51 [FIX] mass_mailing: Do not alter method signature
Before this patch, this method was altering the signature of its parent method, moving the position of `failure_type` to 1 and making the other 2 arguments kw-only.

It seems this accidentally didn't break anything because all calls happened to be done in kwarg mode. However, it's very possible that a downstream module that is not based on `mass_mailing` and makes positional calls gets broken when `mass_mailing` is installed.

The fix is to respect original method signature.

closes odoo/odoo#34648

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-07-09 07:14:57 +00:00
Damien Bouvy b5f61bfaad [FIX] payment_authorize: P3 version of 88de931141
closes odoo/odoo#34667

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-07-08 14:41:41 +00:00
Damien Bouvy 63a5b44380 [FIX] payment_authorize: avoid dismissing callback
The callback will usually check the transaction's state during
its execution, hence it should be executed after the state change

closes odoo/odoo#34666

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-07-08 14:05:18 +00:00
Julien Castiaux e94a789b13 [I18N] portal: make 'Accept & Sign' translatable
Move inside a node so the term can be exported (t-esc value are not
translatable)
opw-2031550

closes odoo/odoo#34663

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-08 13:20:48 +00:00
Jairo Llopis 743c790fa1 [FIX] mass_mailing: Proper translation string
Computed expressions cannot happen inside a translation string.

closes odoo/odoo#34643

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-08 12:09:13 +00:00
Florent de Labarre fb1839fa17 [FIX] mrp: cancel move when click on Mark Done
[FIX] mrp: Manufacturing cost analysis report

Steps to reproduce the bug:

- Create a finished product P with a manufacturing BOM B
- Set two components on B C1 and C2
- Create a MO with P and process it(plan and produce it)
- Unlock the MO and set the consumed qty of C1 to 0
- Lock and click on Mark as Done
- Click on Cost Analysis

Bug:

C1 was displayed in the report with a qty = 1.0

Fine tuning of this commit: cb4afb263b

opw:2010912

closes odoo/odoo#34642

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-08 09:13:15 +00:00
Lucas Perais (lpe) a0fa785eb5 [FIX] account: auto reconcile model with tax
Set an automatic reconciliation model with a tax
Create a bank statement on which one line will be caught by that model

Click on reconcile to get to the reconciliation widget
Observe the account move lines creates

Before this commit, the move line representing the tax amount
(and in the account for taxes) did not have a tax_line_id, which is
a reference to the tax that made the line exist
This messed up tax reports

After this commit, the move line of the tax has a reference
to the tax it originated from
The tax reports are correct

OPW 2006826

closes odoo/odoo#34627

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-05 15:10:26 +00:00
Odoo Translation Bot 57320593f7 [I18N] Update translation terms from Transifex 2019-07-07 01:19:07 +02:00
Lucas Perais (lpe) ccb8896fe3 [FIX] account: introduce a form view for account.move.line for mobile
On a small display, go to accounting > journal entries > create
In the (now kanban) list of account move lines, click ADD
Then, try to choose an account

Before this commit:
The list of accounts was empty.
This was because the form view spawned was the automatic generic one
The generated view did not have thr necessary structure to get fields' value
from the parent form view.
In this case, the domain of the name_search for account.account was wrong

After this commit:
The flow works on mobile as on desktop. The form view's arch is a 1 to 1
copy of the list view in terms of fields and their definition

OPW 2030837

closes odoo/odoo#34601

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-05 07:31:12 +00:00
Xavier Morel 7b33689b7b [IMP] base: better and less conflicting version of e210faa676
Backport somewhat improved version of this fix (we don't need to check
for the existing extension since we're not doing anything if there is
an extension at all) merged into later branches, to avoid forward-port
conflicts.

closes odoo/odoo#34509

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-07-05 05:53:29 +00:00
Nicolas Martinelli 6cf09b9a3c [FIX] purchase: correct average cost tests
Correctly forward-port baf1580be4 by
backporting 38eb5346c7.
2019-07-04 19:45:25 +02:00
Christophe Simonis 1debaa89f1 [MERGE] forward port branch 11.0 up to 56ce29e71f 2019-07-04 17:35:07 +02:00
Jorge Pinna Puissant 56ce29e71f [FIX] web_editor: tel url in werkzeug parser
Before 8557bcf the URLs were never rewritten for multilang, which was an
error and could duplicated the number of requests on frontend.

Since 8557bcf the URLs are rewritten. In Odoo the werkzeug library is
used to parse the URLs (this is similar to python parsing URL but works
in python2 and python3 the same), and in this particular instance it
chooses that tel:800800 is website http://tel:800800 and not a telephone
number.

The problem is when the url uses the uri 'tel:' and only numbers as a
phone number, if the user uses the global format for telephone number
(with the +) or using a separator for the numbers (e.g. '-' , '/'), in
these cases there are no problems parsing the url (phone number RFC:
https://tools.ietf.org/html/rfc3966).

This commit changes the uri 'tel:' to 'tel://' this one is correctly
parsed by the werkzeug library.

opw-2029844
closes #34306

closes odoo/odoo#34586

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-07-04 13:50:50 +00:00
Christophe Simonis a3dcde21d5 [FIX] test_rpc: use relative import (P3 compat)
Oversight of previous forward-port.
2019-07-04 11:54:23 +02:00
Christophe Simonis 2c81916f5d [MERGE] forward port branch saas-15 up to aaaf32fedd 2019-07-04 11:39:07 +02:00
Romain Derie 8b55cdd7af [FIX] account, portal, sale, website_sale: get correct company_name
This commit fixes multiple issues regarding the /shop/address and /my/account
forms where both are displaying `vat` and `company_name` fields.

1. For a company's child partner, the `company_name` was empty instead of
showing its company name (the name of its parent_id which is the commercial
entity).
2. It was possible for a child partner to edit its `vat` (which is a field
synced from parent to children, but only parent should be able to edit it as
it is the commercial entity, see 4a1bc45934 and 98b1fffd4e).
3. Company name now share the exact same condition than the vat field in order
to be editable (as it should have been). It was possible to edit vat but not
company name on /my/account.

Steps to reproduce the bug:

- Create a company contact CO with a VAT number
- Create a contact C in CO with portal access
- Log with C and go to the shop
- In the checkout, try to edit the address details

opw-2007368

closes odoo/odoo#34564

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-04 08:48:50 +00:00
Christophe Simonis aaaf32fedd [MERGE] forward port branch saas-14 up to c816efe7de 2019-07-04 10:48:04 +02:00