views: fix xml records using <act_window view_id=... />
[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 colspan="2">
407                                                         <separator string="Validation" colspan="2"/>
408                                                                 <newline/>
409                                                         <field name="active" />
410                                                                 <newline/>                                                      
411                                                         <field name="double_validation"/>
412                                                                 <newline/>
413                                                         <field name="limit"/>
414                                 </group>
415                                 <group colspan="2">                                             
416                                         <separator colspan="2" string="Payroll Configurtion"/><newline/>
417                                         <field name="type"/><newline/>
418                                         <field name="head_id"/><newline/>
419                                         <field name="company_id" groups="base.group_multi_company" widget="selection" select="2"/><newline/>
420                                         <field name="code" readonly="True"/>
421                                 </group>
422                         </xpath>
423         </field>
424         </record>
425         <!-- End Holiday Status -->
426
427         <!-- Payslip Line -->
428         <record id="view_hr_payslip_line_tree" model="ir.ui.view">
429             <field name="name">hr.payslip.line.tree</field>
430             <field name="model">hr.payslip.line</field>
431             <field name="type">tree</field>
432             <field name="arch" type="xml">
433                 <tree string="Salary Structure" editable="bottom">
434                     <field name="category_id" on_change="onchange_category(category_id)"/>
435                     <field name="sequence" groups="base.group_extended"/>
436                     <field name="name"/>
437                     <field name="code"/>
438                     <field name="type"/>
439                     <field name="amount_type"/>
440                     <field name="amount" on_change="onchange_amount(amount, amount_type)"/>
441                 </tree>
442             </field>
443         </record>
444         <record id="view_hr_payslip_line_form" model="ir.ui.view">
445             <field name="name">hr.payslip.line.form</field>
446             <field name="model">hr.payslip.line</field>
447             <field name="type">form</field>
448             <field name="arch" type="xml">
449                 <form string="Payslip Line">
450                     <group col="6" colspan="4">
451                         <field name="name" colspan="4" select="1"/>
452                         <field name="code" select="1"/>
453                         <field name="slip_id" select="1"/>
454                         <field name="employee_id"/>
455                         <field name="function_id"/>
456                     </group>
457                     <group col="2" colspan="2">
458                         <separator colspan="4" string="Calculations"/>
459                         <field name="category_id" on_change="onchange_category(category_id)"/>
460                         <field name="type"/>
461                         <field name="amount_type"/>
462                         <field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','func')]}"/>
463                         <field name="sequence" groups="base.group_extended"/>
464                     </group>
465                     <group col="2" colspan="2">
466                         <separator colspan="4" string="Company contribution"/>
467                         <field name="company_contrib"/>
468                     </group>
469                     <notebook colspan="4">
470                         <page string="Function">
471                             <field name="line_ids" colspan="4" nolabel="1" attrs="{'readonly':[('amount_type','!=','func')]}">
472                                 <tree string="Function Arguments" editable="bottom">
473                                     <field name="name"/>
474                                     <field name="sequence" groups="base.group_extended"/>
475                                     <field name="from_val"/>
476                                     <field name="to_val"/>
477                                     <field name="amount_type"/>
478                                     <field name="value"/>
479                                 </tree>
480                             </field>
481                         </page>
482                         <page string="Description">
483                             <separator colspan="4" string="Description"/>
484                             <field name="note" colspan="4" nolabel="1"/>
485                         </page>
486                     </notebook>
487                 </form>
488             </field>
489         </record>
490
491         <record id="view_hr_payslip_tree" model="ir.ui.view">
492             <field name="name">hr.payslip.tree</field>
493             <field name="model">hr.payslip</field>
494             <field name="type">tree</field>
495             <field name="arch" type="xml">
496                 <tree colors="blue:state in ('confirm','hr_check','accont_check');black:state in ('new');gray:state in('cancel')" string="Payslip">
497                     <field name="number"/>
498                     <field name="employee_id"/>
499                     <field name="register_id" invisible="1"/>
500                     <field name="name"/>
501                     <field name="date"/>
502                     <field name="grows"/>
503                     <field name="net"/>
504                     <field name="state"/>
505                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
506                 </tree>
507             </field>
508         </record>
509
510         <record id="view_hr_payslip_form" model="ir.ui.view">
511             <field name="name">hr.payslip.form</field>
512             <field name="model">hr.payslip</field>
513             <field name="type">form</field>
514             <field name="arch" type="xml">
515                 <form string="Payslip">
516                     <group col="6" colspan="4">
517                         <field name="employee_id"/>
518                         <field name="name"/>
519                         <field name="number" select="1"/>
520                         <field name="date"/>
521                     </group>
522                     <notebook colspan="4">
523                         <page string="Salary Computation">
524                             <field name="line_ids" colspan="4" nolabel="1">
525                                 <tree string="Salary Structure" editable="bottom">
526                                     <field name="category_id" on_change="onchange_category(category_id)"/>
527                                     <field name="sequence" groups="base.group_extended"/>
528                                     <field name="name"/>
529                                     <field name="code"/>
530                                     <field name="type"/>
531                                     <field name="amount_type"/>
532                                     <field name="amount" on_change="onchange_amount(amount, amount_type)"/>
533                                     <field name="total"/>
534                                 </tree>
535                                 <form string="Payslip Line">
536                                     <group col="6" colspan="4">
537                                         <field name="name" colspan="4" select="1"/>
538                                         <field name="code" select="1"/>
539                                     </group>
540                                     <group col="2" colspan="2">
541                                         <separator colspan="4" string="Calculations"/>
542                                         <field name="category_id" on_change="onchange_category(category_id)"/>
543                                         <field name="type"/>
544                                         <field name="amount_type"/>
545                                         <field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','func')]}"/>
546                                         <field name="sequence" groups="base.group_extended"/>
547                                     </group>
548                                     <group col="2" colspan="2">
549                                         <separator colspan="4" string="Company contribution"/>
550                                         <field name="company_contrib"/>
551                                     </group>
552                                     <notebook colspan="4">
553                                         <page string="Function">
554                                             <field name="line_ids" colspan="4" nolabel="1" attrs="{'readonly':[('amount_type','!=','func')]}">
555                                                 <tree string="Function Arguments" editable="bottom">
556                                                     <field name="name"/>
557                                                     <field name="sequence" groups="base.group_extended"/>
558                                                     <field name="from_val"/>
559                                                     <field name="to_val"/>
560                                                     <field name="amount_type"/>
561                                                     <field name="value"/>
562                                                 </tree>
563                                             </field>
564                                         </page>
565                                         <page string="Description">
566                                             <separator colspan="4" string="Description"/>
567                                             <field name="note" colspan="4" nolabel="1"/>
568                                         </page>
569                                     </notebook>
570                                 </form>
571                             </field>
572                             <group col="6" colspan="4">
573                                 <separator string="Computation Overview" colspan="6"/>
574                                 <field name="working_days"/>
575                                 <field name="holiday_days"/>
576                                 <field name="worked_days"/>
577                                 <field name="basic_before_leaves"/>
578                                 <field name="leaves"/>
579                                 <field name="basic"/>
580                                 <field name="allounce"/>
581                                 <field name="deduction"/>
582                                 <field name="other_pay"/>
583                                 <field name="grows"/>
584                                 <field name="net"/>
585                                 <field name="total_pay"/>
586                             </group>
587                         </page>
588                         <page string="Other Informations">
589                             <group col="2" colspan="1">
590                                 <separator colspan="2" string="Other Informations"/>
591                                 <field name="paid" readonly="1"/>
592                                 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
593                                 <field name="register_id" groups="base.group_extended"/>
594                                 <field name="deg_id" groups="base.group_extended"/>
595                                 <field name="contract_id" groups="base.group_extended" domain="[('employee_id','=',employee_id)]"/>
596                             </group>
597                             <newline/>
598                             <separator colspan="4" string="Description"/>
599                             <field name="note" colspan="4" nolabel="1"/>
600                         </page>
601                     </notebook>
602                     <group col="10" colspan="4">
603                         <field name="state"/>
604                         <button string="Cancel" icon="terp-dialog-close" name="cancel_sheet" states="draft,hr_check,confirm"/>
605                         <button string="Compute Sheet" icon="terp-stock_format-scientific" name="compute_sheet" states="new"/>
606                         <button string="Recompute Sheet" icon="terp-stock_format-scientific" name="compute_sheet" type="object" states="draft"/>
607                         <button string="Verify Sheet" icon="terp-camera_test" name="verify_sheet" states="draft"/>
608                         <button string="Approve Sheet" icon="terp-camera_test" name="final_verify_sheet" states="hr_check"/>
609                         <button string="Pay Salary" icon="terp-dolar_ok!" name="process_sheet" states="confirm"/>
610                         <button string="Set to Draft" icon="terp-stock_effects-object-colorize" name="set_to_draft" states="cancel"/>
611                     </group>
612                 </form>
613             </field>
614         </record>
615         <record id="view_hr_payslip_filter" model="ir.ui.view">
616             <field name="name">hr.payslip.select</field>
617             <field name="model">hr.payslip</field>
618             <field name="type">search</field>
619             <field name="arch" type="xml">
620                 <search string="Search Payslips">
621                     <group col="8" colspan="4">
622                         <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Slip"/>
623                         <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Slip"/>
624                         <separator orientation="vertical"/>
625                         <filter icon="terp-dolar_ok!" string="Paid" domain="[('state','=','done'),('paid','=',True)]" help="Paid Slip"/>
626                         <separator orientation="vertical"/>
627                         <field name="name"/>
628                         <field name="employee_id"/>
629                         <field name="number"/>
630                         <field name="date"/>
631                     </group>
632                     <newline/>
633                     <group col="8" colspan="4" expand="0" string="Group By...">
634                         <filter string="Employees" icon="terp-personal" name="employee_id" context="{'group_by':'employee_id'}"/>
635                         <separator orientation="vertical"/>
636                         <filter string="Register" icon="terp-folder-yellow" name="register_id" context="{'group_by':'register_id'}"/>
637                         <separator orientation="vertical"/>
638                         <filter string="Companies" name="company_id"  icon="terp-go-home" context="{'group_by':'company_id'}"/>
639                         <separator orientation="vertical"/>
640                         <filter string="States" name="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
641                     </group>
642                 </search>
643             </field>
644         </record>
645         <record id="action_view_hr_payslip_form" model="ir.actions.act_window">
646             <field name="name">Employee Payslip</field>
647             <field name="res_model">hr.payslip</field>
648             <field name="view_type">form</field>
649             <field name="view_id" ref="view_hr_payslip_tree"/>
650             <field name="search_view_id" ref="view_hr_payslip_filter"/>
651         </record>
652         <menuitem action="action_view_hr_payslip_form" id="menu_department_tree" parent="menu_hr_root_payroll"/>
653
654         <!-- Payment Heads -->
655         <record id="hr_allounce_deduction_categoty_form" model="ir.ui.view">
656             <field name="name">hr.allounce.deduction.categoty.form</field>
657             <field name="model">hr.allounce.deduction.categoty</field>
658             <field name="type">form</field>
659             <field name="arch" type="xml">
660                 <form string="Salary Heads">
661                     <group col="6" colspan="6">
662                         <field name="name" select="1"/>
663                         <field name="code" select="1"/>
664                         <field name="type" select="1"/>
665                         <group col="2" colspan="4">
666                             <separator colspan="4" string="Based on"/>
667                             <field name="base" colspan="4" nolabel="1"/>
668                         </group>
669                         <group col="2" colspan="2">
670                             <separator colspan="4" string="Dynamic Computation"/>
671                             <field name="condition"/>
672                             <field name="sequence"/>
673                         </group>
674                     </group>
675                     <notebook colspan="4">
676                         <page string="Description">
677                             <field name="note" colspan="4" nolabel="1"/>
678                         </page>
679                         <page string="Contribution">
680                             <field name="contribute_ids" colspan="4" nolabel="1" height="300">
681                                 <form string="Company Contribution">
682                                     <group col="6" colspan="6">
683                                         <field name="name" select="1"/>
684                                         <field name="code" select="1"/>
685                                     </group>
686                                     <group col="2" colspan="2">
687                                         <separator colspan="2" string="Contributions"/>
688                                         <field name="amount_type" attrs="{'required': [('contribute','=',True)]}"/>
689                                         <field name="contribute_per" attrs="{'required': [('contribute','=',True)], 'readonly':[(('amount_type','=','func'))]}"/>
690                                         <field name="register_id" attrs="{'required': [('contribute','=',True)]}"/>
691                                     </group>
692                                     <group col="2" colspan="2">
693                                         <separator colspan="2" string="Other Information"/>
694                                         <field name="company_id" groups="base.group_multi_company" widget="selection" select="1"/>
695                                         <field name="active" select="1"/>
696                                     </group>
697                                     <notebook colspan="4">
698                                         <page string="Function" attrs="{'readonly': [('amount_type','!=','func')]}">
699                                             <field name="line_ids" colspan="4" nolabel="1">
700                                                 <tree string="Function Arguments" editable="bottom">
701                                                     <field name="name"/>
702                                                     <field name="sequence"/>
703                                                     <field name="from_val"/>
704                                                     <field name="to_val"/>
705                                                     <field name="amount_type"/>
706                                                     <field name="value"/>
707                                                 </tree>
708                                             </field>
709                                         </page>
710                                         <page string="Description">
711                                             <field name="note" colspan="4" nolabel="1"/>
712                                         </page>
713                                     </notebook>
714                                 </form>
715                             </field>
716                         </page>
717                     </notebook>
718                 </form>
719             </field>
720         </record>
721         <record id="hr_allounce_deduction_categoty_tree" model="ir.ui.view">
722             <field name="name">hr.allounce.deduction.categoty.tree</field>
723             <field name="model">hr.allounce.deduction.categoty</field>
724             <field name="type">tree</field>
725             <field name="arch" type="xml">
726                 <tree string="Salary Heads">
727                     <field name="name"/>
728                     <field name="code"/>
729                     <field name="type"/>
730                     <field name="base"/>
731                     <field name="condition"/>
732                     <field name="sequence"/>
733                 </tree>
734             </field>
735         </record>
736
737         <record id="view_allounce_deduction_categoty_filter" model="ir.ui.view">
738             <field name="name">hr.allounce.deduction.categoty.select</field>
739             <field name="model">hr.allounce.deduction.categoty</field>
740             <field name="type">search</field>
741             <field name="arch" type="xml">
742                 <search string="Salary Heads">
743                     <filter icon="terp-document-new" string="Allowance" domain="[('type','=','allowance')]"/>
744                     <filter icon="terp-check" string="Deduction" domain="[('type','=','deduction')]"/>
745                     <separator orientation="vertical"/>
746                     <field name="name" select="1"/>
747                      <field name="code" select="1"/>
748                     <field name="type"/>
749                     <newline/>
750                     <group expand="0" string="Group By..." colspan="4" col="4" groups="base.group_extended">
751                         <filter string="Based" icon="terp-go-month" domain="[]" context="{'group_by':'base'}"/>
752                         <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
753                     </group>
754                </search>
755             </field>
756         </record>
757
758         <record id="hr_allounce_deduction_tree" model="ir.actions.act_window">
759             <field name="name">Salary Heads</field>
760             <field name="res_model">hr.allounce.deduction.categoty</field>
761             <field name="view_type">form</field>
762             <field name="view_id" ref="hr_allounce_deduction_categoty_tree"/>
763            <field name="search_view_id" ref="view_allounce_deduction_categoty_filter"/>
764         </record>
765         <menuitem
766             id="menu_hr_allounce_deduction_tree"
767             action="hr_allounce_deduction_tree"
768             parent="payroll_configure"
769         />
770         <!-- End Payment Heads -->
771
772         <!-- Company Contribution -->
773         <record id="hr_company_contribution_form" model="ir.ui.view">
774             <field name="name">company.contribution.form</field>
775             <field name="model">company.contribution</field>
776             <field name="type">form</field>
777             <field name="arch" type="xml">
778                 <form string="Company Contribution">
779                     <group col="6" colspan="6">
780                         <field name="name" select="1"/>
781                         <field name="code" select="1"/>
782                         <field name="category_id"/>
783                     </group>
784                     <group col="2" colspan="2">
785                         <separator colspan="2" string="Contributions"/>
786                         <field name="amount_type" attrs="{'required': [('contribute','=',True)]}"/>
787                         <field name="contribute_per" attrs="{'required': [('contribute','=',True)], 'readonly':[(('amount_type','=','func'))]}"/>
788                         <field name="register_id" attrs="{'required': [('contribute','=',True)]}"/>
789                     </group>
790                     <group col="2" colspan="2">
791                         <separator colspan="2" string="Other Information"/>
792                         <field name="company_id" groups="base.group_multi_company" widget="selection" select="1"/>
793                         <field name="active" select="1"/>
794                     </group>
795                     <notebook colspan="4">
796                         <page string="Function" attrs="{'readonly': [('amount_type','!=','func')]}">
797                             <field name="line_ids" colspan="4" nolabel="1">
798                                 <tree string="Function Arguments" editable="bottom">
799                                     <field name="name"/>
800                                     <field name="sequence"/>
801                                     <field name="from_val"/>
802                                     <field name="to_val"/>
803                                     <field name="amount_type"/>
804                                     <field name="value"/>
805                                 </tree>
806                             </field>
807                         </page>
808                         <page string="Description">
809                             <field name="note" colspan="4" nolabel="1"/>
810                         </page>
811                     </notebook>
812                 </form>
813             </field>
814         </record>
815         <record id="hr_company_contribution_tree" model="ir.ui.view">
816             <field name="name">company.contribution.tree</field>
817             <field name="model">company.contribution</field>
818             <field name="type">tree</field>
819             <field name="arch" type="xml">
820                 <tree string="Company Contribution">
821                     <field name="name"/>
822                     <field name="code"/>
823                     <field name="contribute_per"/>
824                     <field name="amount_type"/>
825                     <field name="register_id"/>
826                      <field name="category_id"/>
827                 </tree>
828             </field>
829         </record>
830
831         <record id="view_hr_company_contribution_filter" model="ir.ui.view">
832             <field name="name">company.contribution.select</field>
833              <field name="model">company.contribution</field>
834             <field name="type">search</field>
835              <field name="arch" type="xml">
836                 <search string="Search Company Contribution">
837                     <group col="8" colspan="4">
838                         <filter icon="terp-document-new" string="Fixed Amount" domain="[('amount_type','=','fix')]" help="Draft Slip"/>
839                         <filter icon="terp-camera_test" string="Function Calculation" domain="[('amount_type','=','func')]" help="Posted Slip"/>
840                         <separator orientation="vertical"/>
841                         <field name="name"/>
842                         <field name="code"/>
843                         <field name="contribute_per"/>
844                         <field name="register_id"/>
845                     </group>
846                     <newline/>
847                     <group col="8" colspan="4" expand="0" string="Group By...">
848                         <filter string="Type" icon="terp-stock_symbol-selection" name="amount_type" context="{'group_by':'amount_type'}"/>
849                         <filter string="Category" name="category_id" icon="terp-stock_symbol-selection"  context="{'group_by':'category_id'}"/>
850                     </group>
851                 </search>
852             </field>
853         </record>
854         <record id="action_hr_company_contribution_tree" model="ir.actions.act_window">
855             <field name="name">Company Contributions</field>
856             <field name="res_model">company.contribution</field>
857             <field name="view_type">form</field>
858             <field name="view_id" ref="hr_company_contribution_tree"/>
859              <field name="search_view_id" ref="view_hr_company_contribution_filter"/>
860         </record>
861         <menuitem
862             id="menu_hr_company_contribution_tree"
863             action="action_hr_company_contribution_tree"
864             parent="payroll_configure"
865         />
866         <!-- End Company Contribution -->
867
868         <record id="view_hr_bank_advice_tree" model="ir.ui.view">
869             <field name="name">hr.payroll.advice.tree</field>
870             <field name="model">hr.payroll.advice</field>
871             <field name="type">tree</field>
872             <field name="arch" type="xml">
873                 <tree string="Bank Advice">
874                     <field name="number" select="1"/>
875                     <field name="name" select="1"/>
876                     <field name="date" select="1"/>
877                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
878                 </tree>
879             </field>
880         </record>
881
882         <record id="view_hr_bank_advice_form" model="ir.ui.view">
883             <field name="name">hr.payroll.advice.form</field>
884             <field name="model">hr.payroll.advice</field>
885             <field name="type">form</field>
886             <field name="arch" type="xml">
887                 <form string="Bank Advice">
888                     <group col="6" colspan="4">
889                         <field name="name" colspan="4" select="1"/>
890                         <field name="number" select="1"/>
891                         <field name="register_id"/>
892                         <field name="bank_id"/>
893                     </group>
894                     <notebook colspan="4">
895                         <page string="Paymeny Lines">
896                             <field name="line_ids" colspan="4" nolabel="1">
897                                 <tree string="Payment Lines" editable="bottom">
898                                     <field name="employee_id" on_change="onchange_employee_id(parent.date, employee_id)"/>
899                                     <field name="name"/>
900                                     <field name="amount"/>
901                                     <field name="bysal"/>
902                                     <field name="flag"/>
903                                 </tree>
904                             </field>
905                         </page>
906                         <page string="Letter Content">
907                             <group colspan="4" col="6">
908                               <field name="company_id" on_change="onchange_company_id(company_id)" groups="base.group_multi_company" widget="selection"/>
909                               <field name="chaque_nos"/>
910                               <field name="date" select="1"/>
911                             </group>
912                             <separator colspan="4" string="Letter Details"/>
913                             <field name="note" colspan="4" nolabel="1"/>
914                         </page>
915                     </notebook>
916                     <group col="6" colspan="6">
917                         <field name="state"/>
918                         <button name="cancel_sheet" string="Cancel Sheet" states="draft" icon="gtk-cancel"  type="object"/>
919                         <button name="confirm_sheet"  icon="gtk-apply" string="Confirm Sheet" states="draft" type="object"/>
920                         <button name="set_to_draft" string="Set to Draft"  icon="gtk-convert"  states="cancel,confirm" type="object"/>
921                     </group>
922                 </form>
923             </field>
924         </record>
925         <record id="action_view_hr_bank_advice_tree" model="ir.actions.act_window">
926             <field name="name">Payment Advice</field>
927             <field name="res_model">hr.payroll.advice</field>
928             <field name="view_type">form</field>
929             <field name="view_mode">tree,form</field>
930             <field name="view_id" ref="view_hr_bank_advice_tree"/>
931         </record>
932         <menuitem
933             action="action_view_hr_bank_advice_tree"
934             id="hr_menu_payment_advice"
935             parent="menu_hr_root_payroll"
936         />
937
938         <record id="view_hr_payroll_register_tree" model="ir.ui.view">
939             <field name="name">hr.payroll.register.tree</field>
940             <field name="model">hr.payroll.register</field>
941             <field name="type">tree</field>
942             <field name="arch" type="xml">
943                 <tree  colors="blue:state in ('draft');black:state in ('confirm','new','hr_check','accont_check');gray:state in('done','cancel')" string="Payroll Register">
944                     <field name="number"/>
945                     <field name="name"/>
946                     <field name="date"/>
947                     <field name="state"/>
948                 </tree>
949             </field>
950         </record>
951         <record id="view_hr_payroll_register_form" model="ir.ui.view">
952             <field name="name">hr.payroll.register.form</field>
953             <field name="model">hr.payroll.register</field>
954             <field name="type">form</field>
955             <field name="arch" type="xml">
956                 <form string="Payroll Register">
957                     <group col="6" colspan="4">
958                         <field name="name" colspan="4" select="1"/>
959                         <field name="number" select="1"/>
960                         <field name="bank_id"/>
961                         <field name="date" select="1"/>
962                     </group>
963                     <notebook colspan="4">
964                         <page string="Payslips">
965                             <field name="line_ids" colspan="4" nolabel="1">
966                                 <tree colors="blue:state in ('draft');black:state in ('confirm','new','hr_check','accont_check');gray:state in('done','cancel')" string="Payslip">
967                                     <field name="number"/>
968                                     <field name="employee_id"/>
969                                     <field name="name"/>
970                                     <field name="date"/>
971                                     <field name="basic"/>
972                                     <field name="allounce"/>
973                                     <field name="grows"/>
974                                     <field name="deduction"/>
975                                     <field name="net"/>
976                                     <field name="state"/>
977                                 </tree>
978                             </field>
979                             <group col="2" colspan="2">
980                                 <separator colspan="4" string="Allowance / Deduction"/>
981                                 <field name="allounce"/>
982                                 <field name="deduction"/>
983                             </group>
984                             <group col="2" colspan="2">
985                                 <separator colspan="4" string="Salary Information"/>
986                                 <field name="grows"/>
987                                 <field name="net"/>
988                             </group>
989                         </page>
990                     </notebook>
991                     <group col="8" colspan="4">
992                         <field name="state"/>
993                         <button string="Cancel" name="cancel_sheet" icon="gtk-cancel" states="draft,hr_check,accont_check,confirm" type="object"/>
994                         <button string="Compute" name="compute_sheet" states="new" icon="terp-document-new" type="object"/>
995                         <button string="Verify Sheet" icon="gtk-ok" name="verify_sheet" states="draft" type="object"/>
996                         <button string="Complete HR Checking"  icon="gtk-apply" name="final_verify_sheet" type="object" states="hr_check"/>
997                         <button string="Pay Salary" icon="gtk-apply"  name="process_sheet" states="confirm" type="object" />
998                         <button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" />
999                     </group>
1000                 </form>
1001             </field>
1002         </record>
1003         <record id="action_view_hr_payroll_register_form" model="ir.actions.act_window">
1004             <field name="name">Payroll Register</field>
1005             <field name="res_model">hr.payroll.register</field>
1006             <field name="view_type">form</field>
1007             <field name="view_mode">tree,form</field>
1008         </record>
1009         <menuitem
1010             action="action_view_hr_payroll_register_form"
1011             id="hr_menu_payroll_register"
1012             parent="menu_hr_root_payroll"
1013         />
1014
1015         <!--
1016         Contribution Register
1017         -->
1018         <record id="hr_contibution_register_tree" model="ir.ui.view">
1019             <field name="name">hr.contibution.register.tree</field>
1020             <field name="model">hr.contibution.register</field>
1021             <field name="type">tree</field>
1022             <field name="arch" type="xml">
1023                 <tree string="Contribution Registers">
1024                     <field name="name" select="1"/>
1025                     <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
1026                     <field name="monthly_total_by_emp"/>
1027                     <field name="monthly_total_by_comp"/>
1028                 </tree>
1029             </field>
1030         </record>
1031         <record id="hr_contibution_register_form" model="ir.ui.view">
1032             <field name="name">hr.contibution.register.form</field>
1033             <field name="model">hr.contibution.register</field>
1034             <field name="type">form</field>
1035             <field name="arch" type="xml">
1036                 <form string="Contribution">
1037                     <field name="name" select="1"/>
1038                     <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
1039                     <notebook colspan="4">
1040                         <page string="Contribution Lines">
1041                             <field colspan="4" name="register_line_ids" nolabel="1" select="1">
1042                                 <tree string="Register Lines" editable="top">
1043                                     <field name="code"/>
1044                                     <field name="name"/>
1045                                     <field name="employee_id"/>
1046                                     <field name="emp_deduction"/>
1047                                     <field name="comp_deduction"/>
1048                                     <field name="total"/>
1049                                 </tree>
1050                              </field>
1051                          </page>
1052                          <page string="Description">
1053                             <separator colspan="4" string="Description"/>
1054                             <field name="note" colspan="4" nolabel="1"/>
1055                         </page>
1056                     </notebook>
1057                     <group col="2" colspan="2" name="Month">
1058                         <separator colspan="2" string="Month"/>
1059                         <field name="monthly_total_by_emp"/>
1060                         <field name="monthly_total_by_comp"/>
1061                     </group>
1062                 </form>
1063             </field>
1064         </record>
1065         <record id="action_contibution_register_form" model="ir.actions.act_window">
1066             <field name="name">Contibution Register</field>
1067             <field name="res_model">hr.contibution.register</field>
1068             <field name="view_type">form</field>
1069             <field name="view_id" ref="hr_contibution_register_tree"/>
1070         </record>
1071         <menuitem
1072             id="menu_action_hr_contibution_register_form"
1073             action="action_contibution_register_form"
1074             parent="payroll_configure"
1075         />
1076         <record id="hr_contibution_register_line_form" model="ir.ui.view">
1077             <field name="name">hr.contibution.register.line.form</field>
1078             <field name="model">hr.contibution.register.line</field>
1079             <field name="type">form</field>
1080             <field name="arch" type="xml">
1081                 <form string="Contribution">
1082                       <field name="name"/>
1083                       <field name="code"/>
1084                       <field name="employee_id"/>
1085                       <field name="emp_deduction"/>
1086                       <field name="comp_deduction"/>
1087                       <field name="total"/>
1088                 </form>
1089             </field>
1090         </record>
1091         
1092         <!--  Shortcuts -->
1093         <act_window name="Payslips"
1094             domain="[('employee_id', '=', active_id)]"
1095             res_model="hr.payslip"
1096             src_model="hr.employee"
1097             view_id ="view_hr_payslip_tree"
1098             id="act_hr_employee_payslip_list"/>
1099     </data>
1100 </openerp>
1101