Advertisement
rht_odoo

[4761113]adapt_payslip

May 5th, 2025
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 8.83 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">
  4.                     <span t-field="o.name">August 2023 Payslip</span>
  5.                 </h2>
  6.                 <t t-set="is_invalid" t-value="o._is_invalid()"/>
  7.                 <div t-if="is_invalid">
  8.                     <strong id="invalid_warning">
  9.                         <span t-out="is_invalid">This payslip is not validated. This is not a legal document.</span>
  10.                     </strong>
  11.                 </div>
  12.                 <div t-else="">
  13.                     <div class="oe_structure"/></div>
  14.                 <table name="employee-infos" id="employee_info_table_1" class="table table-sm table-bordered o_selected_table">
  15.                     <tbody>
  16.                         <tr id="employee_info_line_1" class="o_small_ten-fs">
  17.                             <td class="w-25">
  18.                                 <strong>Employee</strong>
  19.                             </td>
  20.                             <td class="w-25">
  21.                                 <strong>Marital Status</strong>
  22.                             </td>
  23.                             <td class="w-25">
  24.                                 <strong>Designation</strong>
  25.                             </td>
  26.                             <td class="w-25">
  27.                                 <strong>Pay Period</strong>
  28.                             </td>
  29.                         </tr>
  30.                         <tr id="employee_info_line_2" class="o_small_ten-fs">
  31.                             <td class="o_selected_td">
  32.                                 <span t-field="o.employee_id"/>
  33.  
  34.                             </td>
  35.                             <td>
  36.                                 <span t-field="o.employee_id.marital"/>
  37.                             </td>
  38.                             <td>
  39.                                 <span t-field="o.employee_id.job_title"/>
  40.                             </td>
  41.                             <td>
  42.                                 <span t-if="o.date_from &lt; o.contract_id.date_start" t-field="o.contract_id.date_start">Start Date</span>
  43.                                 <span t-else="" t-field="o.date_from">From</span>
  44.                                 <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>
  45.                                 <span t-else="" t-field="o.date_to">To</span>
  46.                             </td>
  47.                         </tr>
  48.                         <tr id="employee_info_line_4" class="o_small_ten-fs">
  49.                             <td>
  50.                                 <br/>
  51.                             </td>
  52.                             <td>
  53.                                 <strong>Person in charge</strong>
  54.                             </td>
  55.                             <td>
  56.                                 <strong>Identification</strong>
  57.                             </td>
  58.                             <td>
  59.                                 <strong>Computed on </strong>
  60.                             </td>
  61.                         </tr>
  62.                         <tr id="employee_info_line_5" class="o_small_ten-fs">
  63.                             <td>
  64.                                 <span t-field="o.employee_id.work_email"/>
  65.                             </td>
  66.                             <td name="personne-in-charge">
  67.                                 <span t-out="o.employee_id.children"/>
  68.                             </td>
  69.                             <td name="identification-id">
  70.                                 <span t-field="o.employee_id.identification_id"/>
  71.                             </td>
  72.                             <td>
  73.                                 <span t-field="o.compute_date"/>
  74.                             </td>
  75.                         </tr>
  76.                         <tr id="employee_info_line_6" class="o_small_ten-fs">
  77.                             <td class="w-25">
  78.                                 <strong>Contract Start Date</strong>
  79.                             </td>
  80.                             <td class="w-25">
  81.                                 <strong>Contract Type</strong>
  82.                             </td>
  83.                             <td class="w-25">
  84.                                 <strong>Working Schedule</strong>
  85.                             </td>
  86.                             <td class="w-25" name="company-car-title"/>
  87.                         </tr>
  88.                         <tr id="employee_info_line_7" class="o_small_ten-fs">
  89.                             <td>
  90.                                 <span t-field="o.employee_id.first_contract_date"/>
  91.                             </td>
  92.                             <td>
  93.                                 <span t-field="o.employee_id.contract_id.contract_type_id"/>
  94.                             </td>
  95.                             <td>
  96.                                 <span t-field="o.employee_id.contract_id.hours_per_week"/>
  97.                             </td>
  98.                             <td class="w-25" name="company-car-model"/>
  99.                         </tr>
  100.                     </tbody>
  101.                 </table>
  102.                
  103.                 <div id="total" class="o_small_ten-fs">
  104.                     <table class="table table-sm">
  105.                         <thead class="o_black_border">
  106.                             <tr>
  107.                                 <th id="line_header_name">Name</th>
  108.                                 <th id="line_header_days">Nombre</th>
  109.                                 <th id="line_header_base"> Base</th>
  110.                                 <th id="line_header_rate"> Taux (%)</th>
  111.                                 <th id="line_header_amount" class="text-end">Total</th>
  112.                             </tr>
  113.                         </thead>
  114.                         <tbody>
  115.                             <t id="payslip_lines">
  116.                                 <span t-foreach="o.line_ids.filtered(lambda line: line.appears_on_payslip)" t-as="line">
  117.                                     <t t-set="line_styling" t-value="line.get_payslip_styling_dict()"/>
  118.                                     <t t-set="line_style"/>
  119.                                     <t t-set="line_class"/>
  120.                                     <t t-if="line.code in line_styling">
  121.                                         <t t-set="line_style" t-value="line_styling[line.code]['line_style']"/>
  122.                                         <t t-set="line_class" t-value="line_styling[line.code]['line_class']"/></t>
  123.                                     <tr t-att-class="line_class" t-att-style="line_style" id="line_display">
  124.                                         <td id="payslip_line_name">
  125.                                             <span t-field="line.name"/>
  126.                                         </td>
  127.                                         <td id="payslip_line_quantity">
  128.                                             <span t-if="line.quantity &gt; 1" t-esc="line.quantity"/>
  129.                                         </td>
  130.                                         <td id="line_base">
  131.                                             <span t-field="line.amount"/>
  132.                                         </td>
  133.                                         <td id="line_rate">
  134.                                             <span t-if="line.rate != 100" t-field="line.rate" t-options="{'precision': 2}"/>
  135.                                             <span t-if="line.rate != 100"> %</span>
  136.                                         </td>
  137.                                         <td id="payslip_line_total" class="text-end">
  138.                                             <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 ''"/>
  139.                                         </td>
  140.                                     </tr>
  141.                                 </span>
  142.                             </t>
  143.                         </tbody>
  144.                     </table>
  145.                     <div class="oe_structure"/></div>
  146.                 <div id="to_pay">
  147.                     <p t-if="o.net_wage &gt;= 0">To pay on
  148.                         <b>
  149.                             <span t-field="o.employee_id.bank_account_id">xxxxxxxxxxxx</span>
  150.                         </b> of
  151.                         <i>
  152.                             <span t-field="o.employee_id"/>
  153.                         </i>:
  154.                         <span t-field="o.net_wage"/>
  155.                     </p>
  156.                     <p t-if="o.net_wage &lt; 0">The net amount will be recovered from the first positive remuneration established after this.</p>
  157.                 </div>
  158.             </div></t>
  159.     </xpath></data>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement