- Set FIFO as costing method in product category
- Create a stockable product with the category configured previously
- Create a SO with the stockable product for 1 unit with dropship route
and confirm the SO
- Confirm the PO created from the Sale Order to generate the delivery
- Process the stock picking
- Create a new Landed Cost with the stock picking delivered with a cost
line with split method "Equal".
- Generate the valuation adjustments and confirm the landed cost to
generate the journal entry
The debit account is wrong because the system takes the inventory
valuation account instead the expense account.
Odoo must take the expense account because the product never enter to
the company inventory, so is a cost of sale.
opw-1922633
closesodoo/odoo#29947
Detected with OPW 1920765
Reproduce : set multi-companies, install accounting. The due amount for all companies is the sum of the due amount for every single company
Cause : the context for company_id is not set in account.move.line:_query_get
Solution : set it in res.partner:_credit_debit_get in case _query_get is used elsewhere
closesodoo/odoo#30463
Go to 'delivery methods', edit a delivery method.
Click on 'install more providers'.
You land on the 'Apps' app, already filtered on the 'delivery_' modules.
Click on 'more info' of a module: nothing happens.
It should open the form view of the module.
What happens is that the action doesn't contain 'form',
so the framework fails to open the form view from the kanban view.
opw 1928711
closesodoo/odoo#30437
- Create a product where the associated product category has Costing
Method "Average Cost (AVCO)"
- Create a PO. Order:
2 units at 40
4 units at 35
- Receive the picking
The cost of the product is set at 35 (or 40, depending on the order of
the lines in the PO).
Since we are in a situation where the available quantity is zero, we
enter in the `if float_is_zero...` condition, where the `qty_done` is
not set.
We should set it in all cases.
opw-1907328
closesodoo/odoo#30422
Before this commit, when the journal entry date was duplicated, the
maturity date (in the journal entry lines) stayed unchanged (it kept the
values of the original journal) and the user wasn't able to modify it.
Now, when the user duplicated a journal entry, the user can modify the
maturity date.
Note that, as is the case for the journal entry date, the maturity date
can't be modified after saving the journal entry.
OPW-1914706
closesodoo/odoo#30393
- Create a Public Pricelist without discounts
- Create a pricelist with a discount for all products, with 'Discount
Policy' set to 'Show public price & discount to the customer'
- Assign the discount pricelist to the administrator partner
- Go to the eCommerce as public user (or any user with the Public
Pricelist as default)
- Add a product to the Wishlist
- Go to the Wishlist
The discount of the admin pricelist is shown.
This is because the `product.wishlist` is browsed as superuser and the
computed field `price_new` depends on the user (ultimately through
`_website_price`)
opw-1912726
closesodoo/odoo#30358
Create a sale order. Confirm it. Add a new line. Change the UoM on this line.
The onchange is applied, modifying the unit price.
Save: the saved product UoM is the default one.
So for example if the user changes the UoM from day to hours,
he will sell one day for the price of one hour.
This is because the field product_uom is set to read_only if the state of the
sale order is confirmed ('sale') (as well as if the state is 'done' or 'cancel')
However it is still possible to change it when adding a new line.
opw 1923534
closesodoo/odoo#30420
ea6e7379a3 removed the few intersphinx
refs to sqlalchemy & django, so these mappings have not been necessary
in a year. This is especially annoying as the currently configured
sqlalchemy mapping has been very flaky / regularly failing.
Remove the mappings entirely.
closesodoo/odoo#30397
Some sips provider don't use 2 as key_version.
E.g. mercanet uses '1' as production key.
Now we allow to override it in Ir Config Parameter for stable version.
Todo:
Need to make it customizable by end user into the configuration of acquirer.
Courtesy of BEK for reporting
opw-1916316
closesodoo/odoo#30185
Previous to this commit, if one were to create an ir.model.field with a
poorly constructed domain (read: SyntaxError), the server would properly
send an error message stating that an Error occurred, however this would
be too late as the registry with the bad code would have already been
reloaded, this meant that the registry would be left in an unstable
state (read: crashed).
With this commit, a constraint on the domain is added so that we confirm
that the code in the domain field is properly constructed, thus no need
to reload the registry and therefore no crash.
closesodoo/odoo#30157
Before this rev., a crash might occur when the user quickly
switched twice between pages (e.g. go to page 2, then page 3) on a
slow network.
In the given example, when data of page 2 returned, the list was
re-rendered. Unfortunately, the offset of that list' datapoint was
already changed due to the switch to page 3, meaning that the view
tried to render a page that wasn't loaded yet, leading to a crash
if there were modifiers to evaluate, or to empty records being
displayed.
This rev. ensures that the view is rendered with the data of the
page it expects.
closesodoo/odoo#30150
On the PO form view, change the order_lines inline view:
- the tree becomes not editable
- allowed modes are tree,form
Add a new order line, the form view of order_lines opens up
Modify some stuff, then save and new
Before this commit, it crashed because some fields were expected in the tree view
that were not defaulted in the form view by the JS framework.
After this commit, this flow doesn't crash because we make sure every field
in the tree view is present in the form view
OPW 1917111
closesodoo/odoo#30219
test_web_planner throws errors like this on some environments:
AssertionError:
'/web#action=135&view_type=list' != '/web#view_type=list&action=135'
the urls in web_planner are created with a dict for the parameters to
create the urls. dicts are unorderd up to python 3.5. (see
https://www.python.org/dev/peps/pep-0468/)
As the urls /web#action=135&view_type=list and
/web#view_type=list&action=135 are equivalent we now test if the
parameters are the equal in the url regardless of their order.
closesodoo/odoo#30138
Since multi-website, we COW (copy on write) views when editing a view on a
website.
This is causing 2 issues related to module install/update:
1. During a module install, when creating an inherited view, it will create
that view as expected on the generic tree.
But that generic tree may not be used on website(s). Indeed, if the view
was edited, we are now using a copy of the view instead of the original
XML view (with an xml_id).
That copied view won't get the new inherited view in its view tree.
Now, we correctly copy the new view under every specific view tree (if
exists).
2. During a module update, when updating a view, it will only update the view
having the xml_id, so the generic one.
But most of the time, the generic view is not used as it was usually COW'd
and the specific view now replace the generic one.
Now, we also apply the update on the COW'd view. Note that only unmodified
field will be updated, this behavior basically mimic the noupdate behavior
on view's ir.model.data.
Step to reproduce for bug 1:
- Install website_sale module
- Go to a product page and then enter edit mode
- Make a modification to trigger COW, eg edit the information area under the
price "30-day money-back guarantee".
- Now install website_sale_comparison module
- The product page won't have the comparison button as the comparison view
inheriting the product view was created on the generic tree and not copied
on the specific tree (COW'd before the comparison module install).
Step to reproduce for bug 2:
- Repeat first 3 steps of bug 1
- Now make a modification in a view from the XML file in
website_sale_comparison module and update the module
- Only the view with the xml_id is updated, not it's COW'd views. This mean
that only the generic view is updated and not the specific one(s) really
used on the website.
task-1920487
closesodoo/odoo#29956
- Create manually an account.payment after having created manually some journals
(without installing a coa).
- Install a module containing a coa and calling try_loading_for_current_company or depending
of other module doing such things.
=> Crash because company.chart_template_id is not set.
-opw: 1921711
closesodoo/odoo#30117
Start on the modal obtained by a "search more". The offset is never reset.
So suppose you are on page 2, looking at record 81-160.
Do a research that gives less than 80 records.
The result of the search is nothing, since is has been done with a 80 offset.
It should be reset to 0 when we do a new search.
opw 1920826
closesodoo/odoo#30109
Create an automated action that creates a new record (of target crud_model_id).
Try using a link_field_id: nothing appears to be selectable, even if some fields
satisfy the intended conditions.
The issue is that the crud_model_name field was related to crud_model_id.name,
instead of the correct crud_model_id.model (note the apt naming).
Note that in the onchange the value of crud_model_name was correctly set to
crud_model_id.model, adding to the confusion.
opw 1910671
closesodoo/odoo#30145
Before this commit, a generic view tree could be valid but impossible to copy
on a COW specific tree.
This was because when looping through inherit_children_ids to copy them, they
would be sorted by the ir.ui.view sort order (name, priority, id).
Indeed, when applying view inheritance and reading a view arch, children are
sorted by (priority, id).
Thus, if sorting the children by (name, priority, id) was different than
sorting by (priority, id) and the children view would conflict in that new
order, the COW would raise an error "can't find DOM element"
Step to reproduce:
- Create a parent view with just a DIV in arch
- Add a child view that add something inside that DIV
- Add another child view with a name alphabetically lower than the other
child and that replace the DIV by something else, like a SECTION
- Everything works as expected, when reading the parent view arch, the first
child is inserting something into the DIV and then the second is replacing
the DIV
- Now try to trigger the COW on the parent view by writing something on it in
a website context
- It will crash as the child views will be copied in another order, sorted
firstly by name.
- Indeed, when reading parent view, the second child will be copied first as
it's name is lower than the first, it will then replace the DIV by a SPAN.
When trying to copy the other child view that is supposed to insert
something into the DIV, the DIV will not be found and it will crash.
When using the 'Auto-Complete' feature of a vendor bill, oldest vendor
bills are suggested first.
This is because the `_order` uses the `vendor_bill_id` and the
`purchase_order_id`. In the view, we have a mix of positive, negative
and null ids, therefore this can't work.
We sort on the date and the name instead, which gives a more reliable
result.
opw-1925910
closesodoo/odoo#30299
To reflect the latest accounts and taxes
Update nl.po files to help translators
A future commit will translate the missing entries
closesodoo/odoo#30297
In the background layout footer, it happens that the content is over a
zone that must stay blank. That's why w've added a left-padding to the
footer.
OPW-1928366
closesodoo/odoo#30296
The field `sale_order_template_id` is only defined on `sale_management`, so
calling that method without `sale_management` would crash (traceback).
The method was in `sale_management` in the first place but commit
34c47eecd3 happened and some mistakes were made
that day.
PR: #30000closesodoo/odoo#30294
Before this commit, changing the value of the HOST variable didn't work because
it wasn't correctly used everywhere.
Moreover, the `web.base.url` was not correctly set: it is set during
authenticate, but when calling it from the console instead of from a request,
which is the case for tests, it is not able to grab and set the URL as needed.
PR: #30000
opw-1920083
Before this commit, an error arrived when creating a customer profile
without email.
Now, if the email don't exists we send an empty string to Authorize.
closesodoo/odoo#30075
Before this fix, if 2 or more sale lines have the same product with different
lot-numbers the amount for each move will be set to the total amount of the
product.
This fix resolves this problem and will only count the amount sold of
each lot.
Resolves https://github.com/odoo/odoo/issues/30006closesodoo/odoo#30019
On small screens, when we click on the overview of a task
inside the "project" app, the displayed table doesn't fit the screen.
This commit only add missing parent "div.table-responsive" to add
responsive support.
A better fix has been merged in master, see:
https://github.com/odoo/odoo/commit/dc017d17e9170d3fc0a5104ab9dc84f748bc097a
opw-1907877
closesodoo/odoo#29971
- Create a SO with a stockable product, validate
- On the corresponding picking, change the partner
- Print the 'Picking Operations' or 'Delivery Slip'
The partner printed is the partner of the SO, not of the picking.
This was reported many times in the past, and is quite confusing. It
happens because the partner on the `stock.move` remains the partner set
on the SO.
We shouldn't change the reports, nor automatically propagate the change
since it might cause issues, e.g. in case on dropshipping or manual
creation of the picking.
Therefore, we add an action which allows to set the partner on the stock
move manually.
opw-1917851
closesodoo/odoo#29939
opw-1917605
Before this commit, when accounting is set to global rounding, the base
amount per tax is not correctly calculated.
Now, the Base amount per tax is calculated adding the rounded lines.
To test this issue, you need to set to global rounding and create a
customer invoice with the following lines :
line 1 = Qty:40; unit price:2.27; tax:15%; discount: 10%
line 2 = Qty:21; unit price:2.77; tax:15%; discount: 10%
line 3 = Qty:21; unit price:2.77; tax:15%; discount: 10%
When the invoce is printed, you would notice that the amount is 186.43
and it should be 186.42.
closesodoo/odoo#30021
The eCommerce sometimes animates product images when they are put in
the cart / wishlist / comparison panel. Those animations did not work
on Firefox and IE and made strange scrollbars appear instead.