[FIX] project_issue and sheets
bzr revid: fp@tinyerp.com-20100525223526-8h0ccmbx9wxq35rb
This commit is contained in:
@@ -34,13 +34,11 @@ from tools.translate import _
|
||||
|
||||
class project_issue(osv.osv):
|
||||
_inherit = 'project.issue'
|
||||
|
||||
_columns = {
|
||||
'timesheet_ids' : fields.one2many('hr.analytic.timesheet', 'issue_id', 'Timesheets'),
|
||||
'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account',
|
||||
domain="[('partner_id', '=', partner_id)]",
|
||||
required=True),
|
||||
'analytic_account_id': fields.related('project_id','category_id',string='Analytic Account')
|
||||
}
|
||||
project_issue()
|
||||
|
||||
class account_analytic_line(osv.osv):
|
||||
_inherit = 'account.analytic.line'
|
||||
@@ -53,10 +51,8 @@ account_analytic_line()
|
||||
|
||||
class hr_analytic_issue(osv.osv):
|
||||
_inherit = 'hr.analytic.timesheet'
|
||||
|
||||
_columns = {
|
||||
'issue_id' : fields.many2one('project.issue', 'Issue'),
|
||||
}
|
||||
|
||||
hr_analytic_issue()
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<field name="arch" type="xml">
|
||||
<notebook colspan="4">
|
||||
<page string="Worklogs">
|
||||
<separator string="Timesheets" colspan="4" />
|
||||
<field name="analytic_account_id" invisible="1"/>
|
||||
<field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}">
|
||||
<tree editable="top" string="Timesheet">
|
||||
<field name="create_date" string="Date" />
|
||||
<field name="user_id" readonly="1" />
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
<field name="account_id" invisible="0" domain="[('partner_id', '=', parent.partner_id)]" on_change="on_change_account_id(account_id)"/>
|
||||
<field name="name"/>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
|
||||
|
||||
Reference in New Issue
Block a user