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
closesodoo/odoo#35223
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Add the missing drop_view_if_exists that allows the recreation of the template
when updating the module
closesodoo/odoo#32380
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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
Fixesodoo/odoo#28481closesodoo/odoo#33957
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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 #35154closesodoo/odoo#35155
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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.
closesodoo/odoo#35130
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
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
closesodoo/odoo#35069
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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>
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
closesodoo/odoo#35029
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#34969
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
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
Closesodoo/odoo#34774closesodoo/odoo#34954
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
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
closesodoo/odoo#34967
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
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
closesodoo/odoo#34919
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
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.
closesodoo/odoo#34670
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
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>
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#34603closesodoo/odoo#34877
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
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
closesodoo/odoo#34748
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
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#34596closesodoo/odoo#34689
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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 #34633closesodoo/odoo#34734
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
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
closesodoo/odoo#34709
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
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
closesodoo/odoo#34784
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
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
closesodoo/odoo#34700
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
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'
closesodoo/odoo#34698
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
Insall website and mass_mailing, go to the `/sitemap.xml` url, the
`/unsubscribe_from_list` url is listed, it should not.
opw-2033251
closesodoo/odoo#34677
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
closesodoo/odoo#34669
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
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
closesodoo/odoo#34652
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>