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