Added Expensible opetion for Product(hr_expense)(ref:ACH)
bzr revid: jvo@tinyerp.com-20090402094417-yirmobjq2yx6fwa9
This commit is contained in:
parent
469fdf9ef2
commit
d848e06328
|
@ -172,6 +172,14 @@ class hr_expense_expense(osv.osv):
|
|||
return res
|
||||
hr_expense_expense()
|
||||
|
||||
class product_product(osv.osv):
|
||||
_inherit = "product.product"
|
||||
|
||||
_columns = {
|
||||
'hr_expense_ok': fields.boolean('Can be Expensed', help="Determine if the product can be visible in the list of product within a selection from an HR expense sheet line."),
|
||||
}
|
||||
product_product()
|
||||
|
||||
|
||||
class hr_expense_line(osv.osv):
|
||||
_name = "hr.expense.line"
|
||||
|
@ -191,7 +199,7 @@ class hr_expense_line(osv.osv):
|
|||
'total_amount': fields.function(_amount, method=True, string='Total'),
|
||||
'unit_amount': fields.float('Unit Price'),
|
||||
'unit_quantity': fields.float('Quantities' ),
|
||||
'product_id': fields.many2one('product.product', 'Product' ),
|
||||
'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),
|
||||
'uom_id': fields.many2one('product.uom', 'UoM' ),
|
||||
'description': fields.text('Description'),
|
||||
'analytic_account': fields.many2one('account.analytic.account','Analytic account'),
|
||||
|
@ -215,6 +223,5 @@ class hr_expense_line(osv.osv):
|
|||
|
||||
hr_expense_line()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -178,5 +178,17 @@
|
|||
</record>
|
||||
<menuitem action="expense_my_confirm" id="menu_expense_my_confirm" parent="hr_expense.menu_expense_my"/>
|
||||
|
||||
<record id="view_product_hr_expense_form" model="ir.ui.view">
|
||||
<field name="name">product.product.expense.form</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<field groups="base.group_extended" name="rental" position="after">
|
||||
<field name="hr_expense_ok"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -194,7 +194,7 @@
|
|||
<field name="view_mode">tree,graph</field>
|
||||
</record>
|
||||
|
||||
<!-- Closed & Open CRM Case view for Random Acitivities dashboard -->
|
||||
<!-- Closed & Open CRM Case view for Random Activities dashboard -->
|
||||
|
||||
<record id="board_view_crm_case_open_dashboard_tree" model="ir.ui.view">
|
||||
<field name="name">report.crm.case.service.dashboard.tree</field>
|
||||
|
@ -237,7 +237,7 @@
|
|||
</record>
|
||||
|
||||
<record id="action_view_closed_crm_case_dashboard" model="ir.actions.act_window">
|
||||
<field name="name">Closed CRM Cases Wtihin Past 15 Days</field>
|
||||
<field name="name">Closed CRM Cases Within Past 15 Days</field>
|
||||
<field name="res_model">report.crm.case.service.dashboard</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
@ -246,7 +246,7 @@
|
|||
</record>
|
||||
|
||||
<record id="action_view_open_crm_case_dashboard" model="ir.actions.act_window">
|
||||
<field name="name">Open CRM Cases Wtihin Past 15 Days</field>
|
||||
<field name="name">Open CRM Cases Within Past 15 Days</field>
|
||||
<field name="res_model">report.crm.case.service.dashboard</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
|
Loading…
Reference in New Issue