The price suggested thanks to the "Compute from BoM" button only takes
into account the price of the products listed in the BoM lines.
In v9, there was a "Recursive" option that provided the possibility to
compute the prices of all products implied in the BoM, recursively. This
option has been removed since it was leading to a "black box" behavior
that was unclear to the users.
However, limiting the price computation to the BoM lines only is too
restrictive since it doesn't even take into account the phantom BoMs.
By using the `explode` method, we have access to:
- all products not manufactured
- all products manufactured which are not kits (phantom BoM)
It means that the cost of manufactured products (not kits) should still
be computed before the product itself.
opw-697866
When a product template UoM is different from its BoM UoM, the price
suggested thanks to the "Compute from BoM" is incorrect, since it doesn't
apply the conversion rate between the product template UoM and the BoM UoM.
This is because we try to fetch the product UoM through the BoM. However,
if the BoM is not specific to a product.product, the field bom.product_id
is empty.
The issue is introduced by revision
d465346f1e
Raphaël actually meant
`res_ids = data.mapped('res_id')`
Indeed, there is no `res_ids` field on `ir.model.data`,
but there is a `res_id`.
In addition, the same code is written correctly in the method
just above this one, `_object_find`
opw-704592
In 07bf7bf4f3 a fix was introduced for windows server UTC timezone.
It is possible it would be helpful in some situation to also have it in
setup/odoo (for example if odoo was installed on windows in some other
way than the Installation bundle).
opw-693764
Invoices created automatically by the payment acquirer must use the
correct accounts/journals, which may not always be the case if not
explicitly set in the context.
In the worst case, user is not logged in and he will really have no access and
will have a perm read error after login. We cannot check if an unknow user has
access or not.
In most cases, user will be logged in and will see the document directly if
he has access or will be redirected to messaging if no access.
In the best case, he will be redirected to login page before to see the message.
task-22505
The forward-port of the above revision missed
the conversion to the new api and that
`context` had to be replaced by `self.env.context`
Fixes#14922Closes#14923
In the Lead Automation module, the module is working as expected when
the activity type is 'Email'. In other cases, the corresponding methods
are not implemented and raise an error.
opw-697829
According to the routes set on the products of the raw materials, a
procurement may have to be created for the consumed lines of the MO.
A route may also be set on a product category. Before this patch, we
only look for procurement rules for the routes defined on the products
and on its category, ignoring the inherited route of the parent category.
Fortunetaly, we have a computed field on the product model returning
all the routes from the current category, so we use this one in the
search for procurement rules.
A test has been added to show the failure.
Before, when the routing of a production order was empty (no operations),
it got into an inconsistent state (you click on "plan" and nothing happens).
Empty routings were used before to do subcontracting or 2-steps inventeory
(we did not set any operations on the routing but we set a location).
Here, we change the related routing field on the production order into a
calculated field which becomes empty when the routing has no operations.
This way, the "produce" button is displayed (as for production orders
without routing) and working/
This is a temporary patch to workaround the issuein a stable release.
In master, we might remove the location on routing and place it on the
workcenters and put a constraint that does not allow an empty routing.
Revision 20935462a0
introduces the below regression:
When registering a payment on a customer invoice refund
or a vendor bill, with a payment difference
e.g. payment of 101 for an invoice of 100
and marking the invoice as fully paid,
the counter part in the payment account move
were wrongly computed:
In those cases,
its the payment total minus the invoice residual total
that must be performed, and not the other way around.
This revision solves this, inspired on how
the payment difference is computed for display
in the wizard on how it was before the above revision,
in the method `_compute_payment_difference`
Fixes#15000
Before this patch, the inventory was automatically posted when you click
on "done" on the last planned work order. This behavior was preventing
the user from correcting, for example, the consumed quantity on the raw
materials move on the manufacturing order if it was different from the
theoretical quantity. Note that finishing anyone but the last work order
still let you edit the consumed quantity. Same with changing the lot.
Now you have to click on "mark as done" on the manufacturing order to
post the inventory. Note that this is the same behavior when working
without work order (produce > mark as done will post).
We adapt the tests to reflect this change.
In some case (for example the one solved with b51d21c5) we can have
write done on a field text in read only mode.
With 98ed53ce if :
- such a case happened (in b51d21c5 the fix only worked after the given
field was written one time) or a similar instance,
- and the user was in debug mode,
- and the widget used was TextFieldHtmlSimple
this could lead to an issue with the code trying to toggle the code view
mode whilst the editor is closed.
When doing pivot table data visualization, the Unit Cost of several
lines are summed up but there has more meaning if they were averaged.
This will probably still not be perfect (such as averaging two line
with different quantities the quantities would not be taken into
accounts) but it is already slightly better.
opw-694068
Suppose the following usecase: you scan the first product of the
picking. A server onchange is then triggered. You scan the same product
a second time, before the first onchange has returned. You expect that
the first onchange is completely executed before running the second one.
This was not the case. Moreover, some onchanges were not be able to
work with the invalid state of the formview at some times, and crashed.
The previous implementation was wrong because id didn't run the main
barcode processing mechanism inside a Mutex. It was also wrong because
it didn't correctly wait for the onchange to execute (a previous barcode
onchanges or some classic ones) before setting the barcode field.
With 98ed53ce when a form view is saved when a html field is in code
view mode, the change is not lost.
This new backend tour check that when saving in or not in code view, the
content is saved effectively.
The test not in code view would ensure issues like #14381#14351#14394
are detected on runbot.
closes#14475
opw-693052
note: the old test system is used so this test is only for up to saas-11
The intended scenario when using the code view is the following:
1) click on code view button to use code view
2) make changes
3) click on code view button to get back to wysiwyg view
4) save from the wysiwyg view
If the 3rd step was not done:
- for the inline editor, we lose the changes that have been done in
code view,
- for the iframe editor, we lose the entirety of the content.
At one time the user was forced to go back to wysiwyg before being able
to save, but this have been removed hence the present usability issue.
With this fix, when the editor content is saved, if the user is in code
view he is automatically set back to wysiwyg view.
fixes#14648closes#14475
opw-678677
opw-693052
In e0c4ec54ca a change was done to improve the behavior in some
editable list instances, but this introduced a small issue for
list with line creation disabled.
With this change, doing tab or enter at last line should keep the
previous behavior of wrapping around and not creating a new line.
opw-703748
When the 'Invoicing' or 'Accounting' module is installed without the
module 'Sales', only the admin user can create products in the database.
The expected behavior is that any 'Accounting Adviser' should be able to
manage some products in Odoo.
To allow 'Accounting Advisers' to manage products, we add them the CRUD
rights on 'product.product', 'product.template' and
'product.price.history'
opw-703610
When a quality.alert was added from the kanban view, a traceback was raised
due to a coding error. In the fail function, the event is the second parameter.
opw:703281