[IMP]: improve the usability
[odoo/odoo.git] / addons / hr_payroll / hr_payroll_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <!-- Root Menus -->
5         <menuitem id="menu_hr_root_payroll" parent="hr.menu_hr_root" name="Payroll" sequence="9"/>
6         <menuitem id="payroll_configure" parent="hr.menu_hr_configuration" name="Payroll" groups="base.group_hr_manager"/>
7         <menuitem id="menu_hr_payroll_reporting" parent="hr.menu_hr_reporting" name="Payroll" groups="base.group_hr_manager"/>
8
9         <!-- Passport Views    -->
10         <record id="hr_passport_form" model="ir.ui.view">
11             <field name="name">hr.passport.form</field>
12             <field name="model">hr.passport</field>
13             <field name="type">form</field>
14             <field name="arch" type="xml">
15                 <form string="Passport">
16                     <group col="6" colspan="4">
17                         <field name="name" select="1" colspan="4"/>
18                         <field name="employee_id" />
19                     </group>
20                     <group col="2" colspan="2">
21                         <separator string="Country &amp; Address" colspan="4"/>
22                         <field name="country_id" select="1"/>
23                         <field name="address_id" select="1"/>
24                     </group>
25                     <group col="2" colspan="2">
26                         <separator string="Valid From" colspan="2"/>
27                         <field name="date_issue" select="1"/>
28                         <field name="date_expire" select="1"/>
29                     </group>
30                     <notebook colspan="4">
31                         <page string="Description">
32                             <separator string="Description" colspan="2"/>
33                             <field name="note" colspan="4" nolabel="1"/>
34                         </page>
35                         <page string="Contracts" groups="base.group_extended">
36                             <field name="contracts_ids" colspan="4" nolabel="1"/>
37                         </page>
38                     </notebook>
39                 </form>
40             </field>
41         </record>
42         <record id="hr_passport_tree" model="ir.ui.view">
43             <field name="name">hr.passport.tree</field>
44             <field name="model">hr.passport</field>
45             <field name="type">tree</field>
46             <field name="arch" type="xml">
47                 <tree string="Passport">
48                     <field name="name" />
49                     <field name="employee_id" />
50                     <field name="address_id"/>
51                     <field name="country_id" />
52                     <field name="date_expire"/>
53                     <field name="date_issue" />
54                 </tree>
55             </field>
56         </record>
57
58         <record id="view_hr_passport_filter" model="ir.ui.view">
59             <field name="name">hr.passport.select</field>
60             <field name="model">hr.passport</field>
61             <field name="type">search</field>
62             <field name="arch" type="xml">
63                 <search string="Search Passport">
64                     <group col="8" colspan="4">
65                         <field name="name"/>
66                         <field name="employee_id"/>
67                         <field name="country_id"/>
68                         <field name="address_id"/>
69                     </group>
70                     <newline/>
71                     <group col="8" colspan="4" expand="0" string="Group By...">
72                         <filter string="Employees" icon="terp-partner" name="employee_id" context="{'group_by':'employee_id'}"/>
73                         <filter string="Country" name="country_id" icon="terp-go-home" context="{'group_by':'country_id'}"/>
74                         <filter string="Expire" name="date_expire" icon="terp-go-month" context="{'group_by':'date_expire'}"/>
75                         <filter string="Issue" name="date_issue" icon="terp-go-month" context="{'group_by':'date_issue'}"/>
76                     </group>
77                 </search>
78             </field>
79         </record>
80         <record id="action_hr_passport_tree" model="ir.actions.act_window">
81             <field name="name">All Passports</field>
82             <field name="res_model">hr.passport</field>
83             <field name="view_type">form</field>
84             <field name="view_id" ref="hr_passport_tree"/>
85             <field name="search_view_id" ref="view_hr_passport_filter"/>
86         </record>
87         <!-- End Passport Views -->
88
89         <!-- Employee View -->
90         <record id="view_employee_bank_form" model="ir.ui.view">
91             <field name="name">res.partner.bank.form</field>
92             <field name="model">res.partner.bank</field>
93             <field name="type">form</field>
94             <field name="inherit_id" ref="base.view_partner_bank_form"/>
95             <field name="arch" type="xml">
96                 <field name="partner_id" position="replace">
97                     <field name="partner_id" invisible="context.get('display_partner', False)"/>
98                 </field>
99             </field>
100         </record>
101         
102         <record id="hr_contract.hr_hr_employee_view_form2" model="ir.ui.view">
103             <field name="name">hr.hr.employee.view.form2</field>
104             <field name="model">hr.employee</field>
105             <field name="inherit_id" ref="hr.view_employee_form"/>
106             <field name="arch" type="xml">
107             <data>
108                 <xpath expr="/form/notebook/page[@string='Personal Information']" position="after">
109                     <page string="Miscellaneous">
110                         <group colspan="2" col="2">
111                             <separator string="Personal Info" colspan="2"/>
112                             <field name="bank_account_id" context="{'display_partner':True, 'partner_id':partner_id}"/>
113                             <field name="place_of_birth"/>
114                             <field name="children"/>
115                         </group>
116                         <group colspan="2" col="2">
117                             <separator string="Job Info" colspan="2"/>
118                             <field name="manager" select="1"/>
119                             <field name="vehicle" select="1"/>
120                             <field name="vehicle_distance" select="1"/>
121                             <field name="medic_exam" select="1" string="Medical Examination"/>
122                         </group>
123                     </page>
124                     <page string="Contracts" groups="base.group_extended">
125                         <field colspan="4" mode="form,tree" name="contract_ids" nolabel="1">
126                             <tree string="Contracts">
127                                 <field name="name"/>
128                                 <field name="job_id"/>
129                                 <field name="date_start"/>
130                                 <field name="date_end"/>
131                                 <field name="working_hours"/>
132                                 <field name="wage_type_id"/>
133                                 <field name="wage"/>
134                             </tree>
135                             <form string="Contracts">
136                                 <group colspan="4" col="6">
137                                     <field name="name" select="1"/>
138                                     <field name="job_id"/>
139                                     <newline/>
140                                     <field name="wage"/>
141                                     <field name="wage_type_id" widget="selection"/>
142                                     <field name="type_id" widget="selection"/>
143                                 </group>
144                                 <notebook colspan="4">
145                                     <page string="Contract Details">
146                                         <group col="2" colspan="2">
147                                             <separator colspan="2" string="Duration"/>
148                                             <field name="date_start" select="1"/>
149                                             <field name="date_end" select="1"/>
150                                             <field name="working_hours"/>
151                                         </group>
152                                         <group col="2" colspan="2">
153                                             <separator colspan="2" string="Advantages"/>
154                                             <field name="struct_id" select="1"/>
155                                             <field name="advantages_net"/>
156                                             <field name="advantages_gross"/>
157                                             <field name="advantages" nolabel="1" colspan="2"/>
158                                         </group>
159                                     </page>
160                                     <page string="Work Permit">
161                                         <group col="2" colspan="2">
162                                             <separator colspan="2" string="Passport"/>
163                                             <field name="passport_id" domain="[('employee_id','=',parent.id)]"/>
164                                         </group>
165                                         <group col="2" colspan="2">
166                                             <separator colspan="2" string="Valid for"/>
167                                             <field name="visa_no" attrs="{'required': [('passport_id','!=',False), ]}"/>
168                                             <field name="permit_no" attrs="{'required': [('passport_id','!=',False), ]}"/>
169                                             <field name="visa_expire" attrs="{'required': [('passport_id','!=',False), ]}"/>
170                                         </group>
171                                     </page>
172                                     <separator colspan="4" string="Notes"/>
173                                     <field colspan="4" name="notes" nolabel="1"/>
174                                 </notebook>
175                             </form>
176                         </field>
177                     </page>
178                 </xpath>
179                 <xpath expr="/form/notebook/page[@string='Notes']" position="before">
180                     <page string="Salary Structure" groups="base.group_extended">
181                         <group col="10" colspan="4">
182                             <separator string="Salary Computation" colspan="10"/>
183                             <field name="basic"/>
184                             <field name="advantages_gross"/>
185                             <field name="gross"/>
186                             <field name="advantages_net"/>
187                             <field name="net"/>
188                         </group>
189                         <separator string="Employee specific allowances and deductions" colspan="4"/>
190                         <field name="line_ids" nolabel="1" colspan="4" string="Salary Structure">
191                             <tree string="Salary Structure" editable="bottom">
192                                 <field name="category_id" on_change="onchange_category(category_id)"/>
193                                 <field name="sequence" groups="base.group_extended"/>
194                                 <field name="name"/>
195                                 <field name="code"/>
196                                 <field name="type"/>
197                                 <field name="amount_type"/>
198                                 <field name="amount" on_change="onchange_amount(amount, amount_type)"/>
199                             </tree>
200                         </field>
201                     </page>
202                 </xpath>
203             </data>
204             </field>
205         </record>
206         <record id="view_employee_passport_form" model="ir.ui.view">
207             <field name="name">hr.employee.passport.form</field>
208             <field name="model">hr.employee</field>
209             <field name="type">form</field>
210             <field name="inherit_id" ref="hr.view_employee_form"/>
211             <field name="arch" type="xml">
212                 <field name="passport_id" position="replace">
213                     <field name="passport_id"/>
214                     <field name="otherid"/>
215                 </field>
216             </field>
217         </record>
218         
219         <!-- End Employee View -->
220         
221         <!-- Contract View -->
222         <record id="hr_contract.hr_contract_view_form" model="ir.ui.view">
223             <field name="name">hr.contract.view.form</field>
224             <field name="model">hr.contract</field>
225             <field name="type">form</field>
226             <field name="arch" type="xml">
227                 <form string="Contract">
228                     <group colspan="4" col="6">
229                         <field name="name" select="1"/>
230                         <field name="employee_id" select="1"/>
231                         <field name="job_id"/>
232                         <field name="wage"/>
233                         <field name="wage_type_id" widget="selection"/>
234                         <field name="type_id" widget="selection"/>
235                     </group>
236                     <notebook colspan="4">
237                         <page string="Main Data">
238                             <group col="2" colspan="2">
239                                 <separator colspan="2" string="Duration"/>
240                                 <field name="date_start" select="1"/>
241                                 <field name="date_end" select="1"/>
242                                 <field name="working_hours"/>
243                                 <field name="working_days_per_week" select="1"/>
244                                 <separator colspan="2" string="Trial Period"/>
245                                 <field name="trial_date_start" />
246                                 <field name="trial_date_end" />
247                             </group>
248                             <group col="2" colspan="2">
249                                 <separator colspan="2" string="Advantages"/>
250                                 <field name="struct_id" select="1"/>
251                                 <field name="advantages_gross"/>
252                                 <field name="advantages_net"/>
253                                 <field name="advantages" nolabel="1" colspan="2"/>
254                             </group>
255                         </page>
256                         <page string="Work Permit">
257                             <group col="2" colspan="2">
258                                 <separator colspan="2" string="Passport"/>
259                                 <field name="passport_id" domain="[('employee_id','=',employee_id)]"/>
260                             </group>
261                             <group col="2" colspan="2">
262                                 <separator colspan="2" string="Valid for"/>
263                                 <field name="visa_no" attrs="{'required': [('passport_id','!=',False), ]}"/>
264                                 <field name="permit_no" attrs="{'required': [('passport_id','!=',False), ]}"/>
265                                 <field name="visa_expire" attrs="{'required': [('passport_id','!=',False), ]}"/>
266                             </group>
267                         </page>
268                     </notebook>
269                     <separator colspan="4" string="Notes"/>
270                     <field colspan="4" name="notes" nolabel="1"/>
271                 </form>
272             </field>
273         </record>
274         <!--menuitem action="hr_contract.action_hr_contract" id="hr_menu_contract" parent="payroll_configure" name="Contracts" sequence="4"/-->
275         <!-- End Contract View-->
276
277         <!-- Salary structure -->
278         <record id="view_hr_employee_grade_tree" model="ir.ui.view">
279             <field name="name">hr.payroll.structure.tree</field>
280             <field name="model">hr.payroll.structure</field>
281             <field name="type">tree</field>
282             <field name="arch" type="xml">
283                 <tree string="Employee Function">
284                     <field name="name"/>
285                     <field name="code"/>
286                     <field name="line_ids"/>
287                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
288                 </tree>
289             </field>
290         </record>
291
292         <record id="view_hr_employee_grade_form" model="ir.ui.view">
293             <field name="name">hr.payroll.structure.form</field>
294             <field name="model">hr.payroll.structure</field>
295             <field name="type">form</field>
296             <field name="arch" type="xml">
297                 <form string="Employee Function">
298                     <group col="6" colspan="4">
299                         <field name="name" colspan="4" select="1"/>
300                         <field name="code" select="1"/>
301                         <field name="company_id" groups="base.group_multi_company" widget="selection"/>
302                     </group>
303                     <notebook colspan="4">
304                         <page string="Salary Structure">
305                             <field name="line_ids" nolabel="1" colspan="4"/>
306                         </page>
307                     </notebook>
308                 </form>
309             </field>
310         </record>
311
312         <record id="action_view_hr_employee_grade_form" model="ir.actions.act_window">
313             <field name="name">Salary Structure</field>
314             <field name="res_model">hr.payroll.structure</field>
315             <field name="view_type">form</field>
316             <field name="view_id" ref="view_hr_employee_grade_tree"/>
317         </record>
318         <menuitem
319             id="menu_hr_employee_function"
320             action="action_view_hr_employee_grade_form"
321             parent="payroll_configure"
322         />
323         <!-- End Salary structure -->
324
325         <!-- Holiday Status -->
326         <record model="ir.ui.view" id="view_holiday_status_form1">
327             <field name="name">hr.holidays.status.inherit</field>
328             <field name="model">hr.holidays.status</field>
329             <field name="inherit_id" ref="hr_holidays.edit_holiday_status_form"/>
330             <field name="type">form</field>
331             <field name="arch" type="xml">
332                 <field name="double_validation" position="replace">
333                     <group col="2" colspan="2">
334                         <separator colspan="4" string="Payroll Configurtion"/>
335                         <field name="type"/>
336                         <field name="head_id"/>
337                         <field name="company_id" groups="base.group_multi_company" widget="selection" select="2"/>
338                         <field name="code" readonly="True"/>
339                     </group>
340                     <group col="2" colspan="2">
341                         <separator colspan="4" string="Validation"/>
342                         <field name="double_validation"/>
343                     </group>
344                 </field>
345             </field>
346         </record>
347         <!-- End Holiday Status -->
348
349         <!-- Payslip Line -->
350         <record id="view_hr_payslip_line_tree" model="ir.ui.view">
351             <field name="name">hr.payslip.line.tree</field>
352             <field name="model">hr.payslip.line</field>
353             <field name="type">tree</field>
354             <field name="arch" type="xml">
355                 <tree string="Salary Structure" editable="bottom">
356                     <field name="category_id" on_change="onchange_category(category_id)"/>
357                     <field name="sequence" groups="base.group_extended"/>
358                     <field name="name"/>
359                     <field name="code"/>
360                     <field name="type"/>
361                     <field name="amount_type"/>
362                     <field name="amount" on_change="onchange_amount(amount, amount_type)"/>
363                 </tree>
364             </field>
365         </record>
366         <record id="view_hr_payslip_line_form" model="ir.ui.view">
367             <field name="name">hr.payslip.line.form</field>
368             <field name="model">hr.payslip.line</field>
369             <field name="type">form</field>
370             <field name="arch" type="xml">
371                 <form string="Payslip Line">
372                     <group col="6" colspan="4">
373                         <field name="name" colspan="4" select="1"/>
374                         <field name="code" select="1"/>
375                         <field name="slip_id" select="1"/>
376                         <field name="employee_id"/>
377                         <field name="function_id"/>
378                     </group>
379                     <group col="2" colspan="2">
380                         <separator colspan="4" string="Calculations"/>
381                         <field name="category_id" on_change="onchange_category(category_id)"/>
382                         <field name="type"/>
383                         <field name="amount_type"/>
384                         <field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','func')]}"/>
385                         <field name="sequence" groups="base.group_extended"/>
386                     </group>
387                     <group col="2" colspan="2">
388                         <separator colspan="4" string="Company contribution"/>
389                         <field name="company_contrib"/>
390                     </group>
391                     <notebook colspan="4">
392                         <page string="Function">
393                             <field name="line_ids" colspan="4" nolabel="1" attrs="{'readonly':[('amount_type','!=','func')]}">
394                                 <tree string="Function Arguments" editable="bottom">
395                                     <field name="name"/>
396                                     <field name="sequence" groups="base.group_extended"/>
397                                     <field name="from_val"/>
398                                     <field name="to_val"/>
399                                     <field name="amount_type"/>
400                                     <field name="value"/>
401                                 </tree>
402                             </field>
403                         </page>
404                         <page string="Description">
405                             <separator colspan="4" string="Description"/>
406                             <field name="note" colspan="4" nolabel="1"/>
407                         </page>
408                     </notebook>
409                 </form>
410             </field>
411         </record>
412
413         <record id="view_hr_payslip_tree" model="ir.ui.view">
414             <field name="name">hr.payslip.tree</field>
415             <field name="model">hr.payslip</field>
416             <field name="type">tree</field>
417             <field name="arch" type="xml">
418                 <tree colors="blue:state in ('confirm','hr_check','accont_check');black:state in ('new');gray:state in('cancel')" string="Payslip">
419                     <field name="number"/>
420                     <field name="employee_id"/>
421                     <field name="register_id" invisible="1"/>
422                     <field name="name"/>
423                     <field name="date"/>
424                     <field name="grows"/>
425                     <field name="net"/>
426                     <field name="state"/>
427                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
428                 </tree>
429             </field>
430         </record>
431
432         <record id="view_hr_payslip_form" model="ir.ui.view">
433             <field name="name">hr.payslip.form</field>
434             <field name="model">hr.payslip</field>
435             <field name="type">form</field>
436             <field name="arch" type="xml">
437                 <form string="Payslip">
438                     <group col="6" colspan="4">
439                         <field name="employee_id"/>
440                         <field name="name"/>
441                         <field name="number" select="1"/>
442                         <field name="date"/>
443                     </group>
444                     <notebook colspan="4">
445                         <page string="Salary Computation">
446                             <field name="line_ids" colspan="4" nolabel="1">
447                                 <tree string="Salary Structure" editable="bottom">
448                                     <field name="category_id" on_change="onchange_category(category_id)"/>
449                                     <field name="sequence" groups="base.group_extended"/>
450                                     <field name="name"/>
451                                     <field name="code"/>
452                                     <field name="type"/>
453                                     <field name="amount_type"/>
454                                     <field name="amount" on_change="onchange_amount(amount, amount_type)"/>
455                                     <field name="total"/>
456                                 </tree>
457                             </field>
458                             <group col="6" colspan="4">
459                                 <separator string="Computation Overview" colspan="6"/>
460                                 <field name="working_days"/>
461                                 <field name="holiday_days"/>
462                                 <field name="worked_days"/>
463                                 <field name="basic_before_leaves"/>
464                                 <field name="leaves"/>
465                                 <field name="basic"/>
466                                 <field name="allounce"/>
467                                 <field name="deduction"/>
468                                 <field name="other_pay"/>
469                                 <field name="grows"/>
470                                 <field name="net"/>
471                                 <field name="total_pay"/>
472                             </group>
473                         </page>
474                         <page string="Other Informations">
475                             <group col="2" colspan="1">
476                                 <separator colspan="2" string="Other Informations"/>
477                                 <field name="paid" readonly="1"/>
478                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
479                                 <field name="register_id" groups="base.group_extended"/>
480                                 <field name="deg_id" groups="base.group_extended"/>
481                                 <field name="contract_id" groups="base.group_extended" domain="[('employee_id','=',employee_id)]"/>
482                             </group>
483                             <newline/>
484                             <separator colspan="4" string="Description"/>
485                             <field name="note" colspan="4" nolabel="1"/>
486                         </page>
487                     </notebook>
488                     <group col="10" colspan="4">
489                         <field name="state"/>
490                         <button string="Cancel" icon="terp-dialog-close" name="cancel_sheet" states="draft,hr_check,confirm"/>
491                         <button string="Compute Sheet" icon="terp-stock_format-scientific" name="compute_sheet" states="new"/>
492                         <button string="Recompute Sheet" icon="terp-stock_format-scientific" name="compute_sheet" type="object" states="draft"/>
493                         <button string="Verify Sheet" icon="terp-camera_test" name="verify_sheet" states="draft"/>
494                         <button string="Approve Sheet" icon="terp-camera_test" name="final_verify_sheet" states="hr_check"/>
495                         <button string="Pay Salary" icon="terp-dolar_ok!" name="process_sheet" states="confirm"/>
496                         <button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="set_to_draft" states="cancel"/>
497                     </group>
498                 </form>
499             </field>
500         </record>
501         <record id="view_hr_payslip_filter" model="ir.ui.view">
502             <field name="name">hr.payslip.select</field>
503             <field name="model">hr.payslip</field>
504             <field name="type">search</field>
505             <field name="arch" type="xml">
506                 <search string="Search Payslips">
507                     <group col="8" colspan="4">
508                         <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Slip"/>
509                         <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Slip"/>
510                         <separator orientation="vertical"/>
511                         <filter icon="terp-dolar_ok!" string="Paid" domain="[('state','=','done'),('paid','=',True)]" help="Paid Slip"/>
512                         <separator orientation="vertical"/>
513                         <field name="name"/>
514                         <field name="employee_id"/>
515                         <field name="number"/>
516                         <field name="date"/>
517                     </group>
518                     <newline/>
519                     <group col="8" colspan="4" expand="0" string="Group By...">
520                         <filter string="Employees" icon="terp-personal" name="employee_id" context="{'group_by':'employee_id'}"/>
521                         <separator orientation="vertical"/>
522                         <filter string="Register" icon="terp-folder-yellow" name="register_id" context="{'group_by':'register_id'}"/>
523                         <separator orientation="vertical"/>
524                         <filter string="Companies" name="company_id"  icon="terp-go-home" context="{'group_by':'company_id'}"/>
525                         <separator orientation="vertical"/>
526                         <filter string="States" name="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
527                     </group>
528                 </search>
529             </field>
530         </record>
531         <record id="action_view_hr_payslip_form" model="ir.actions.act_window">
532             <field name="name">Employee Payslip</field>
533             <field name="res_model">hr.payslip</field>
534             <field name="view_type">form</field>
535             <field name="view_id" ref="view_hr_payslip_tree"/>
536             <field name="search_view_id" ref="view_hr_payslip_filter"/>
537         </record>
538         <menuitem action="action_view_hr_payslip_form" id="menu_department_tree" parent="menu_hr_root_payroll"/>
539
540         <!-- Payment Heads -->
541         <record id="hr_allounce_deduction_categoty_form" model="ir.ui.view">
542             <field name="name">hr.allounce.deduction.categoty.form</field>
543             <field name="model">hr.allounce.deduction.categoty</field>
544             <field name="type">form</field>
545             <field name="arch" type="xml">
546                 <form string="Salary Heads">
547                     <group col="6" colspan="6">
548                         <field name="name" select="1"/>
549                         <field name="code" select="1"/>
550                         <field name="type" select="1"/>
551                         <group col="2" colspan="4">
552                             <separator colspan="4" string="Based on"/>
553                             <field name="base" colspan="4" nolabel="1"/>
554                         </group>
555                         <group col="2" colspan="2">
556                             <separator colspan="4" string="Dynamic Computation"/>
557                             <field name="condition"/>
558                             <field name="sequence"/>
559                         </group>
560                     </group>
561                     <notebook colspan="4">
562                         <page string="Description">
563                             <field name="note" colspan="4" nolabel="1"/>
564                         </page>
565                         <page string="Contribution">
566                             <field name="contribute_ids" colspan="4" nolabel="1" height="300">
567                                 <form string="Company Contribution">
568                                     <group col="6" colspan="6">
569                                         <field name="name" select="1"/>
570                                         <field name="code" select="1"/>
571                                     </group>
572                                     <group col="2" colspan="2">
573                                         <separator colspan="2" string="Contributions"/>
574                                         <field name="amount_type" attrs="{'required': [('contribute','=',True)]}"/>
575                                         <field name="contribute_per" attrs="{'required': [('contribute','=',True)], 'readonly':[(('amount_type','=','func'))]}"/>
576                                         <field name="register_id" attrs="{'required': [('contribute','=',True)]}"/>
577                                     </group>
578                                     <group col="2" colspan="2">
579                                         <separator colspan="2" string="Other Information"/>
580                                         <field name="company_id" groups="base.group_multi_company" widget="selection" select="1"/>
581                                         <field name="active" select="1"/>
582                                     </group>
583                                     <notebook colspan="4">
584                                         <page string="Function" attrs="{'readonly': [('amount_type','!=','func')]}">
585                                             <field name="line_ids" colspan="4" nolabel="1">
586                                                 <tree string="Function Arguments" editable="bottom">
587                                                     <field name="name"/>
588                                                     <field name="sequence"/>
589                                                     <field name="from_val"/>
590                                                     <field name="to_val"/>
591                                                     <field name="amount_type"/>
592                                                     <field name="value"/>
593                                                 </tree>
594                                             </field>
595                                         </page>
596                                         <page string="Description">
597                                             <field name="note" colspan="4" nolabel="1"/>
598                                         </page>
599                                     </notebook>
600                                 </form>
601                             </field>
602                         </page>
603                     </notebook>
604                 </form>
605             </field>
606         </record>
607         <record id="hr_allounce_deduction_categoty_tree" model="ir.ui.view">
608             <field name="name">hr.allounce.deduction.categoty.tree</field>
609             <field name="model">hr.allounce.deduction.categoty</field>
610             <field name="type">tree</field>
611             <field name="arch" type="xml">
612                 <tree string="Salary Heads">
613                     <field name="name"/>
614                     <field name="code"/>
615                     <field name="type"/>
616                     <field name="base"/>
617                     <field name="condition"/>
618                     <field name="sequence"/>
619                 </tree>
620             </field>
621         </record>
622
623         <record id="view_allounce_deduction_categoty_filter" model="ir.ui.view">
624             <field name="name">hr.allounce.deduction.categoty.select</field>
625             <field name="model">hr.allounce.deduction.categoty</field>
626             <field name="type">search</field>
627             <field name="arch" type="xml">
628                 <search string="Salary Heads">
629                     <filter icon="terp-document-new" string="Allowance" domain="[('type','=','allowance')]"/>
630                     <filter icon="terp-check" string="Deduction" domain="[('type','=','deduction')]"/>
631                     <separator orientation="vertical"/>
632                     <field name="name" select="1"/>
633                      <field name="code" select="1"/>
634                     <field name="type"/>
635                     <newline/>
636                     <group expand="0" string="Group By..." colspan="4" col="4" groups="base.group_extended">
637                         <filter string="Based" icon="terp-go-month" domain="[]" context="{'group_by':'base'}"/>
638                         <filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
639                     </group>
640                </search>
641             </field>
642         </record>
643
644         <record id="hr_allounce_deduction_tree" model="ir.actions.act_window">
645             <field name="name">Salary Heads</field>
646             <field name="res_model">hr.allounce.deduction.categoty</field>
647             <field name="view_type">form</field>
648             <field name="view_id" ref="hr_allounce_deduction_categoty_tree"/>
649            <field name="search_view_id" ref="view_allounce_deduction_categoty_filter"/>
650         </record>
651         <menuitem
652             id="menu_hr_allounce_deduction_tree"
653             action="hr_allounce_deduction_tree"
654             parent="payroll_configure"
655         />
656         <!-- End Payment Heads -->
657
658         <!-- Company Contribution -->
659         <record id="hr_company_contribution_form" model="ir.ui.view">
660             <field name="name">company.contribution.form</field>
661             <field name="model">company.contribution</field>
662             <field name="type">form</field>
663             <field name="arch" type="xml">
664                 <form string="Company Contribution">
665                     <group col="6" colspan="6">
666                         <field name="name" select="1"/>
667                         <field name="code" select="1"/>
668                         <field name="category_id"/>
669                     </group>
670                     <group col="2" colspan="2">
671                         <separator colspan="2" string="Contributions"/>
672                         <field name="amount_type" attrs="{'required': [('contribute','=',True)]}"/>
673                         <field name="contribute_per" attrs="{'required': [('contribute','=',True)], 'readonly':[(('amount_type','=','func'))]}"/>
674                         <field name="register_id" attrs="{'required': [('contribute','=',True)]}"/>
675                     </group>
676                     <group col="2" colspan="2">
677                         <separator colspan="2" string="Other Information"/>
678                         <field name="company_id" groups="base.group_multi_company" widget="selection" select="1"/>
679                         <field name="active" select="1"/>
680                     </group>
681                     <notebook colspan="4">
682                         <page string="Function" attrs="{'readonly': [('amount_type','!=','func')]}">
683                             <field name="line_ids" colspan="4" nolabel="1">
684                                 <tree string="Function Arguments" editable="bottom">
685                                     <field name="name"/>
686                                     <field name="sequence"/>
687                                     <field name="from_val"/>
688                                     <field name="to_val"/>
689                                     <field name="amount_type"/>
690                                     <field name="value"/>
691                                 </tree>
692                             </field>
693                         </page>
694                         <page string="Description">
695                             <field name="note" colspan="4" nolabel="1"/>
696                         </page>
697                     </notebook>
698                 </form>
699             </field>
700         </record>
701         <record id="hr_company_contribution_tree" model="ir.ui.view">
702             <field name="name">company.contribution.tree</field>
703             <field name="model">company.contribution</field>
704             <field name="type">tree</field>
705             <field name="arch" type="xml">
706                 <tree string="Company Contribution">
707                     <field name="name"/>
708                     <field name="code"/>
709                     <field name="contribute_per"/>
710                     <field name="amount_type"/>
711                     <field name="register_id"/>
712                      <field name="category_id"/>
713                 </tree>
714             </field>
715         </record>
716
717         <record id="view_hr_company_contribution_filter" model="ir.ui.view">
718             <field name="name">company.contribution.select</field>
719              <field name="model">company.contribution</field>
720             <field name="type">search</field>
721              <field name="arch" type="xml">
722                 <search string="Search Company Contribution">
723                     <group col="8" colspan="4">
724                         <filter icon="terp-document-new" string="Fixed Amount" domain="[('amount_type','=','fix')]" help="Draft Slip"/>
725                         <filter icon="terp-camera_test" string="Function Calculation" domain="[('amount_type','=','func')]" help="Posted Slip"/>
726                         <separator orientation="vertical"/>
727                         <field name="name"/>
728                         <field name="code"/>
729                         <field name="contribute_per"/>
730                         <field name="register_id"/>
731                     </group>
732                     <newline/>
733                     <group col="8" colspan="4" expand="0" string="Group By...">
734                         <filter string="Type" icon="terp-partner" name="amount_type" context="{'group_by':'amount_type'}"/>
735                         <filter string="Category" name="category_id" icon="terp-go-month"  context="{'group_by':'category_id'}"/>
736                     </group>
737                 </search>
738             </field>
739         </record>
740         <record id="action_hr_company_contribution_tree" model="ir.actions.act_window">
741             <field name="name">Company Contributions</field>
742             <field name="res_model">company.contribution</field>
743             <field name="view_type">form</field>
744             <field name="view_id" ref="hr_company_contribution_tree"/>
745              <field name="search_view_id" ref="view_hr_company_contribution_filter"/>
746         </record>
747         <menuitem
748             id="menu_hr_company_contribution_tree"
749             action="action_hr_company_contribution_tree"
750             parent="payroll_configure"
751         />
752         <!-- End Company Contribution -->
753
754         <record id="view_hr_bank_advice_tree" model="ir.ui.view">
755             <field name="name">hr.payroll.advice.tree</field>
756             <field name="model">hr.payroll.advice</field>
757             <field name="type">tree</field>
758             <field name="arch" type="xml">
759                 <tree string="Bank Advice">
760                     <field name="number" select="1"/>
761                     <field name="name" select="1"/>
762                     <field name="date" select="1"/>
763                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
764                 </tree>
765             </field>
766         </record>
767
768         <record id="view_hr_bank_advice_form" model="ir.ui.view">
769             <field name="name">hr.payroll.advice.form</field>
770             <field name="model">hr.payroll.advice</field>
771             <field name="type">form</field>
772             <field name="arch" type="xml">
773                 <form string="Bank Advice">
774                     <group col="6" colspan="4">
775                         <field name="name" colspan="4" select="1"/>
776                         <field name="number" select="1"/>
777                         <field name="register_id"/>
778                         <field name="bank_id"/>
779                     </group>
780                     <notebook colspan="4">
781                         <page string="Paymeny Lines">
782                             <field name="line_ids" colspan="4" nolabel="1">
783                                 <tree string="Payment Lines" editable="bottom">
784                                     <field name="employee_id" on_change="onchange_employee_id(parent.date, employee_id)"/>
785                                     <field name="name"/>
786                                     <field name="amount"/>
787                                     <field name="bysal"/>
788                                     <field name="flag"/>
789                                 </tree>
790                             </field>
791                         </page>
792                         <page string="Letter Content">
793                             <group colspan="4" col="6">
794                               <field name="company_id" on_change="onchange_company_id(company_id)" groups="base.group_multi_company" widget="selection"/>
795                               <field name="chaque_nos"/>
796                               <field name="date" select="1"/>
797                             </group>
798                             <separator colspan="4" string="Letter Details"/>
799                             <field name="note" colspan="4" nolabel="1"/>
800                         </page>
801                     </notebook>
802                     <group col="6" colspan="6">
803                         <field name="state"/>
804                         <button name="confirm_sheet"  icon="gtk-apply" string="Confirm Sheet" states="draft" type="object"/>
805                         <button name="set_to_draft" string="Set to Draft"  icon="gtk-convert"  states="cancel,confirm" type="object"/>
806                         <button name="cancel_sheet" string="Cancel Sheet" states="draft" icon="gtk-cancel"  type="object"/>
807                     </group>
808                 </form>
809             </field>
810         </record>
811         <record id="action_view_hr_bank_advice_tree" model="ir.actions.act_window">
812             <field name="name">Payment Advice</field>
813             <field name="res_model">hr.payroll.advice</field>
814             <field name="view_type">form</field>
815             <field name="view_mode">tree,form</field>
816             <field name="view_id" ref="view_hr_bank_advice_tree"/>
817         </record>
818         <menuitem
819             action="action_view_hr_bank_advice_tree"
820             id="hr_menu_payment_advice"
821             parent="menu_hr_root_payroll"
822         />
823
824         <record id="view_hr_payroll_register_tree" model="ir.ui.view">
825             <field name="name">hr.payroll.register.tree</field>
826             <field name="model">hr.payroll.register</field>
827             <field name="type">tree</field>
828             <field name="arch" type="xml">
829                 <tree  colors="blue:state in ('draft');black:state in ('confirm','new','hr_check','accont_check');gray:state in('done','cancel')" string="Payroll Register">
830                     <field name="number"/>
831                     <field name="name"/>
832                     <field name="date"/>
833                     <field name="state"/>
834                 </tree>
835             </field>
836         </record>
837         <record id="view_hr_payroll_register_form" model="ir.ui.view">
838             <field name="name">hr.payroll.register.form</field>
839             <field name="model">hr.payroll.register</field>
840             <field name="type">form</field>
841             <field name="arch" type="xml">
842                 <form string="Payroll Register">
843                     <group col="6" colspan="4">
844                         <field name="name" colspan="4" select="1"/>
845                         <field name="number" select="1"/>
846                         <field name="bank_id"/>
847                         <field name="date" select="1"/>
848                     </group>
849                     <notebook colspan="4">
850                         <page string="Payslips">
851                             <field name="line_ids" colspan="4" nolabel="1">
852                                 <tree colors="blue:state in ('draft');black:state in ('confirm','new','hr_check','accont_check');gray:state in('done','cancel')" string="Payslip">
853                                     <field name="number"/>
854                                     <field name="employee_id"/>
855                                     <field name="name"/>
856                                     <field name="date"/>
857                                     <field name="basic"/>
858                                     <field name="allounce"/>
859                                     <field name="grows"/>
860                                     <field name="deduction"/>
861                                     <field name="net"/>
862                                     <field name="state"/>
863                                 </tree>
864                             </field>
865                             <group col="2" colspan="2">
866                                 <separator colspan="4" string="Allowance / Deduction"/>
867                                 <field name="allounce"/>
868                                 <field name="deduction"/>
869                             </group>
870                             <group col="2" colspan="2">
871                                 <separator colspan="4" string="Salary Information"/>
872                                 <field name="grows"/>
873                                 <field name="net"/>
874                             </group>
875                         </page>
876                     </notebook>
877                     <group col="8" colspan="4">
878                         <field name="state"/>
879                         <button string="Compute" name="compute_sheet" states="new" icon="terp-document-new" type="object"/>
880                         <button string="Verify Sheet" icon="gtk-ok" name="verify_sheet" states="draft" type="object"/>
881                         <button string="Complete HR Checking"  icon="gtk-apply" name="final_verify_sheet" type="object" states="hr_check"/>
882                         <button string="Pay Salary" icon="gtk-apply"  name="process_sheet" states="confirm" type="object" />
883                         <button string="Cancel" name="cancel_sheet" icon="gtk-cancel" states="draft,hr_check,accont_check,confirm" type="object"/>
884                         <button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" />
885                     </group>
886                 </form>
887             </field>
888         </record>
889         <record id="action_view_hr_payroll_register_form" model="ir.actions.act_window">
890             <field name="name">Payroll Register</field>
891             <field name="res_model">hr.payroll.register</field>
892             <field name="view_type">form</field>
893             <field name="view_mode">tree,form</field>
894         </record>
895         <menuitem
896             action="action_view_hr_payroll_register_form"
897             id="hr_menu_payroll_register"
898             parent="menu_hr_root_payroll"
899         />
900
901         <!--
902         Contribution Register
903         -->
904         <record id="hr_contibution_register_tree" model="ir.ui.view">
905             <field name="name">hr.contibution.register.tree</field>
906             <field name="model">hr.contibution.register</field>
907             <field name="type">tree</field>
908             <field name="arch" type="xml">
909                 <tree string="Contribution Registers">
910                     <field name="name" select="1"/>
911                     <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
912                     <field name="monthly_total_by_emp"/>
913                     <field name="monthly_total_by_comp"/>
914                 </tree>
915             </field>
916         </record>
917         <record id="hr_contibution_register_form" model="ir.ui.view">
918             <field name="name">hr.contibution.register.form</field>
919             <field name="model">hr.contibution.register</field>
920             <field name="type">form</field>
921             <field name="arch" type="xml">
922                 <form string="Contribution">
923                     <field name="name" select="1"/>
924                     <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
925                     <notebook colspan="4">
926                         <page string="Contribution Lines">
927                             <field colspan="4" name="register_line_ids" nolabel="1" select="1">
928                                 <tree string="Register Lines" editable="top">
929                                     <field name="code"/>
930                                     <field name="name"/>
931                                     <field name="employee_id"/>
932                                     <field name="emp_deduction"/>
933                                     <field name="comp_deduction"/>
934                                     <field name="total"/>
935                                 </tree>
936                              </field>
937                          </page>
938                          <page string="Description">
939                             <separator colspan="4" string="Description"/>
940                             <field name="note" colspan="4" nolabel="1"/>
941                         </page>
942                     </notebook>
943                     <group col="2" colspan="2">
944                         <separator colspan="2" string="Month"/>
945                         <field name="monthly_total_by_emp"/>
946                         <field name="monthly_total_by_comp"/>
947                     </group>
948                 </form>
949             </field>
950         </record>
951         <record id="action_contibution_register_form" model="ir.actions.act_window">
952             <field name="name">Contibution Register</field>
953             <field name="res_model">hr.contibution.register</field>
954             <field name="view_type">form</field>
955             <field name="view_id" ref="hr_contibution_register_tree"/>
956         </record>
957         <menuitem
958             id="menu_action_hr_contibution_register_form"
959             action="action_contibution_register_form"
960             parent="payroll_configure"
961         />
962         <record id="hr_contibution_register_line_form" model="ir.ui.view">
963             <field name="name">hr.contibution.register.line.form</field>
964             <field name="model">hr.contibution.register.line</field>
965             <field name="type">form</field>
966             <field name="arch" type="xml">
967                 <form string="Contribution">
968                       <field name="name"/>
969                       <field name="code"/>
970                       <field name="employee_id"/>
971                       <field name="emp_deduction"/>
972                       <field name="comp_deduction"/>
973                       <field name="total"/>
974                 </form>
975             </field>
976         </record>
977         
978         <!--  Shortcuts -->
979         <act_window name="Payslips"
980             domain="[('employee_id', '=', active_id)]"
981             res_model="hr.payslip"
982             src_model="hr.employee"
983             view_id ="eval('view_hr_payslip_tree')"
984             id="act_hr_employee_payslip_list"/>
985     </data>
986 </openerp>
987