Files

60 lines
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="l10n_us_w2_view_form" model="ir.ui.view">
<field name="name">l10n.us.w2.view.form</field>
<field name="model">l10n.us.w2</field>
<field name="arch" type="xml">
<form string="W2 Form">
<header>
<button name="action_generate_csv" string="Generate" type="object" class="btn btn-primary" invisible="csv_file"/>
<button name="action_generate_csv" string="Generate" type="object" class="btn btn-secondary" invisible="not csv_file"/>
</header>
<sheet>
<div>
A CSV file containing the information you need to e-file W2s through a 3rd party service will be generated. By default, all Payslips marked as validated/paid during the period stipulated below will be displayed. Review the items and remove any that you don't need in your report. If some are missing you can always add them manually using the "Add a line" option. It is important that you compare the CSV file generated by Odoo with the template your 3rd party service requests before filing it.
</div>
<group class="mt-2">
<group>
<field name="date_start"/>
<field name="date_end"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="allowed_payslip_ids" invisible="1"/>
<field name="csv_filename" invisible="1"/>
</group>
</group>
<p invisible="not csv_file">
Download the CSV file: <field name="csv_file" filename="csv_filename"/>
</p>
<field name="payslip_ids">
<list create="False">
<field name="payslip_run_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="employee_id"/>
<field name="state"/>
</list>
</field>
</sheet>
</form>
</field>
</record>
<record id="l10n_us_w2_view_tree" model="ir.ui.view">
<field name="name">l10n.us.w2.view.list</field>
<field name="model">l10n.us.w2</field>
<field name="arch" type="xml">
<list string="W2 Forms">
<field name="date_start"/>
<field name="date_end"/>
</list>
</field>
</record>
<record id="l10n_us_w2_action" model="ir.actions.act_window">
<field name="name">Create W2 Form</field>
<field name="res_model">l10n.us.w2</field>
<field name="view_mode">list,form</field>
<field name="target">current</field>
</record>
</odoo>