Commit Graph
118301 Commits
Author SHA1 Message Date
Arnold Moyaux 3c4bb080c3 [FIX] stock: reserve on transit location
Usecase to reproduce
- Create company A and company B with one warehouse each
- Warehouse from A resupply warehouse in company B
- Create a product and check the route MTO and resupply from warehouse A
- Connect as Demo User that only have access to company B
- Do a delivery order in company B for this product -> it creates a
receipt from warehouse A
- Deliver in warehouse A to company transit
- Try to reserve the receipt in company B

-> It does nothing.

It happens because the receipt move is in company A and the delivery
order is in company B. The move is tagged as make_to_order so the
reservation is based on move_orig_ids. However the move_orig_ids is
empty due to record rule that hide since it's in the other company.

In order to fix it, allow to see move from other companies that goes
to transit location.

opw-2033066

closes odoo/odoo#35223

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-07-26 13:20:14 +00:00
jcoux 69db18ef0f [FIX] hr_timesheet_attendance: allow update of view
Add the missing drop_view_if_exists that allows the recreation of the template
when updating the module

closes odoo/odoo#32380

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-26 11:27:18 +00:00
Benoît Fontaine 324268a976 [FIX] mail: translate model description
Do not use model._description as this is a static string that is untransalted
Retrieve the value on the ir.model record which has a translated field

Fixes odoo/odoo#28481

closes odoo/odoo#33957

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-25 14:56:15 +00:00
Christophe Simonis f2f24381f2 [MERGE] forward port branch saas-15 up to d649cab7b9 2019-07-25 11:43:19 +02:00
Christophe Simonis d649cab7b9 [MERGE] forward port branch saas-14 up to 39de3797f8 2019-07-25 11:42:01 +02:00
Christophe Simonis 39de3797f8 [MERGE] forward port branch 10.0 up to cb3bf5509f 2019-07-25 11:41:33 +02:00
Romain Derie cb3bf5509f [FIX] web_editor, website: avoid returning children of inactive view
Before this commit, for the following view tree:
P (active)
|
I (inactive)
|
II (active)
When calling `customize_template_get()` on 'P', it would wrongly return 'II'.
It shouldn't, since its parent 'I' is inactive.

Step to reproduce:
- Go to /shop
- Enable ecommerce categories
- Enable Collapsible Cateogories
- Disable ecommerce categories
- Collapsible categories is still shown even if its parent got archived

Test writen in 12.0 with #35154

closes odoo/odoo#35155

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-24 15:19:26 +00:00
Christophe Simonis 0375c0174d [MERGE] forward port branch saas-15 up to fc80a9dae3 2019-07-24 15:06:16 +02:00
Christophe Simonis fc80a9dae3 [MERGE] forward port branch saas-14 up to 36fdb2ff49 2019-07-24 14:01:48 +02:00
Jairo Llopis 21ede5365a [FIX] website: Delete redirections if website is deleted
Before this patch, if a website is deleted, its redirections will stay, affecting other websites.

Now, website-specific redirections will disappear along with their corresponding website.

closes odoo/odoo#35130

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-24 10:16:43 +00:00
Romain Derie 36fdb2ff49 [FIX] website_sale: restore possibility to remove promo code pricelist
Since 5c9cea4ee7, it was not possible to remove an applied promo code
pricelist by adding an empty promo code on checkout (eg removing the one shown
in the promo code input).

Indeed, when sending an empty promo code, the `search()` done in the controller
would not find any pricelist as promo would be en empty string. For the rest,
check code on mentionned commit.

See `sale_get_order()` method docstring about `code` param: "If empty, it's a
special case to reset the pricelist with the first available else the default.".

Fixes #34633
2019-07-24 11:31:57 +02:00
Jorge Pinna Puissant bdfed67504 [FIX] website_quote: Show 'Unit Price' column from quote template line
Before this commit, the unit price of the quote template line were
hidden.

Now, the unit price are shown. This is necessary because the unit price
is used if :
- the template is selected before the customer (price_list) is selected.
- the price_list is "Show public price & discount to the customer"

This commit revert  9416483465

opw-2039071

closes odoo/odoo#35069

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-22 12:18:23 +00:00
Nicolas Lempereur 041ec73b2c [FIX] doc: complete tale about two profilers
This section of log mentionned two profilers making think they were the
same.

The odoo/tools/misc.py `profile` logs a method calls inside a file that
can be used to generate a graph of method calls.

The odoo/tools/profiler.py `profile` logs a method lines calls, queries
and time spend inside the log.

fixes #31278
opw-2038941
closes #35074

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-07-22 13:15:23 +00:00
Jorge Pinna Puissant fb9caab7c1 [FIX] website_quote: negative discounts are always included in the display price
Before this commit, negative discounts (surcharges) were shown in the
sales order when the price list have the option : "Show public price &
discount to the customer".

