Advertisement
rht_odoo

Payslip changes

Apr 17th, 2025
6
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.54 KB | None | 0 0
  1. <data><xpath expr="/t[@t-name='hr_payroll.report_payslip']" position="replace" mode="inner"><t t-call="web.external_layout">
  2. <div class="page">
  3. <h2 id="payslip_name"><span t-field="o.name">August 2023 Payslip</span></h2>
  4. <t t-set="is_invalid" t-value="o._is_invalid()"/>
  5. <div t-if="is_invalid">
  6. <strong id="invalid_warning"><span t-out="is_invalid">This payslip is not validated. This is not a legal document.</span></strong>
  7. </div>
  8. <div t-else="">
  9. <div class="oe_structure"/>
  10. </div>
  11. <table name="employee-infos" id="employee_info_table_1" class="table table-sm table-bordered">
  12. <tbody><tr id="employee_info_line_1">
  13. <td class="w-25"><strong>Employee</strong></td>
  14. <td class="w-25"><strong>Marital Status</strong></td>
  15. <td class="w-25"><strong>Designation</strong></td>
  16. <td class="w-25"><strong>Pay Period</strong></td>
  17. </tr>
  18. <tr id="employee_info_line_2">
  19. <td><span t-field="o.employee_id"/></td>
  20. <td><span t-field="o.employee_id.marital"/></td>
  21. <td><span t-field="o.employee_id.job_title"/></td>
  22. <td>
  23. <span t-if="o.date_from &lt; o.contract_id.date_start" t-field="o.contract_id.date_start">Start Date</span>
  24. <span t-else="" t-field="o.date_from">From</span>
  25. <span t-if="o.contract_id.date_end and o.date_to &gt; o.contract_id.date_end" t-field="o.contract_id.date_end">End Date</span>
  26. <span t-else="" t-field="o.date_to">To</span>
  27. </td>
  28. </tr>
  29. <tr id="employee_info_line_3">
  30. <td><span t-field="o.employee_id.private_street"/></td>
  31. <td/>
  32. <td/>
  33. <td/>
  34. </tr>
  35. <tr id="employee_info_line_4">
  36. <td><span t-field="o.employee_id.private_city"/> <span t-field="o.employee_id.private_zip"/></td>
  37. <td><strong>Person in charge</strong></td>
  38. <td><strong>Identification</strong></td>
  39. <td><strong>Computed on </strong></td>
  40. </tr>
  41. <tr id="employee_info_line_5">
  42. <td><span t-field="o.employee_id.work_email"/></td>
  43. <td name="personne-in-charge"><span t-out="o.employee_id.children"/></td>
  44. <td name="identification-id"><span t-field="o.employee_id.identification_id"/></td>
  45. <td><span t-field="o.compute_date"/></td>
  46. </tr>
  47. <tr id="employee_info_line_6">
  48. <td class="w-25"><strong>Contract Start Date</strong></td>
  49. <td class="w-25"><strong>Contract Type</strong></td>
  50. <td class="w-25"><strong>Working Schedule</strong></td>
  51. <td class="w-25" name="company-car-title"/>
  52. </tr>
  53. <tr id="employee_info_line_7">
  54. <td><span t-field="o.employee_id.first_contract_date"/></td>
  55. <td><span t-field="o.employee_id.contract_id.contract_type_id"/></td>
  56. <td><span t-field="o.employee_id.contract_id.hours_per_week"/></td>
  57. <td class="w-25" name="company-car-model"/>
  58. </tr>
  59. </tbody></table>
  60.  
  61.  
  62. <div id="total">
  63. <table class="table table-sm">
  64. <thead class="o_black_border">
  65. <tr>
  66. <th id="line_header_name">Name</th>
  67. <th id="line_header_days">Nombre</th>
  68. <th id="line_header_base"> Base</th>
  69. <th id="line_header_rate"> Taux (%)</th>
  70.  
  71. <th id="line_header_amount" class="text-end">Total</th>
  72. </tr>
  73. </thead>
  74. <tbody>
  75. <t id="payslip_lines">
  76. <span t-foreach="o.line_ids.filtered(lambda line: line.appears_on_payslip)" t-as="line">
  77. <t t-set="line_styling" t-value="line.get_payslip_styling_dict()"/>
  78. <t t-set="line_style"/>
  79. <t t-set="line_class"/>
  80. <t t-if="line.code in line_styling">
  81. <t t-set="line_style" t-value="line_styling[line.code]['line_style']"/>
  82. <t t-set="line_class" t-value="line_styling[line.code]['line_class']"/>
  83. </t>
  84. <tr t-att-class="line_class" t-att-style="line_style" id="line_display">
  85. <td id="payslip_line_name"><span t-field="line.name"/></td>
  86. <td id="payslip_line_quantity"><span t-if="line.quantity &gt; 1" t-esc="line.quantity"/></td>
  87. <td id="line_base">
  88. <span t-field="line.amount"/>
  89. </td>
  90. <td id="line_rate">
  91. <span t-if="line.rate != 100" t-field="line.rate" t-options="{'precision': 2}"/> <span t-if="line.rate != 100"> %</span>
  92. </td>
  93. <td id="payslip_line_total" class="text-end"><span t-esc="line.total" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.company_id.currency_id}" t-att-style="'color:#875A7B;' if line.total &lt; 0 else ''"/></td>
  94. </tr>
  95. </span>
  96. </t>
  97. </tbody>
  98. </table>
  99. <div class="oe_structure"/>
  100. </div>
  101. <div id="to_pay">
  102. <p t-if="o.net_wage &gt;= 0">To pay on <b><span t-field="o.employee_id.bank_account_id">xxxxxxxxxxxx</span></b> of <i><span t-field="o.employee_id"/></i>: <span t-field="o.net_wage"/></p>
  103. <p t-if="o.net_wage &lt; 0">The net amount will be recovered from the first positive remuneration established after this.</p>
  104. </div>
  105. </div></t>
  106. </xpath></data>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement