Steps to reproduce:
- Create a stockable product P with 2 quantity on hand
- Choose a delivery order in state 'done', unlock it and add a line with P
- Try to set 2 as done quantity and confirm the wizard
Bug:
A ZeroDivisionError(float division by zero) was raised.
opw:1886735
closesodoo/odoo#27547
Before this commit, when the names and values of the attributes on an optional
product were too long (and it did not take that much)
The display was broken into lines
After this commit, the container of the attributes works in standalone and won't break
but, on very small devices, it is not ideal either
OPW 1888416
closesodoo/odoo#27279
In the current code, we only show a PDF previewer if a PDF is already
saved. When the PDF is changed we see the preview if it was previously
saved also.
This seems to be the expected behavior, but this changeset changes it so
we could always show a preview.
opw-1888399
closes#27393
- Install hr_expense and stock.
- Add enough products which can be expensed so that a 'Search More...'
option is proposed.
- Restrict the rights of a user U to 'Employee' only.
- As U, create an expense, and click on the 'Search More...' option when
choosing the product
An AccessError is raised on `stock.move`.
The error is due to fields `qty_available` and `virtual_quantity`.
These fields are not necessary in that context, so we define a specific
tree view for this use case.
opw-1891399
closesodoo/odoo#27561
- Create the following pricelist for product A:
4 Units: 2.88
3 Units: 3.45
2 Units: 4.85
1 Units: 7.50
- In the POS, click several time on A to add in the cart
The 2 first units are merged in a single line, but from the third one a
new line is created.
This is because of the float reproesentation of 4.85, which becomes
4.8500000000000005.
opw-1887586
closesodoo/odoo#27539
Suppose user A creates a sale order S in company X. He then changes to company Y
Sales manager B, in company X, creates the invoice for sale order S.
Bug: the compilation of the report fails because of the user.name in the
template. Then the tracking update fails, making it impossible to validate the
invoice.
opw 1884915
In the invoice form view, remove the editable attribute on the invoice line tree
Create an invoice, click add an item in the invoice_line_ids field
Before this commit there was a crash because the tree view contains analytic_tag_ids
but the invoice line form doesn't
After this commit, there is no crash and the invoice line form works as exepected
OPW 1889107
closesodoo/odoo#27382
- From the accounting dashboard, click on the 'Reconcile' button of a
bank journal
- Click on the 'Bank reconciliation' text at the top left
- Click on the 'OK' button that just appears
A traceback occurs.
This event is used to change the name of the statement, when clicking on
'Reconcile' from a bank statemet. In this case, it shouldn't do
anything.
opw-1883308
closesodoo/odoo#27359
Usecase to reproduce:
- Archive a stockable product with quantity on hand
- Start an inventory with all products.
-> Archived product is displayed
It happens because the search is an SQL request that is build
and it thus does not benefits from the automatic search on active
objects.
This commit add an active search on quant for inventory lines.
Fixes#27302closesodoo/odoo#27384
- Create a SO from an opportunity, keep the status draft
=> the 'Quote(s)' number is 1 on the opportunity
- Confirm the SO
The 'Quote(s)' number is 0 on the opportunity, but when clicking on the
stat button 1 quote is displayed.
The `search_default_draft` (and the `search_default_sales` of the Orders
stat button) are not working since the action doesn't use the
appropriate search view.
opw-1888442
Steps to reproduce the bug:
- Create three stockable products: Kit, C1 and C2
- Create a phantom BOM for Kit with C1 and C2 as components
- Set the invoicing policy of the kit based on delivered qty
- Create an SO for the kit and validate it
- On the delivery order, just deliver C1 and create a backorder for C2
- Cancel the backorder and duplicate it
- Deliver the duplicated backorder and validate it
Bug:
The delivered qty on the SO line has not been updated to 1.
opw:1886315
- Create the following products in FIFO costing method and real-time
valuation:
Prod Final (F); Invoiced on Delivered Quantity
Prod Comp1 (C1); Cost = 20
Prod Comp2 (C2); Cost = 10
- Create the BOM Kit for F:
2 Unit(s) of C1
1 Unit(s) of C2
- Create a SO for 3 Unit(s) of F
- Validate SO and picking
- Create the invoice and validate
The price unit taken into account for F in the anglo-saxon accounting
entry is:
20 + 10 = 30
=> entry in Stock Output Account is 3 * 30 = 90
while it should be:
(2 * 20) + (1 * 10) = 50
=> entry in Stock Output Account is 3 * 50 = 150
This should finally fix issues corrected with:
9a7ed7c: price unit multiplied by the qty sold (*)
f1fdb97: price unit taking into account only 1 unit of each
component
(*) In the use case solved, the price unit was:
(6 * 20) + (3 * 10) = 150
=> entry in Stock Output Account is 3 * 150 = 450
opw:1886216
Two account had the same account code. Because of that, one of them always failed to be created and logged a psql error. To fix that, we totally remove this account, as it never got created anyway.
Making a bank account reconcilable is a very common mistake, and leads to confusing and useless data (the move lines made on this account) to be displayed in the reconciliation widget. With this commit, we make sure the user cannot make this mistake anymore.
In A/B testing mode, a given recipient will only ever receive a single
email from a given mass-mailing campaign, no matter how many mailings
were sent to them.
This is useful for A/B-testing various mailings in order to check their
results. But is very difficult to understand for users who simply want
to organize their mailings into campaigns.
Additionally, the A/B testing option is hidden as a technical feature, so
it is hard to discover in order to troubleshoot unexpected number of
emails sent by a given mailing.
It will be safer to keep it off by default.
(keeping the parameter explicit, to better show that it is on purpose)
This partially reverts dee5c31264
Fix on sale_coupon (enterprise) https://github.com/odoo/enterprise/pull/2224 needs this change to be able to merge
SO lines when a program generates multiple discount lines on different taxes.
Closes#24971
task-1866977
task-1832967
task-1857843
When sorting by a many2many fields (e.g. partner_ids) with one of the record
having an empty value on the sorted field, the comparison method used to compare
and empty record (e.g. res.partner()) and a name_get result (e.g. "Agrolait").
This is because the sort_field was initialized with the result of self[field]
but never assigned a new value below.
Fallback on an empty string when no record is found
Fixes#26908