The user performing reconciliations may not always
have the right to update the corresponding partners,
for example if a partner is also a system user.
Doing it as super-user after verifying that the
user is indeed allowed to reconcile journal items
works around the problem.
Fixes#11931
The domain used to search the project issues in the website_project_issue
controller(['/my', '/my/home']) was useless thanks to the ir.rule portal_issue_rule
opw:676447
Estimate the workcenter cost based on produced quantity so far.
The workcenter cost is written on analytic accounts at the end of the production
only. A new method _compute_costs_from_production is needed to estimate the
workcenter total cost and then divide by the produced unit.
opw-675994
If the production flow is in two steps:
1. consume raw material
2. produce manufactured product
The total_consume_moves was empty (so computed cost was 0)
Include the moves that were already consumed since the last production.
This will offer a correct estimation of cost of production in real time for
companies producing in several steps.
opw-675994
Follow up of fix 6f8030a
This previous fix removed the reference field when creating an
invoice from a sales order since this field was for Supplier
Invoices (and is not shown for Customer Invoices).
While this males sense, it had the side effect of removing the
default value for the "Register Payment" wizard.
To keep this wizard populated with the most sensible data,
the default is now set to reference or name or number (in that
order).
opw 676261
In Discuss, if a message was selected as message to reply to, it wasn't reset
when switching to another channel. So if the user sent a message in that other
channel, the message was sent as reply to the previously selected message.
This rev. ensures to always unselect messages when switching between channels.
Closes#11879
Before this, if you where on the customer selection screen and scanned a
customer barcode the customer would be shown, but you were not able to
select him.
This correctly sets ClientListScreenWidget.new_client to the scanned
partner which makes the button toggle.
Closes#11874
It's needed by the onchange on product_id. Without this the price will
be correctly computed by `onchange_product_id` but upon saving the
record tax_ids will be lost.
Closes#11875Closes#11705Closes#10378
The followers of the departments subscribed to the
`Leaves/Allocations Confirmed` are supposed to
receive a mail notification when an employee
confirms a leave request.
It was no longer the case since the below revision:
2be1dfc1ed
This revision subscribes the followers of the department
following the `confirmed` subtype manually
,on the leave request confirmation, because
`message_auto_subscribe` only works on fields for which
the value is passed to the `create` or `write` methods,
it doesn't work for related/computed fields
This can be removed as soon as `department_id` on `hr.holidays` becomes a regular
fields or as soon as `message_auto_subscribe` works with related/computed fields.
opw-676521
Since 3d8f7c2f, res.config support selection fields to set groups and install
modules using a selection field instead of boolean.
While the `module_*` fields are correctly casted from boolean to integers, it
was not the case with `group_*` fields.
This commit forces the conversion to get the expected field format value.
Closes#10373
When the user has several addresses, the call to the onchange method
`onchange_partner_id` will overwrite the actual invoice address chosen.
opw-675935
Without the proper decorator, the method is matched as `cr_ui_context`.
This is because the `guess` mechanism expects a name `res_id` instead of
`record_id`.
For stability reason it is better to add the decorator than modify the signature
of the method.
Closes#11735
When a kit is set with a valuation = "real_time" and invoice_policy = "delivery",
the price unit of the kit computed for the Expense Account in the the journal of
entries must be the sum of the average price of each component of this kit.
Used case:
Create a kit001 with:
*General information:
-Product Type=Stockable Product
-Invoicing Policy=Delivered Quantities
-Sale Price=100$
-Cost Price=80$
*Inventory:
-Route=Manufacture
-Internal Category=All/Sealable
*its product category set with
-Expense Account=210000 Cost of Goods Sold
-Costing Method=Standard Price
-Inventory Valuation=Perpetual(automated)
*a bom of two components child001 and child002
Create child001 with:
*General information:
-Product Type=Stockable Product
-Invoicing Policy=Delivered Quantities
-Sale Price=100$
-Cost Price=70$
*Inventory:
-Route=Buy
-Internal Category=All
*its product category set with
-Expense Account=210000 Cost of Goods Sold
-Costing Method=Real Price
-Inventory Valuation=Perpetual(automated)
Create child002 with:
*General information:
-Product Type=Stockable Product
-Invoicing Policy=Delivered Quantities
-Sale Price=100$
-Cost Price=10$
*Inventory:
-Route=Buy
-Internal Category=All
*its product category set with
-Expense Account=210000 Cost of Goods Sold
-Costing Method=Real Price
-Inventory Valuation=Perpetual(automated)
Create a SO with:
-one line with the kit001
Confirm the SO
Validate the Delivery
Create and view the invoices
-per invoicable lines(deduct down payments)
Validate the invoice
Result:
Before the fix: in the entry created for this invoice, the debit for the kit001 in Cost of Goods Sold
was equal to 70 instead of 80.
After the fix: the debit for the kit001 in Cost of Goods Sold
was equal to 80(the sum of the average price of each component of the kit001).
opw:674608
An OFX file can contain more than one account. Therefore, we need to
loop over all the included accounts, otherwise statements will be
missed.
opw-673814
This case corresponds to searches like `[(field, 'ilike', name)]` where `field`
is a many2many field. The domain processing performs a `name_search` on the
field's comodel, then makes the relation match the returned record ids.
Problem: the call to `name_search` uses the default limit (100), and this makes
the search return less results than expected. Make the search complete by
forcing `limit=None`.
This case corresponds to searches like `[(field, 'ilike', name)]` where `field`
is a many2many field. The domain processing performs a `name_search` on the
field's comodel, then makes the relation match the returned record ids.
Problem: the call to `name_search` uses the default limit (100), and this makes
the search return less results than expected. Make the search complete by
forcing `limit=None`.
Setting a binary field stored in attachment may trigger recomputations on the
main record before all fields are set on that record. This may cause access
errors if the record does not satisfy some access rule because of the fields
that are not set yet.
When traversing relational fields as superuser, you end up with a recordset for
which only a subset is accessible to the current user. An earlier fix to this
issue completely dropped the `related_sudo` feature; change its implementation
to keep the feature.
Since the crm refactoring in V9, the stages doesn't make sense anymore on a lead,
as this step is only to validate an opportunity. We should remove this view as it
is confusing in this case : If I create a stage on the opportunity form view,
it appears also on the lead kanban view. Other side effects can also be encountered.
When invoicing several SO with same partner and with different invoice address,
different invoices have to be created with each invoice address.
Used case:
-create a customer with two invoice addresses
-create a SO for this customer with the first address
-create a SO for this customer with the second address
-select the two SO in the SO tree view
-click on "Invoice Order"
-click on "Create and view invoices"
Results:
Before the fix: The two SO are merged in one invoice with the second
address.
After the fix: Two invoices are created, one for the first address and
one for the second address.
opw:675961
The picking type is not defined on the stock move when a picking is
created manually. This can cause errors, for example in manufacturing: a
product sold in kit will not be replaced by its components.
opw-673741