- As of 9.0 there is a discrepancy between the smart button showing
the "total timesheet" entries at the top of a Sales Order, and the
actual timesheet lines used to computed the "delivered quantity"
of the lines of that SO.
Fix this by simply counting all the timesheet lines assigned to
the SO lines.
- Also replace the sum of "timesheets" mixing different UoMs with a
simple count of the lines, on the smart button.
It's not going to match the sum of the "delivered qty" on the
lines anyway (due to diff. UoMs), so let's show something that makes
sense all the time.
- Finally, use a more logical plural form in the smart button label
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
When a form view had only one field, it was fullwidth.
Now we add a separator automatically. That (seems) have no
effects on model with several field and fix the display when
only one field.
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
The web_editor.colorpicker defines a series of color buttons which
toggle the bg-* and text-* classes. The problem is that themes can
define new buttons whose bg-* and text-* classes only exist in the
frontend. So these buttons should not be displayed in the backend.
Only solution for the current implementation is to add this ugly rule
(in this backend file) which hides every button and redisplayed the
default ones.
This fix is temporary and has to be improved in next versions.
The editor had been restyled thinking its DOM structure was the same
in every context. The problem is that the message composer editor
DOM structure is different. So, some important style like button
icons were missing in this context.
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.
Rev. 56cec604e6 modifies
the auto-commit behavior of the mail queue scheduler,
to allow using it within tests.
The condition was wrong and always True as soon as
the registry was loaded, permanently disabling
auto-commit, both during tests and outside tests.
This broke the duplicate emails protection.