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