There was an error message when trying to move an entire
pack that contains multiple quants saying that every component
in the pack should be in the same location. (it the case with the
bug)
It happens because after action_done only one quant of the package is moved
to the new location and other quant still in the old location. Thus the
check fail. Also the extra move for remaining was not created.
This commit changes the get_remaining_prod_quantities on pack operation
that had a migration error between old/new api. This change returns the
correct remaining quantities and thus the extra move is created and all
quants for the pack are moved to the new location.
- Create a mass mailing including a 'tel' or 'sms' link, e.g.
`<a href="tel:555-000-0000">555-000-0000</a>`
- When sent, the link is converted to a tracked linked (`http://...`)
We do not want to convert these links, they should be handled by the
browser directly.
opw-765885
- Create Products A and B, tracked by unique serial number.
- Receive some quantity of B.
- Create a BOM for A which uses 1 unit of B.
- Create a MO for 2 units of A, save and check availability.
- Click on the 'Produce' button.
- Change the suggested lot (choose a new one or create), then click on
the '+' button.
When the wizard is reloaded, the lot chosen is lost.
We reach an exception in the framework: when clicking on the '+' button,
no `create` is performed on the transient model `mrp.product.produce`,
therefore the values are not saved.
Since this use case is an exception and is likely to lead to errors, we
remove the button.
opw-761044
It is costly to compute all issues, return the full list of all issues, only to
compute the length and display it.
Use proper issue_count field.
Closes#18858
Use case to reproduce:
- Create multiple warehouse
- Select a warehouse to ressuply on a warehouse form view
- Go to the supplied warehouse form view
- Change the delivery method -> Traceback can't adapt stock.location type
This happens because there is a write method using a stock
location instead of its id.
This commit use the location id instead of location
before this commit, when a portal user edited its details, the State field was not updated on change of country_id
This was because a CSS class was missing.
We make the details template calling portal_layout as it should to get every resource we need in the rendering of details
OPW 767041
Closes#18984
When a product has multiple company taxes and b2c prices is enabled, price is
not computed properly and adds to the base price every company tax present.
This patch filters the company set on the company so taxes are computed just
for that company.
This closesodoo/doo#18840
In a multiwebsite environment, (de)activating some theme views produces
undesired results if the same view exists in different ways for different
websites.
With this patch, we search before for a website-specific view with the provided
key, and fall back to the XMLID-found one if there is no specific view.
This commit closesodoo/odoo#17970
Before this patch, if some view had both `inherit_id` and `website_id`,
its inheritances were being applied even in different websites.
After this patch, if a view inherits from another, inheritances will only apply
when both views belong to the same (or none) website.
Refactoring based on the pr #17635
This closesodoo/odoo#17635
When refunding an invoice with the option: "Cancel: create refund and reconcile",
it raised a warning: "You are trying to reconcile some entries that are already reconciled!"
because in some cases the refund is linked to several entries which match the same
account of the invoice. So it tried to reconcile several times the same entries.
opw:765673
When starting the HTML editor, the first view that is shown is supposed
to be the main one of the page by default. This was not the case for
custom pages as the 'xml_id' of the page was considered instead of its
'key' value.
- Create a product with attachment, and name the attachment 'テスト'
- Purchase the product, make a payment, validate and pay the invoice
- Go to My Orders under My Account, open the order, and try to download
the file 'テスト'.
An error 500 is raised due to a UnicodeEncodeError.
```
File "/home/nim/src/odoo/addons/website_sale_digital/controllers/main.py", line 104, in download_attachment
return http.send_file(data, filename=attachment['name'], as_attachment=True)
File "/home/nim/src/odoo/odoo/http.py", line 1595, in send_file
headers.add('Content-Disposition', 'attachment', filename=filename)
File "/usr/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 1093, in add
_value = _options_header_vkw(_value, kw)
File "/usr/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 830, in _options_header_vkw
for k, v in kw.items()))
File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 212, in dump_options_header
segments.append('%s=%s' % (key, quote_header_value(value)))
File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 165, in quote_header_value
value = str(value)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
```
opw-766568
The inventory adjustment form is not suitable for large inventories.
First, a list view embedded in a form view is not convenient since it
doesn't provide any search capabilities. The user has to rely on the
search feature of the browser, which has restricted features in
comparison to the Odoo search field.
Then, the existing onchange mechanism coupled with computed fields
triggers heavy computations impacting all lines each time a single
line is modified. This leads to a hanging page for every inventory line
modification, which causes a non-negligeable loss of time.
This commit introduces a new tree view for inventory lines, accessible
thanks to a stat button on the inventory page. This button is available
in debug mode, if the inventory is in state 'Confirmed'. The tree view
contains the same fields than the tree view embedded in the form view,
without the flaws of the latter.
opw-760614
Fixes commit https://github.com/odoo/odoo/commit/02c748be59ac8abc44c945218587e7b8a8e06a28:
Blog content field should not have been marked for any sanitization at
all as it is a field whose content is editable only by users through the
website editor. Any content should be authorized there. In particular,
some snippets contain form elements (like <input/> tags) which are
never accepted during sanitization.
opw-752458
To reproduce:
- Buy a product costing 0.01
- Validate the cart, pay with Stripe
- Enter the credit card info, validate
Stripe cannot process the transaction (minimum charge is not met), but
the user is not warned about it. The Stripe pop-up is closed and the
error is recorded in the console silently.
opw-765775
Purpose
=======
Currently an employee can
- Create mail.followers
- Write on mail.follower if it is related to his own partner
When creating a record with followers (example: An expense sheet), the followers are created but the function fields are recomputed and stored on the table (if store=True).
In that particular case (Create: ok, Write: ko), this recomputation will trigger a write and then an access right error with a transaction rollback.
Specification
=============
Adding the `compute_sudo=True` attribute on the `res_model` field, the recomputation will be allowed for users at the record creation.
This fix doesn't imply to update the modules.
If a google application has no client_id or client_secret during the update
process (e.g. was configured but the API keys have been removed and the tokens
have expired), the method will crash.
Instead of continuously try and produce a traceback, return a proper error message
Closes#18613Closes#18614
Before this commit there were two issues:
- The date "from and to" set in the wizard weren't working, as in not used at all
- The lines in the report did not have a date range, making the understanding of the report difficult
after this commit, only the budget lines which dates overlap at least one day of the report's dates will be selected.
Also, the first line of the report, containing the budget name also contains the dates on which it applies
OPW 743441
Closes#18737
Backport of 0280354045
Original message:
The previous trigger would recompute all sessions of a config when modifying
the cash_control flag on the config.
It was not possible to enable cash_control if a previous session wasn't in
cash control mode.
Recompute only when changing the config
OPW 761025
Closes#18814
1. Set the Decimal Accuracy of "Product Unit of Measure" to 7.
2. Create a UoM: T-LBS which is the reference for weight and has a
precision of 0.01
3. Deactivate KG (which was the previous reference for weight)
4. Create a UoM: T-GT which is BIGGER, with a ratio of 2240.00 and a
precision of 0.0000001 (necessary to avoid rounding errors)
5. Set the Product Unit of Measure Decimal Accuracy to 6 digits.
6. Create a Product T-TEST with T-LBS as the UoM ans Tracking as LOTS
7. Create a PO for 60 T-GT
8. Observe a Receipt created for 134,400.0000000 T-LBS
9. Receive 42760 by using LOT SPLIT button, and creating a LOT to hold
this amount.
10. Click VALIDATE.
11. Click CREATE BACKORDER.
The backorder is created for 91640.01 instead of 91640.00.
When the backorder is created, we should make sure to use the same
rounding method that was used to compute `product_uom_qty`, in this case
'HALF-UP'.
opw-753116
To reproduce:
- Create department 'Art' parent Department 'Management'
- Create job position and set department 'Art' & publish
- Allow 'Filter by department' from the frontend page
- As a public user, open job => Access Forbidden
The record rule should be adapted to allow accessing departments which
have children.
Actually, the rule could probably be removed since the controller
already lists only the necessary departments.
opw-765736
Currently when importing files, the parent left and right are recomputed on each record creation/update, which could lead to a lot a request.
This commit will defer the parent field recomputation to the end on the `load` function by recomputing the values from the MPTT and inserting directly the new values on the records.
Tested on a customer instance, this will reduce the execution time when importing a thousand stock.location from 15 minutes to several seconds.
1. Create an attribute with create_variant boolean un-ticked (ie. don't
create variants from these attributes). For example 'Test Attribute'
2. Create attribute values related to the above attribute. For example
'Test 1', 'Test 2', etc
3. Create a product (product.template) and assign an attribute (eg.
Color: black and white)
4. On one of the product variants, add one of the attribute values for
the attribute we've created in step 2 to the attribute_value_ids
field to allow for filtering by product attributes that do not create
variants.
5. Go back to product template and add another attribute value to an
attribute where create_variant is True (eg. Memory: 16 GB)
6. Our value from attribute_value_ids is gone, and the product has been
deactivated
When attributes are set with create_variant is False, they are
obviously not used to create variants. Therefore, when we are looking
for existing variants, we should filter out these attributes.
Partially closes#18682
opw-762743