Skip to content

Commit

Permalink
Simplify XML structures and update module version.
Browse files Browse the repository at this point in the history
Refactored XML files by removing unnecessary `<data>` tags and redundant attributes to improve code readability. Updated the version in `__manifest__.py` from 17.0.2.0.0 to 17.0.2.0.1 to reflect these changes. Minor updates were also made to tree view definitions for consistency.
  • Loading branch information
dhongu committed Dec 23, 2024
1 parent 074777b commit 0c55bff
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 26 deletions.
2 changes: 1 addition & 1 deletion deltatech_expenses/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "Expenses Deduction",
"summary": "Expenses Deduction & Disposition of Cashing",
"version": "17.0.2.0.0",
"version": "17.0.2.0.1",
"category": "Accounting & Finance",
"author": "Terrabit, Dorin Hongu",
"website": "https://www.terrabit.ro",
Expand Down
5 changes: 2 additions & 3 deletions deltatech_expenses/data/data.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data noupdate="1">
<odoo noupdate="1">
<record id="sequence_expenses_deduction" model="ir.sequence">
<field name="name">Expenses Deduction</field>
<field name="prefix">DEC/</field>
<field name="padding">5</field>
<field name="number_next">1</field>
<field name="number_increment">1</field>
</record>
</data>

</odoo>
15 changes: 7 additions & 8 deletions deltatech_expenses/security/security.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data noupdate="1">
<record id="expenses_deduction_comp_rule" model="ir.rule">
<field name="name">ExpensesDeduction multi-company</field>
<field name="model_id" ref="model_deltatech_expenses_deduction" />
<field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
</record>
</data>
<odoo noupdate="1">
<record id="expenses_deduction_comp_rule" model="ir.rule">
<field name="name">ExpensesDeduction multi-company</field>
<field name="model_id" ref="model_deltatech_expenses_deduction" />
<field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
</record>

</odoo>
18 changes: 9 additions & 9 deletions deltatech_expenses/views/deltatech_expenses_deduction_report.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" ?>
<odoo>

<record id="action_report_deltatech_expenses_deduction" model="ir.actions.report">
<field name="name">Print Expenses Deduction</field>
<field name="model">deltatech.expenses.deduction</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">deltatech_expenses.report_deltatech_expenses_deduction</field>
<field name="report_file">deltatech_expenses.report_deltatech_expenses_deduction</field>
<field name="binding_type">report</field>
<field name="binding_model_id" ref="model_deltatech_expenses_deduction" />
</record>
<record id="action_report_deltatech_expenses_deduction" model="ir.actions.report">
<field name="name">Print Expenses Deduction</field>
<field name="model">deltatech.expenses.deduction</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">deltatech_expenses.report_deltatech_expenses_deduction</field>
<field name="report_file">deltatech_expenses.report_deltatech_expenses_deduction</field>
<field name="binding_type">report</field>
<field name="binding_model_id" ref="model_deltatech_expenses_deduction" />
</record>

</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
</page>
<page string="Journal Items">
<field name="move_ids" readonly="1">
<tree string="Journal Items">
<tree>
<field name="move_id" />
<field name="ref" />
<field name="date" />
Expand All @@ -171,7 +171,7 @@
</page>
<page string="Payments">
<field name="payment_ids" readonly="1">
<tree string="Payment Items">
<tree>
<field name="partner_id" />
<field name="amount" sum="Total Amount" />
<field name="state" />
Expand All @@ -195,7 +195,7 @@
<field name="name">deltatech.expenses.deduction.tree</field>
<field name="model">deltatech.expenses.deduction</field>
<field name="arch" type="xml">
<tree sample="1" string="Expenses Deduction">
<tree sample="1">
<field name="number" />
<field name="date_expense" />
<field name="employee_id" />
Expand Down
4 changes: 2 additions & 2 deletions deltatech_expenses/views/report_expenses.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>

<template id="report_deltatech_expenses_deduction">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
Expand Down Expand Up @@ -129,5 +129,5 @@
</t>
</t>
</template>
</data>

</odoo>

0 comments on commit 0c55bff

Please sign in to comment.