When a user uses Strip and clicks on "Pay & Confirm", a "Bad Request"
error can pop-up. This is because it tries to reload the page, while it
should only display the Strip pop-up.
This is simply due to a `preventDefault` done after the event is
performed, and not before.
opw-692341
When a user tries to pay a website quote thanks to Stripe, the button
spins and nothing happens.
In the case of a quote, the jQuery selector is not correct.
opw-692341
When a quotation is opened from the frontend, set the SO id in the
request. This is necessary in the following use case:
- Receive a website quote
- Pay thanks to Stripe
After commit da82a6b705, we call the route
`/shop/payment/transaction/` manually. However, this route expects to
retrieve the SO id thanks to a call to `sale_get_order`. Since we are
not going through the webshop and the user might not be connected, the
method is unable to retrieve the SO id.
opw-692341
One of the behavioural divergences between "create or replace" view and
DROP; CREATE turns out to be that "create or replace" can only add
columns *at the end* of the view, and can not change the name or type of
the view during replacement, which can break migrations.
closes#14028
In v9, the creation of a product doesn't set a `valuation` or a
`cost_method` by default. It means that the corresponding fields of the
product category is selected instead.
In v10, this is the other way around: a default value is set on these
fields, and therefore the value on the product is selected. This is
obviously a change in behavior, and moreover the field is invisible in
the product view, meaning that it cannot be changed.
This is due to the new API conversion. In the new API, the methods
`_compute_valuation_type` and `_compute_cost_method` are called through
the 'onchange' mechanism. This sets the associated fields, which are
then copied in their `property_` counterpart thanks to the inverse
function.
opw-691231
Before, when we consumed 3 instead of 1 in a production order, it
gave a traceback. It was because it created moves
with negative quantities. So, something was wrong with
the quantity_done/product_uom_qty set when creating the extra moves
When creating an extra move because of the procurement,
but you still need to split afterwards (e.g. procurement 10, production order 12, you do 11),
then you should have a difference between quantity_done and product_uom_qty
in the extra move and not try to change it on the original.
That way, we make sure we pass the correct quantities.
We support 'returns' in the POS frontend by allowing the user to
specify a negative quantity. Before this patch however, the backend
would always generate a single picking per pos.order. This is
problematic when a pos.order contains both lines with a positive and
negative quantity. The generated move lines would not all have the same
source and destination location and so could not be added to the same
picking.
This commit creates an extra 'return' picking when required and assigns
the generated moves to the correct picking.
opw-690812
Closes#13929
Forward-port of 19cca50e7c
Underscore method _.each expects an array like object when a "length"
property is present.
This was an issue with a record having a numeric "length" field set to a
non-negative value. When changing a line the change would not appear on
blur.
This issue was fixed with 0e664c9e9 but introduced back with f0e331e00.
opw-691070
Forward-port of 5d17749ff4 which has been
forgotten during previous forward-port.
When a group of tax is nested inside another group of taxes, the tax
amount and base are wrongly calculated. It is also the case when a tax
is applied after a group of taxes.
This is because the recursive call doesn't reuse the previously
calculated tax amounts and base, but always use the same entry amounts.
The fix introduces this behavior, and moreover makes sure to include the
tax group in the base amount only if it should.
Closes#13995
When clicking on "Show older messages" in the bottom of the chatter, the
page would jump to the top when the additional messages are loaded.
There is already a functionality in a discuss channel to stay at the
previous scrolling position (related to the content) :
https://github.com/odoo/odoo/blob/ffe0db0d/addons/mail/static/src/js/client_action.js#L506-L521
This fix does the same steps for the chatter.
opw-692010
`id1`, `id2`, `rel` are deprecated now that we switched to the
new API, and are simply ignored.
Keeping them is confusing because the default names are being
used instead.
@rco-odoo: We should add a warning in the m2m constructor if these
unsupported parameters are still passed.
Consider that you have a custom one2many field based on a custom many2one
field, and that you delete the many2one field. From that point on, it is
impossible to load the registry of the corresponding database. To prevent this
from happening, we add a check before modifying or deleting custom fields.
When unreconciling a payment from an invoice, the link between
the payment and the invoice (in many2many invoice_ids)was kept
and then the invoice still appeared when clicking on the button
invoices in the payment form view.
The invoice must be removed from invoice_ids.
opw:691692
When clicking on the trash to remove a line (e.g. a sale order line
in a quotation form view) while editing another line, it produces a
traceback (in most cases), or behaves randomly (less frequently)
like removing both lines, or one of them, or maybe none of them.
Anyway, this feature doesn't work at all, so this commit simply disables
it when we are in edition mode.
In a perfect world, we would fix the feature instead of disabling it,
but the code of the list editable is so instable that it would most
certainly break something else.
Closes#13778
The dashboard instantiates an action manager for each view it contains.
When removing a view from the dashboard, the $el of its action manager
is simply removed from the DOM, unbinding all DOM event handlers
attached on it and its children, but the action manager isn't destroyed.
It means that Odoo event handlers (like core.bus.on(...)) aren't unbound.
This causes a traceback when removing a calendar view from the dashboard,
because such an Odoo handler is defined, and tries to access some
autocomplete stuff that doesn't exist anymore since the element has been
removed.
This commit ensures to destroy the action_manager.
Closes#13858
Since rev. 002660a, form views are instantiated with their fields_view.
This has an impact in FormViewDialog as the inner form view
instantiation is now asynchronous. The diagram view instantiates several
FormViewDialogs but doesn't wait for the form view to be instantiated
before accessing it, which produces a traceback.
Closes#13775
- Invoice a POS order => the invoice number is for example 0001
- Close the POS session
- Invoice another POS order => the invoice number is 0003
This is because the journal used for the POS closing entries is the same
than the journal used for the customer invoices. Therefore, the closing
entry consumes a sequence number of the invoices.
This affects POS orders, but potentially SO as well if they use the same
journal.
This is fixed in v10 from commit b5b0d36b31. In v9, we use a workaround
by looking first if a `ir.config_parameter` named
`pos.closing.journal_id` exists. We use this journal for the session
closing.
opw-691771
One of the behavioural divergences between "create or replace" view and
DROP; CREATE turns out to be that "create or replace" can only add
columns *at the end* of the view, and can not change the name or type of
the view during replacement, which can break migrations.
Reinstate the old drop;create as replacement is not necessary for this
specific view.
We support 'returns' in the POS frontend by allowing the user to
specify a negative quantity. Before this patch however, the backend
would always generate a single picking per pos.order. This is
problematic when a pos.order contains both lines with a positive and
negative quantity. The generated move lines would not all have the same
source and destination location and so could not be added to the same
picking.
This commit creates an extra 'return' picking when required and assigns
the generated moves to the correct picking.
Closes#13699Closes#13762
opw-690812
There are multiple scopes giving access to analytics api, like
https://www.googleapis.com/auth/analytics.readonly
Having a space at the end of the queried string prevents correct
scope detection; so a user who has, in fact, access will receive
a faulty error message.
Original commit 64691c7796f92ffda15f5526b83d9b8b21ca149b courtesy of Andrea Stirpe <a.stirpe@onestein.nl>
Removed action 'Open Account Dashboard Menu' from module l10n_nl.
Though it works fine on Odoo Community 10.0, that part of code causes an error when installing the module on an Enterprise installation of Odoo 10.0.
That action 'Open Account Dashboard Menu' was present in various localizations for V9.0, but since V10 it was removed from all the localization modules.
Impacted versions:
- 10.0 Enterprise
Steps to reproduce:
1. install module l10n_nl on Odoo Enterprise 10.0
Module l10n_nz was affected by the same problem.
Since commit dabf82870a, the expense sheet now creates one account.move per expense, so there is no point in grouping per journal. Moreover, the account_move_id m2o is not relevant anymore for expense sheet having more than one line. That's why it is now replaced by a button
Before the ace editor was split so that it can be used in the backend
and the frontend, the displayError function finished by:
website.error(a, b);
As website.error cannot be used in the backend, the method was changed
to return the error and the extensions of the method were in charge
of displaying it. Unfortunatly this return was done like this:
return a, b;
which is not valid javascript.
Now the method return an object with a "title" and a "message" value
instead of wrongly returning two values.
Note: this fix relies on another fix which will be forward-ported from
saas-11.
Before this patch, the debian package depends on `python-pybabel`.
According to the documentation, this is a dummy package for transition
from `python-pybabel` to `python-babel`[1].
This dummy package has thus been removed in debian stretch in favor of
`python-babel`, and the odoo package is thus not installable in debian
stretch.
To fix this, we depend directly on `python-babel`, which is available in
all debian releases[2].
Closes#13905
[1] https://packages.debian.org/jessie/python-pybabel
[2] https://packages.debian.org/jessie/python-babel
Underscore method _.each expects an array like object when a
"length" property is present.
This was an issue with a record having a numeric "length" field set
to a non-negative value.
opw-691070