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