Daily updates from Odoo
Wednesday, August 19, 2015
4 changes
Enhancements to existing features
This change adjusts how multi-item form fields send updates after a field change, using a command-based format that the system can process consistently. This helps keep form behavior reliable when users edit records with related lists or linked items.
Original PR description
Serialize them as list of commands.
The German accounting module now uses Odoo's standard account type categories instead of separate local definitions, simplifying maintenance and improving consistency. It also removes duplicate or unnecessary German chart account numbers, making the default setup cleaner while still allowing users to add extra accounts if needed.
Original PR description
In this pull-reqest I changed the `user-type` field in the `account_chart` files from the separate defined ones in `account_types_skr03.xml` and `account_types_skr04.xml` to the standard in odoo and…
In this pull-reqest I changed the `user-type` field in the `account_chart` files from the separate defined ones in `account_types_skr03.xml` and `account_types_skr04.xml` to the standard in odoo and deleted the both files.
There was only one user-type left. Therefor I created a new file called `account_types.xml`.
I also deleted some account numbers which are not realy needed, because it's something like "created twice" with the next higher account number eg (in the old file):
```
<record id="chart_skr04_1100" model="account.account.template">
<field name="code">1100</field>
<field name="name">Fertige Erzeugnisse und Waren (Bestand)</field>
<field name="parent_id" ref="chart_skr04_K1BA15"/>
<field name="reconcile" eval="False"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_asset_de"/>
</record>
<record id="chart_skr04_1101" model="account.account.template">
<field name="code">1101</field>
<field name="name">Fertige Erzeugnisse und Waren (Bestand)</field>
<field name="parent_id" ref="chart_skr04_K1BA15"/>
<field name="reconcile" eval="False"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_asset_de"/>
</record>
<record id="chart_skr04_1102" model="account.account.template">
<field name="code">1102</field>
<field name="name">Fertige Erzeugnisse und Waren (Bestand)</field>
<field name="parent_id" ref="chart_skr04_K1BA15"/>
<field name="reconcile" eval="False"/>
<field name="type">other</field>
<field name="user_type" ref="account_type_asset_de"/>
</record>
```
This is something the user should do, if he needs it, but nomally it is not needed in germany.
It's a first step, to bring up some improvements to the german-accounting.
@tv-openbig can you please check and give me a feedback if everything is fine.This change lets Odoo reports define custom calculation formulas for numeric measures in pivot and graph views. Businesses can now add more meaningful metrics, such as margin percentage, directly in reports instead of relying only on simple totals or averages.
Original PR description
With this new attribute (group_expression) in integer and float fields we can define an advance SQL expression to calcule aggregated value in graph pivot table. For example, adding a margin_percent…
With this new attribute (group_expression) in integer and float fields we can define an advance SQL expression to calcule aggregated value in graph pivot table.
For example, adding a margin_percent measured column for sale.order reports:
At sale.report model
```
margin_total_percentage = fields.Float(
string="Margen medio (%)", readonly=True,
group_expression="( 1 - (sum(cost_total) / sum(price_total)) ) * 100")
```
In this case, we have already added a `cost_total` column that aggregate cost_price of each sale.order.line and we have to define also a way to calculate `margin_total_percentage` for sale_report SQL view:
```
def _select(self):
select_str = super(SaleReport, self)._select()
select_str += (
","
"(coalesce("
# margin_percentage = (1 - (cost_total / price_total) ) * 100
"(1.0 -"
"("
# cost_total / price_total or NULL to avoid zero division
"sum(l.purchase_price * l.product_uom_qty) /"
"NULLIF(sum(l.product_uom_qty * l.price_unit * (100.0 - l.discount) / 100.0), 0)"
")"
") * 100.0,"
"0.0"
")) as margin_total_percentage"
)
return select_str
```The employee equipment kanban view has been reorganized to make equipment records easier to scan and manage. This improves day-to-day usability for teams tracking assigned equipment without changing underlying business processes.
Original PR description
Task: https://www.odoo.com/web?#id=20190&view_type=form&model=project.task&menu_id=3942&action=327 Pad: https://pad.odoo.com/p/r.q0SPIlnWCp8CN6VP