summaryrefslogtreecommitdiff
path: root/addons/project_issue_sheet/project_issue_sheet_view.xml
diff options
context:
space:
mode:
authorodoo-tac <tac@odoo.com>2015-02-24 16:52:20 +0100
committerodoo-tac <tac@odoo.com>2015-04-28 10:31:18 +0200
commit14183ba2be54a10247419f110f512cc6844a41b4 (patch)
tree1a074c4c2c0a3d46a1ff9f5eb060305365745d87 /addons/project_issue_sheet/project_issue_sheet_view.xml
parenteb91b14837b20601b9d8cba80829883f85263b8e (diff)
[REF] Refactored hr_timesheet: Refactored the "timesheet" model in several modules. hr.analytic.timesheet is removed, and account.analytic.line is used directly to represent timesheets.
Also removed worklogs on tasks and replaced them by generic timesheets, i.e. account.analytic.line(s)
Diffstat (limited to 'addons/project_issue_sheet/project_issue_sheet_view.xml')
-rw-r--r--addons/project_issue_sheet/project_issue_sheet_view.xml42
1 files changed, 29 insertions, 13 deletions
diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml
index 69dc2b41776..7d2eddb6361 100644
--- a/addons/project_issue_sheet/project_issue_sheet_view.xml
+++ b/addons/project_issue_sheet/project_issue_sheet_view.xml
@@ -6,6 +6,9 @@
<field name="model">project.issue</field>
<field name="inherit_id" ref="project_issue.project_issue_form_view" />
<field name="arch" type="xml">
+ <field name="task_id" position="after">
+ <field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}" class="oe_inline"/>
+ </field>
<field name="project_id" position="attributes">
<attribute name="on_change">on_change_project(project_id)</attribute>
</field>
@@ -15,26 +18,39 @@
on_change='on_change_account_id(analytic_account_id)'/>
</field>
<xpath expr="//notebook/page[@name='extra_info']" position="before">
- <page string="Worklogs">
- <field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : uid, 'default_account_id' : analytic_account_id}"
+ <page string="Timesheets">
+ <field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : uid, 'default_account_id' : analytic_account_id, 'default_is_timesheet':1}"
groups="base.group_user">
- <tree editable="top" string="Timesheets">
- <field name="name"/>
- <field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
- <field name="account_id" invisible="0" domain="[('partner_id', '=', parent.partner_id)]" on_change="on_change_account_id(account_id)" groups="analytic.group_analytic_accounting"/>
+ <tree editable="top" string="Timesheet Activities">
<field name="date"/>
- <field name="user_id"/>
- <field invisible="1" name="journal_id"/>
- <field invisible="1" name="product_id"/>
- <field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
- <field invisible="1" name="amount"/>
- <field invisible="1" name="general_account_id"/>
- <field invisible="1" name="to_invoice"/>
+ <field name="user_id" required="1"/>
+ <field name="name"/>
+ <field name="account_id" invisible="0" domain="[('partner_id', '=', parent.partner_id)]" on_change="on_change_account_id(account_id, context)" groups="analytic.group_analytic_accounting"/>
+ <field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id, context)" widget="float_time"/>
+ <field name="to_invoice" invisible="1"/>
+ <field name="product_uom_id" invisible="1" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id, context)"/>
+ <field name="journal_id" invisible="1"/>
+ <field name="amount" invisible="1"/>
+ <field name="general_account_id" invisible="1"/>
+ <field name="product_id" invisible="1"/>
+ <field name="is_timesheet" invisible="1"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
+
+ <record id="project_issue_tree_view_inherited" model="ir.ui.view">
+ <field name="name">Project Issue Tracker Tree Inherited</field>
+ <field name="model">project.issue</field>
+ <field name="inherit_id" ref="project_issue.project_issue_tree_view" />
+ <field name="arch" type="xml">
+ <field name="user_id" position="after">
+ <field name="progress" widget="progressbar" invisible="context.get('set_visible',False)"/>
+ </field>
+ </field>
+ </record>
+
</data>
</openerp>