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