Now,  the negative discounts are included in the display price. This
issue was already been addressed in the sales module (see https://github.com/odoo/odoo/blob/ac170e8a8238a9b0aa468f83b11aabc4cd9493de/addons/sale/models/sale.py#L1046)

Fine-tunning of : cae506f0ed

opw-2039071

closes odoo/odoo#35065

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-07-22 12:31:53 +00:00
Romain Derie ac170e8a82 [FIX] web_editor, website: stop snippet animations before cloning
Before this commit, when a snippet was cloned, its animation was not destroyed
first. The flow was:
1. Clone the snippet (DOM) - web_editor trigger `snippet_cloned`
2. Start cloned snippet animation - website listen `snippet_cloned`

This was causing bugs, eg facebook snippet for which the animation is to create
an iframe containing the facebook widget.
When cloning this snippet, its iframe would be cloned to, then its animation
would be started, creating another iframe.

To fix such flows, the snippet cloning flow should be:
1. Strop the snippet animation
2. Clone the snippet (DOM) - web_editor trigger `snippet_cloned`
3. Start cloned snippet animation - website listen `snippet_cloned`
4. Restart the original snippet animation

task-1951466

closes odoo/odoo#35029

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-22 08:30:21 +00:00
Martin Trigaux eb4700f17f [MERGE] Forward port of saas-14 to 11.0 up to 160b7c87bb
closes odoo/odoo#35044

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-22 07:17:43 +00:00
Martin Trigaux 160b7c87bb [MERGE] Forward port of 10.0 to saas-14 up to f7b6d3b0b8 2019-07-22 08:32:52 +02:00
Odoo Translation Bot 1e66c38238 [I18N] Update translation terms from Transifex 2019-07-21 03:09:04 +02:00
Lucas Perais (lpe) 51a9f30e19 [FIX] account_asset: entries should have the commercial partner if exist
Have a partner, who is an individual, but also a child of a company
Make a deferred revenue as that partner as customer
Validate, and make some entries

Before this commit, the literal partner (the individual) was the one set
on the account.move.line

after this commit, and following what is done for invoices entries,
the commercial partner is set on the account.move.line

OPW 2038774

closes odoo/odoo#34969

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-07-18 08:34:13 +00:00
Martin Trigaux 98a92dc1aa [FXI] delivery,payment: translate boolean button terms
The terminology of the boolean_button is translated with

_t(opt_terms.string_true)

which can work only if the variable content is already present in the
translation map.
This commit adds js files that do nothing but add the terms in the
translation map. This way it will be exported by babel js export and
the translation will be loaded by the web client

Closes odoo/odoo#34774

closes odoo/odoo#34954

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-18 08:58:20 +00:00
Simon Lejeune 7f54a246b7 [ADD] stock_account: test avco and inventory loss with company
opw-2027859

closes odoo/odoo#34912

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-16 11:52:30 +00:00
Simon Lejeune 0f57f0705a [FIX] stock: qty_available at date company owned
should take into account inventory/production location with companies

used in avco/standard at date

followup of rev 67ea26460f

opw-2027859
2019-07-16 11:48:12 +00:00
Simon Lejeune a2c60263fc [FIX] stock_account: production location with a company
Complete rev 67ea26460f

opw-2027859
2019-07-16 09:27:35 +00:00
Lucas Perais (lpe) b426b2f023 [FIX] account: invoice context from payment smart button is correct
Register a payment on a vendor bill.
From the menu Account > Purchase > Payment, clik to see that payment
click on the smart button to see the invoices
Create a new Bill

Before this commit, the default type and journal of the new bill were actually the ones of a customer invoice

After this commit, those defaults are the ones of a vendor bill

OPW 2038786

closes odoo/odoo#34967

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-18 07:59:46 +00:00
Dhawal Limbuwala 1ae356146c [IMP] doc: add some documentation of the attributes operation
closes odoo/odoo#20818

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-07-18 06:59:42 +00:00
Lucas Perais (lpe) e342f1ae84 [FIX] account_payment: portal payment invoice right partner
Activate option to pay invoice on the portal
Activate an acquirer with the mode: handle payments in Odoo

Make an invoice for a partner
Access that invoice through the route with the access_token
You should not be logged in !

Try to pay, with stripe for example

Before this commit, there was a cryptic error syaing that the credit card ID was invalid
This was because the transaction token was created on the public user
While we tried to access it as the invoice's partner

After this commit, there is no error as the transaction token is on the invoice's partner

OPW 2034691

closes odoo/odoo#34919

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-16 14:48:50 +00:00
Damien Bouvy f7b6d3b0b8 [FIX] payment_authorize: md5 to sha512 compat
This commit extends the changes introduced by 88de93114 to adapt
Odoo payment flows to the switch in transaction signature done
by Authorize.net.

The initial fix was not sufficient for flows that mixed redirection
payment flows and server-to-server flows (e.g. paying a quote with a
card that gets saved then using the token to pay for a subscription).

The problem comes from the fact that the server-to-server API uses
the API Transaction Key and API Login ID as credentials to authenticate
requests; there is no need for a signature since this data is never
publicly exposed on the website and a MITM is mitigated by the fact
that it would need to be done between the Odoo server and the
Authorize.net servers (both of which use https in a normal deployment)
which is admitedly more complex than doing a MITM on a Starbucks wifi.

On the other hand, the 'redirection' flow will include all transaction
parameters as inputs in an html form, therefore the signature is
required to ensure that the values have not been modified by a website
user or a mitm.

Since both flows can coexist on the same configuration, we cannot use
the same field depending on the payment flow configuration - we need
both fields to be stored for the provider.

This commit therefore has to introduce new fields on payment.acquirer
record that can store the signature key for authorize in addition to the
usual authorize fields. Instead of adding a new module, this commit uses
non-stored computed fields that will generate System Parameters entries
for any acquirer of the 'authorize' kind when set through the interface.

closes odoo/odoo#34670

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-07-16 05:25:09 +00:00
Lucas Perais (lpe) 565cb99ec0 [FIX] l10n_be_intrastat: weight must be > 0.01
Fine tuning of 06d149a3b1
It appears that according to
https://www.nbb.be/doc/dq/f_pdf_ex/nieuwsbriefintrastat_n28_2018_fr.pdf
minimum weight  is 0.01, and that anything below should be rounded to 0.01

OPW 2031682

closes odoo/odoo#34951

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-17 14:03:40 +00:00
Nicolas Lempereur 1a62c2ed47 [FIX] fleet: recurring cost => required expiration
If "Recurring Cost Amount" is set on a frequency and the date field
"Contract Expiration Date" is not set, the configuration makes no sense
since we would have an infinite cost, and infinite fleet.vehicle.cost
records and so on which is not possible.

With this changeset, the expiration will be required if there is a
recurring cost set.

opw-2036071
closes #34883

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-07-15 14:49:38 +00:00
Julien Castiaux 30b9a590fc [FIX] website_sale: reuse category on attr change
Enable "eCommerce Categories" in the website shop customize menu, select
a category, sort by catalog price, filter on an attribute, the category
is lost.

When you sort the records, the url changes from `shop/category/x` to
`shop?category=x`. As the attribute form is a plain get action, the
elements from the query string are lost.

We include the category in an hidden input so it is used by the get.

opw-2032477

closes #34603

closes odoo/odoo#34877

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-07-15 14:08:09 +00:00
Martin Trigaux d5dd136ba0 [MERGE] Forward port of saas-15 to 11.0 up to 1d9f64c91e
closes odoo/odoo#34868

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 11:56:22 +00:00
Martin Trigaux 1d9f64c91e [MERGE] Forward port of saas-14 to saas-15 up to 5d4c30cb59 2019-07-15 13:15:12 +02:00
Martin Trigaux 5d4c30cb59 [MERGE] Forward port of 10.0 to saas-14 up to bb712ad701 2019-07-15 13:10:00 +02:00
Goffin Simon bb712ad701 [FIX] account: Incorrect due date for credit notes
Steps to reproduce the bug:

- Create an invoice I
- Set the invoice date in the past and  add payment terms
- Validate I
- Create refund from I

Bug:

The invoice date is set as today but the due date was set in the past.

opw:2033438

closes odoo/odoo#34748

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-10 12:14:57 +00:00
Romain Derie 01c34a512c [FIX] website, website_sale: correctly set company_id on address
During checkout, the user can create a new billing (only for public user as it
will create a 'normal' `res.partner`), a new shipping, edit its billing (that
will edit himself) or edit its shipping address.

All those cases will go through the exact same methods, public user and logged
in user included.

This previously led to multiple issues and multiple fixes to correctly set
`company_id` and `website_id` on the address (res.partner).

See 44372471ef that fixed the `website_id` part.

See 3a0f05f33 that fixed the multi-company behavior, but needed 2ba71140 to not
modify the company of an already created partner, but was still incomplete as
after that fix a logged in user would still have the admin (sudo) company
instead of the website one as supposed.

This commit will fix that bug and add some tests for all mentionned issues.

Fixes #28853

Backport from odoo/odoo#34596

closes odoo/odoo#34689

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-10 10:42:43 +00:00
Romain Derie d24c196397 [FIX] website_sale: don't handle pl promo code if already applied
When a pl promo code is applied, the code is shown in the promo code input.

Before this commit, if the user clicked on "Apply" (so with the same code) it
would remove the pl as it would go in the `if` condition that is supposed to
handle empty code modo to reset pl.

Coming from #34633

closes odoo/odoo#34734

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-10 10:25:20 +00:00
Jorge Pinna Puissant 3360f9313d [FIX] website_payment: consider authorized transactions as done
Forward port of a8dfc7fb73

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
2019-07-10 10:03:21 +02:00
Martin Trigaux 239af6ee99 [MERGE] Forward port of saas-14 to saas-15 up to e5ec5f5f612 2019-07-10 08:46:12 +02:00
Martin Trigaux ce5ec5f5f6 [MERGE] Forward port from 10.0 to saas-14 up to 0ec0a4a32e 2019-07-10 08:35:05 +02:00
tdi-odoo 2c896f8ed0 [FIX] stock: stock.backorder.confirmation with multiple backorders singleton error
Prevent singleton error when validating stock.picking with option cancel_backorder
in case there are multiple backorders involved by displaying all the backorder's names separated by commas.

opw: 20337021

closes odoo/odoo#34709

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-09 14:43:39 +00:00
Odoo Translation Bot e26d478f49 [I18N] Update translation terms from Transifex 2019-07-14 03:08:16 +02:00
Lucas Perais (lpe) 8aaab680a9 [FIX] account_voucher: handle tax included in round globally
Have a Tax 24%, included
Have account.voucher with a line reading:
`Price: 64.93; Tax: 24% Incl`

Validate the voucher

Before this commit, the account.move.lines created were wrong and unbalanced
as the amounts that should have been affected by the tax included haven't been

After this commit, the move and its lines are correct and balanced

OPW 2031751

closes odoo/odoo#34784

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-11 09:10:46 +00:00
Lucas Perais (lpe) 06d149a3b1 [FIX] l10n_be_intrastat, _2019: support rounding to 2 decimals
Before this commit, values were rounded to the unit, which was part of the former specs
of the Intrastat report

After this commit, we make the intrastat 2019 comply with the new spec, which is to round
value, price and weight to two decimals

See the spec here: https://www.nbb.be/doc/dq/f_pdf_ex/nieuwsbriefintrastat_n28_2018_fr.pdf

OPW 2031682

closes odoo/odoo#34700

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-09 13:08:31 +00:00
Richard Mathot 0ec0a4a32e [FIX] models: avoid Unicode error when translating that error message
The patch fa492d87f4 has been backported
from Odoo 12.0, that runs on Python 3.

The string '\n\n({} {}, {} {})' to be formatted is a byte-string in
Python 2, while the return value of _() is always a unicode-string.

As format() is (too?) nice, it attempts to convert the unicode-strings
into ascii in order to inject them in the format pattern.
With some languages that are written in ascii, this works -- by chance.
When you use non-ascii languages like Japanese, it fails.

We then fix that issue by using unicode-strings in the formatting
pattern.

#OneCharacterPatch B-)

opw-2032016

-----------------------------

For full technical understanding:

Python 2.7.16 (default, Mar 11 2019, 18:59:25)
[GCC 8.2.1 20181127] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> '{}'.format('test')
'test'
>>> '{}'.format(u'test')
'test'
>>> '{}'.format(u'エ')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\u30a8' in position 0: ordinal not in range(128)
>>> u'{}'.format(u'エ')
u'\u30a8'

closes odoo/odoo#34698

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-07-09 12:26:46 +00:00
Julien Castiaux ad4a618a82 [FIX] mass_mailing: disable sitemap on unsubscribe route
Insall website and mass_mailing, go to the `/sitemap.xml` url, the
`/unsubscribe_from_list` url is listed, it should not.

opw-2033251

closes odoo/odoo#34677

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-09 07:52:25 +00:00
Francisco Fernández @PlanetaTIC 1f627dcf57 [FIX] stock: Fix product template compute quantities depends
Slightly different version than 48e93a10a1 (which was for 10.0)

closes odoo/odoo#30026

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 08:15:24 +00:00
Martin Trigaux 633c87de22 [MERGE] Forwardport of saas-15 to 11.0 up to 239af6ee99
closes odoo/odoo#34717

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 06:58:50 +00:00
Julien Castiaux 5038f777a0 [FIX] web: prevent db_manager modal close on empty pwd
Go to the database manager, configure a password either via the
interface either via the `admin_passwd` `.odoorc` config file. Click on
the backup menu, let the `password` field empty and submit the form. The
modal is closed without any warning and no query is sent.

The problem is that even if the field is marked as `required`, there is
a event listener that catch the `onsubmit` event and close the modal
even if it is not valid.

opw-2031461

closes odoo/odoo#34669

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-07-09 13:44:41 +00:00
vrenaville 7be62eb852 [FIX] account: do not assing on empty recordset
If a browse record is empty, assigning a value will fail
Introduced at c04065abd8

Closes odoo/odoo#34521

closes odoo/odoo#34654

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-08 11:42:31 +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