[IMP]: implement view for new object company contrinute
bzr revid: mga@tinyerp.com-20100609145448-o6pgy1huodq6c5mm
This commit is contained in:
parent
3f3b015306
commit
c3f32862d1
|
@ -531,7 +531,6 @@ class payment_category(osv.osv):
|
|||
('deduct','Deduction'),
|
||||
('other','Others'),
|
||||
],'Type', select=True),
|
||||
'contribute_per':fields.float('Contribution', digits=(16, int(config['price_accuracy'])), help='Define Company contribution ratio 1.00=100% contribution, If Employee Contribute 5% then company will and here 0.50 defined then company will contribute 50% on employee 5% contribution'),
|
||||
'base':fields.char('Based on', size=64, required=True, readonly=False, help='This will use to computer the % fields values, in general its on basic, but You can use all heads code field in small letter as a variable name i.e. hra, ma, lta, etc...., also you can use, static varible basic'),
|
||||
'condition':fields.char('Condition', size=1024, required=True, readonly=False, help='Applied this head for calculation if condition is true'),
|
||||
'sequence': fields.integer('Sequence', required=True, help='Use to arrange calculation sequence'),
|
||||
|
@ -562,7 +561,7 @@ class company_contribution(osv.osv):
|
|||
_columns = {
|
||||
'category_id':fields.many2one('hr.allounce.deduction.categoty', 'Heads', required=False),
|
||||
'name':fields.char('Name', size=256, required=True, readonly=False),
|
||||
'contribute':fields.boolean('Contribe by Company ?', help='Is company contribute on this deduction, like Provident Fund'),
|
||||
'code':fields.char('Code', size=64, required=True, readonly=False),
|
||||
'include_in_salary':fields.boolean('Included in Salary ?', help='If company contribute on this deduction then should company contribution is also deducted from Employee Salary'),
|
||||
'gratuity':fields.boolean('Use for Gratuity ?', required=False),
|
||||
'line_ids':fields.one2many('company.contribution.line', 'contribution_id', 'Calculations', required=False),
|
||||
|
@ -580,6 +579,7 @@ class company_contribution(osv.osv):
|
|||
('fix','Fixed Amount'),
|
||||
('func','Function Calculation'),
|
||||
],'Amount Type', select=True),
|
||||
'contribute_per':fields.float('Contribution', digits=(16, int(config['price_accuracy'])), help='Define Company contribution ratio 1.00=100% contribution, If Employee Contribute 5% then company will and here 0.50 defined then company will contribute 50% on employee 5% contribution'),
|
||||
'account_id':fields.property(
|
||||
'account.account',
|
||||
type='many2one',
|
||||
|
@ -591,10 +591,13 @@ class company_contribution(osv.osv):
|
|||
required=False
|
||||
),
|
||||
'company_id':fields.many2one('res.company', 'Company', required=False),
|
||||
'active':fields.boolean('Active', required=False),
|
||||
'note': fields.text('Description'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'amount_type': lambda *a:'fix',
|
||||
'active': lambda *a:True,
|
||||
'company_id': lambda self, cr, uid, context: \
|
||||
self.pool.get('res.users').browse(cr, uid, uid,
|
||||
context=context).company_id.id,
|
||||
|
|
|
@ -542,7 +542,7 @@
|
|||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="hr_allounce_deduction_categoty_tree" model="ir.ui.view">
|
||||
<record id="hr_allounce_deduction_categoty_tree" model="ir.ui.view">
|
||||
<field name="name">hr.allounce.deduction.categoty.tree</field>
|
||||
<field name="model">hr.allounce.deduction.categoty</field>
|
||||
<field name="type">tree</field>
|
||||
|
@ -565,6 +565,79 @@
|
|||
action="hr_allounce_deduction_tree"
|
||||
parent="payroll_configure"
|
||||
/>
|
||||
<!-- End Payment Heads -->
|
||||
|
||||
<!-- Company Contribution -->
|
||||
<record id="hr_company_contribution_form" model="ir.ui.view">
|
||||
<field name="name">company.contribution.form</field>
|
||||
<field name="model">company.contribution</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Company Contribution">
|
||||
<group col="6" colspan="6">
|
||||
<field name="name" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="category_id"/>
|
||||
<field name="company_id" select="1"/>
|
||||
<field name="active" select="1"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Contributions"/>
|
||||
<field name="amount_type" attrs="{'required': [('contribute','=',True)]}"/>
|
||||
<field name="contribute_per" attrs="{'required': [('contribute','=',True)], 'readonly':[(('amount_type','=','func'))]}"/>
|
||||
<field name="register_id" attrs="{'required': [('contribute','=',True)]}"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Accounts"/>
|
||||
<field name="include_in_salary" />
|
||||
<field name="account_id" attrs="{'required': [('contribute','=',True), ('include_in_salary','=',True)]}"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Function" attrs="{'readonly': [('amount_type','!=','func')]}">
|
||||
<field name="line_ids" colspan="4" nolabel="1">
|
||||
<tree string="Function Arguments" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
<field name="from_val"/>
|
||||
<field name="to_val"/>
|
||||
<field name="amount_type"/>
|
||||
<field name="value"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Description">
|
||||
<field name="note" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="hr_company_contribution_tree" model="ir.ui.view">
|
||||
<field name="name">company.contribution.tree</field>
|
||||
<field name="model">company.contribution</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Company Contribution">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="contribute_per"/>
|
||||
<field name="amount_type"/>
|
||||
<field name="register_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_hr_company_contribution_tree" model="ir.actions.act_window">
|
||||
<field name="name">Company Contributions</field>
|
||||
<field name="res_model">company.contribution</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="hr_company_contribution_tree"/>
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_hr_company_contribution_tree"
|
||||
action="action_hr_company_contribution_tree"
|
||||
parent="payroll_configure"
|
||||
/>
|
||||
<!-- End Company Contribution -->
|
||||
|
||||
<!-- Contract Form-->
|
||||
<!-- <record id="hr_contract.hr_contract_view_form" model="ir.ui.view">-->
|
||||
|
|
Loading…
Reference in New Issue