When enabling the unit of measures, it was not possible to save a move
line as product_uom_id is required in the model and readonly in the
view. We add the "force_save" attribute.
Courtesy of @lap-odoo
In the FieldSelector, after clearing the chain and closing the popover,
the very first page was removed from the widget `pages`. This was causing
issue when trying to select a new field again.
This commit ensures that the first page is not sliced.
Previous to this commit, when importing a studio module with unmet
dependencies that were not studio the error message would just display
the Studio is required to install Studio customizations.
With this commit it should now correctly display the missing
dependencies by checking if only web_studio is in the set of unmet
dependencies
opw-777642
qsm:
This is because of multiple animations during edition (which is not
occuring afterwards). This is not supported, but as it does not break
anything, it can be kept as it is. However, we cannot access the
animation via 'snippet-view' anymore, which is fine as I am about to
deprecate it in master.
trans_export has been decided to use a *bytes* output buffer as some of
the output formats are text-ish (e.g. po) but others are definitely
binary content (e.g. XML). Therefore, when calling trans_export with a
*file*, it needs to be open in *binary mode*.
Fixes#20555
Before this, if a new global was added to JS code (module toplevel,
function bodies are not considered) it would blow up when attempting
to resolve variable refs & uses.
Make the toplevel scope a defaultdict such that if e.g. a "foo" is
looked up in a module but not a local variable of that module it's
assumed to be an UnknownNS object (from which further UnknownNS can be
deref'd).
When a lot is quick created, we don't want to be able to select a
product different than the one passed as default. So we have defined
where the product_id is readonly, and we still use the old view when a
lot is created from the menuitem lot.
Before the website refactoring, snippet animations were cleaned thanks
to the `stop` method. As those animations are now extensions of the
standard `Widget` class, the `stop` method was replaced by the standard
`destroy` method. This was tweaked so that the $el is not removed from
the DOM, but with proper cleaning of events. However, this changed the
way the `stop` method content has to be called. Indeed, we should be
allowed to call the `_super` method and then use the $el variable.
add missing string labels
rephrase the error message
add missing _description
removed forward-ported hr_equipment.pot
was unclear, courtesy of the translators
When creating a new company the system will generate a
new warehouse, its location and its routes.
However the default company is the company that the user is
using.
For example user is in company_1 and creates company_2 it will create:
'company_2: Receipt in 1 step' and the company_id on it will be company_1
This commit completes the dict for create routes in order to introduce
the key for company_id instead of using default value.
Use case to reproduce the bug:
- Enable multi company and create a second one.
- Add both company to another user and give him stock manager rights
- Login on the second user and select as active the created company
- Go to product and create one
-> access right error on stock.location.route message.
It happens because the routes 'buy' is selected by default.
However the route buy when created use the default company
although it's generic for all companies.
This commit change the data in order to remove the company on
routes buy, mto, manufacture and drop_shipping. Since this commit
was released after v11 release, it could happens that already created
database still have the problem thus the solution is to remove
manually the company on the routes quoted above.
opw-777718
Before this commit, if comments were found inside the body of a mail
template sent through mass_mailing, the regex in append_content_to_html
that converts possible uppercase tags to lowercase tags would replace
comments by broken html elements, this would break the in-browser parser
and thus would show partial content or no content at all, depending on
the positioning of the comments.
i.e. from <!-- This is a comment --> to <this -->
The regex in question is r'(</?)\W*(\w+)([ >])' which basically matches
opening and closing tags (this was a bad idea from the beginning btw),
the \W* will match any non-alphanumeric chars (so !-- in the
case of comments) and this would be completely discarded since it's not
a match group and when replacing we only use match groups.
This is fixed by simply stripping the \W* since it's discarded anyway,
an alternative fix would be to put it in a match group and add it when
replacing as well, but I don't know if we purposefully discard it or
not.
Neither fix is the good one, the good fix is to replace all the re.subs
by lxml which is much easier and more concise.
When an onchange fails (for example, because the onchange python code
raised a ValidationError, it is convenient to revert the form view to a
valid state, which is the previous state.
To do that, we keep in the _applyChange function the initial state, and
restore it in the case the onchange fails.
- When paying with stripe an error occurs because of a callback generating the invoice for the SO which is called now automatically by the payment system
- Before this patch, stripe doesn't get displayed.
It was a bug related to the fact that stripe doesn't respect how the generic payment form works.
So to make it work, we were relying on small hacks that got broke by changes on the payment form.
To fix the bug we are no longer adding an event to the pay button of the payment form, instead
we listen all the changes made to the DOM and detect if a form with an attribute 'provider' set to
'stripe' is added.
If so, we open up the Stripe payment form.
- Fix ACL issue when trying to pay with Stripe on eCommerce without being logged.
Closes#20202
opw-776200
A recent fix in web changed the field FieldImage to make sure it also
loads a __last_update field. This is fine, except that a test in
enterprise (web_clearbit_tests) was using a field image, and failed
because it could not find the __last_update field in the demo data.
With this commit, we make sure that the mock server is always aware of
the __last_update field.
'Invoice sent' custom notification was added to the invoice when user
send it by email. This is not necessary as the invoice email should
be displayed in the chatter. This commit also cleans the mail composer
override because context keys were added in a strange way.
Redirections are not correctly computed when the error or success urls
already contain some query parameters, like the access token. We now
use a function added in portal module that correctly computed the
redirection using standard werkzeug methods.
Before this commit, you was able to double click on the button when
are in registration flow. In this case, you subscribe 2 times and so
take 2x more seats, what can be annoying when you have a limited room.
In the same time, we fix the form in the form that generate
strange behaviour like some events not bubbled correctly.
The attendee form (into the modal) was inside the registration form.
$'attendee_form).on('submit') obviously failed due to this bad dom.
This commit closes opw-778191
Since Odoo 8.0,
the default stock input account for product categories
in the Canadian localization is set to
`214100 CANADA REVENUE AGENCY`
This is the case since this commit:
https://github.com/odoo/odoo/commit/13dacd11c10dac853def763432829b8976604a7d#diff-2e65e26a4efc4ab95e72dbe2033141ecL294
In which the account with the XML ID 2141_en
214100 Stock Received But Not Billed
has been renamed
214100 CANADA REVENUE AGENCY
In this very same commit, the account "Stock Received But Not Billed" has been moved to the account 217100,
under the XML ID chart2171_en:
https://github.com/odoo/odoo/commit/13dacd11c10dac853def763432829b8976604a7d#diff-2e65e26a4efc4ab95e72dbe2033141ecR447
While the default value for the products categories stock input account remained the same, the account with as code 2141:
https://github.com/odoo/odoo/blob/8.0/addons/l10n_ca/account_chart_template_en.xml#L8
This is an oversight. It was not meant that way. The default stock input account for products
should well be "Stock Received But Not Billed".
In addition, a stock account is supposed to be of type assets, and not of type liabilities.
I contacted @max3903, who was a contributor of the l10n_ca localization,
and who is therefore a better expert than me regarding the Canadian localization.
He confirmed me all the above findings.
opw-775413
When having a product with included taxes that are changed/removed with
a fiscal position, the price changes depending on if the pricelist's
discount_policy is with_discount or without_discount.
This commit aligns the without_discount behavior to the with_discount
behavior.
Note: the behaviour isn't 100% correct. The applied discount will be
computed on the list_price, instead of the tax excluded
list_price. If a price_surcharge is set, it will be wrong.
Supplements https://github.com/odoo/odoo/commit/0d56dca
When basing a pricelist on another pricelist in different currency
conversion was not being made correctly, since commit https://github.com/odoo/odoo/commit/6b3a808
that changes the pricelist_item on which the currency_id is set in
_get_real_price_currency.
Also align the _get_display_price's base_price to the
_onchange_discount's new_list_price in the case where the pricelist
depends on other pricelists that are in without_discount mode as well.
When clicking on WH/OUT in a SO as portal user in My Account on the website,
it raised an 500 error if the product in the SO is not published on the website.
opw:777708
Python 3 (before 3.6) is affected by outstanding issue 24291:
https://bugs.python.org/issue24291
In Python 3.6 the issue is gone thanks to this patch:
https://bugs.python.org/issue26721
The base StreamRequestHandler class does not properly deal with raw IO
output streams. This affects most HTTP servers that use it, including
werkzeug. It causes large HTTP responses to be truncated when the
output socket is unbuffered and in non-blocking mode.
This is the case in multi-process mode (workers > 0) due to the socket
timeout configured to avoid worker deadlocks.
Typically, large file downloads (2MB+) and large JSON responses will be
truncated and cause corrupted files or errors on the client side.
As a workaround, we turn on the buffering on the output stream by
default in multi-process mode (it is already turned on for the input
stream) when running on Python 3.5.
See also the socket.makefile() method and the docstring of
`socketserver.StreamRequestHandler` at
https://github.com/python/cpython/blob/dcb101e7f078f12fc3d2bf1730410798a880bfe3/Lib/socketserver.py#L707Fixes#20158
opw-777120
Before this commit, trying to pay a sale order from portal would throw an
error
* create an order in back end, set a partner, a product, a quotation
template and 'Online Payment' as Confirmation Mode;
* confirm the order;
* go to the order in portal (/quote/XX) and click on 'Pay Now';
It throws a server error because route is being called with unexpected
keyword arguments like success_url, error_url, callback_method.