-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
project_budget_subcontractor: improve/fix budget
- Loading branch information
1 parent
27a3fc5
commit 25639be
Showing
3 changed files
with
114 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
project_budget_subcontractor/views/project_budget_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<record id="project_budget_view_tree" model="ir.ui.view"> | ||
<field name="model">project.budget</field> | ||
<field name="arch" type="xml"> | ||
<tree create="0" edit="0"> | ||
<field name="partner_id" /> | ||
<field name="project_id" /> | ||
<field name="name" /> | ||
<field name="start_date" /> | ||
<field name="end_date" /> | ||
<field | ||
name="budget_amount" | ||
widget="monetary" | ||
options="{'currency_field': 'currency_id'}" | ||
/> | ||
<field | ||
name="invoiced_amount" | ||
widget="monetary" | ||
options="{'currency_field': 'currency_id'}" | ||
/> | ||
<field | ||
name="to_invoice_amount" | ||
widget="monetary" | ||
options="{'currency_field': 'currency_id'}" | ||
/> | ||
<field | ||
name="remaining_amount" | ||
widget="monetary" | ||
options="{'currency_field': 'currency_id'}" | ||
/> | ||
<field | ||
name="remaining_budget" | ||
widget="monetary" | ||
options="{'currency_field': 'currency_id'}" | ||
/> | ||
</tree> | ||
</field> | ||
</record> | ||
|
||
<record id="project_budget_view_search" model="ir.ui.view"> | ||
<field name="model">project.budget</field> | ||
<field name="arch" type="xml"> | ||
<search string="Budget"> | ||
<field name="project_id" /> | ||
<filter | ||
name="current" | ||
domain="[ | ||
('start_date', '<=', context_today().strftime('%Y-%m-%d')), | ||
('end_date', '>=', context_today().strftime('%Y-%m-%d')), | ||
]" | ||
/> | ||
<group expand="0" string="Group By"> | ||
<filter | ||
string="Customer" | ||
name="customer" | ||
domain="[]" | ||
context="{'group_by': 'partner_id'}" | ||
/> | ||
</group> | ||
</search> | ||
</field> | ||
</record> | ||
|
||
<record model="ir.actions.act_window" id="project_budget_action"> | ||
<field name="name">Budget</field> | ||
<field name="type">ir.actions.act_window</field> | ||
<field name="res_model">project.budget</field> | ||
<field name="view_mode">tree</field> | ||
<field name="search_view_id" ref="project_budget_view_search" /> | ||
<field name="domain">[]</field> | ||
<field name="context">{"search_default_current": 1}</field> | ||
</record> | ||
|
||
<menuitem | ||
id="project_budget_menu" | ||
parent="project.menu_main_pm" | ||
sequence="20" | ||
action="project_budget_action" | ||
/> | ||
|
||
</odoo> |