[IMP] hr_payroll:removed commented(#) obj company.contribution
bzr revid: mtr@mtr-20110301113852-fpv8uk4fst2ducvs
This commit is contained in:
parent
73bbece660
commit
a9b46f9eb8
|
@ -696,98 +696,6 @@ class payment_category(osv.osv):
|
|||
}
|
||||
payment_category()
|
||||
|
||||
#class company_contribution(osv.osv):
|
||||
# """
|
||||
# Company contribution
|
||||
# Allows to configure company contribution for some taxes
|
||||
# """
|
||||
#
|
||||
# _name = 'company.contribution'
|
||||
# _description = "Company Contribution"
|
||||
# _columns = {
|
||||
## 'category_id':fields.many2one('hr.salary.rule', 'Heads', required=False),
|
||||
# 'name':fields.char('Name', size=256, required=True, readonly=False),
|
||||
# 'code':fields.char('Code', size=64, required=True, readonly=False),
|
||||
# 'gratuity':fields.boolean('Use for Gratuity ?', required=False),
|
||||
# 'line_ids':fields.one2many('company.contribution.line', 'contribution_id', 'Calculations', required=False),
|
||||
# 'register_id':fields.property(
|
||||
# 'hr.contibution.register',
|
||||
# type='many2one',
|
||||
# relation='hr.contibution.register',
|
||||
# string="Contribution Register",
|
||||
# method=True,
|
||||
# view_load=True,
|
||||
# help="Contribution register based on company",
|
||||
# required=False
|
||||
# ),
|
||||
# 'amount_type':fields.selection([
|
||||
# ('fix','Fixed Amount'),
|
||||
# ('per','Percentage'),
|
||||
# ('func','Function Calculation'),
|
||||
# ],'Amount Type', select=True),
|
||||
# 'contribute_per':fields.float('Contribution', digits=(16, 4), help='Define Company contribution ratio 1.00=100% contribution.'),
|
||||
# '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,
|
||||
# }
|
||||
#
|
||||
# def _execute_function(self, cr, uid, id, value, context=None):
|
||||
# """
|
||||
# self: pointer to self object
|
||||
# cr: cursor to database
|
||||
# uid: user id of current executer
|
||||
# """
|
||||
# line_pool = self.pool.get('company.contribution.line')
|
||||
# res = 0
|
||||
# ids = line_pool.search(cr, uid, [('category_id','=',id), ('to_val','>=',value),('from_val','<=',value)], context=context)
|
||||
# if not ids:
|
||||
# ids = line_pool.search(cr, uid, [('category_id','=',id), ('from','<=',value)], context=context)
|
||||
# if not ids:
|
||||
# res = 0
|
||||
# else:
|
||||
# res = line_pool.browse(cr, uid, ids, context=context)[0].value
|
||||
# return res
|
||||
#
|
||||
# def compute(self, cr, uid, id, value, context=None):
|
||||
# contrib = self.browse(cr, uid, id, context=context)
|
||||
# if contrib.amount_type == 'fix':
|
||||
# return contrib.contribute_per
|
||||
# elif contrib.amount_type == 'per':
|
||||
# return value * contrib.contribute_per
|
||||
# elif contrib.amount_type == 'func':
|
||||
# return self._execute_function(cr, uid, id, value, context)
|
||||
# return 0.0
|
||||
#company_contribution()
|
||||
#
|
||||
#class company_contribution_line(osv.osv):
|
||||
# """
|
||||
# Company contribution lines
|
||||
# """
|
||||
#
|
||||
# _name = 'company.contribution.line'
|
||||
# _description = 'Allowance Deduction Category'
|
||||
# _order = 'sequence'
|
||||
# _columns = {
|
||||
# 'contribution_id':fields.many2one('company.contribution', 'Contribution', required=False),
|
||||
# 'name':fields.char('Name', size=64, required=False, readonly=False),
|
||||
# 'from_val': fields.float('From', digits=(16, 4)),
|
||||
# 'to_val': fields.float('To', digits=(16, 4)),
|
||||
# 'amount_type':fields.selection([
|
||||
# ('fix','Fixed Amount'),
|
||||
# ],'Amount Type', select=True),
|
||||
# 'sequence':fields.integer('Sequence'),
|
||||
# 'value': fields.float('Value', digits=(16, 4)),
|
||||
# }
|
||||
#company_contribution_line()
|
||||
|
||||
class hr_holidays_status(osv.osv):
|
||||
|
||||
_inherit = "hr.holidays.status"
|
||||
|
|
|
@ -571,102 +571,6 @@
|
|||
/>
|
||||
<!-- 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"/>
|
||||
</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="Other Information"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection" select="1"/>
|
||||
<field name="active" select="1"/>
|
||||
</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"/>
|
||||
<field name="category_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_hr_company_contribution_filter" model="ir.ui.view">
|
||||
<field name="name">company.contribution.select</field>
|
||||
<field name="model">company.contribution</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Company Contribution">
|
||||
<group col="8" colspan="4">
|
||||
<filter icon="terp-document-new" string="Fixed Amount" domain="[('amount_type','=','fix')]" help="Draft Slip"/>
|
||||
<filter icon="terp-camera_test" string="Function Calculation" domain="[('amount_type','=','func')]" help="Posted Slip"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="contribute_per"/>
|
||||
<field name="register_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col="8" colspan="4" expand="0" string="Group By...">
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" name="amount_type" context="{'group_by':'amount_type'}"/>
|
||||
<filter string="Category" name="category_id" icon="terp-stock_symbol-selection" context="{'group_by':'category_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</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"/>
|
||||
<field name="search_view_id" ref="view_hr_company_contribution_filter"/>
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_hr_company_contribution_tree"
|
||||
action="action_hr_company_contribution_tree"
|
||||
parent="payroll_configure"
|
||||
/>-->
|
||||
<!-- End Company Contribution -->
|
||||
|
||||
<record id="view_hr_bank_advice_tree" model="ir.ui.view">
|
||||
<field name="name">hr.payroll.advice.tree</field>
|
||||
<field name="model">hr.payroll.advice</field>
|
||||
|
|
Loading…
Reference in New Issue