| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<odoo> |
| 3 |
<data> |
| 4 |
|
| 5 |
<template id="custom_header" inherit_id="l10n_ar.custom_header" primary="True"> |
| 6 |
<xpath expr="//div[@id='l10n_ar_header_right']//span" position="replace"> |
| 7 |
<span t-att-style="'color: %s;' % o.company_id.secondary_color"><strong>DOCUMENT NOT VALID AS AN INVOICE</strong></span> |
| 8 |
<br/> |
| 9 |
<span t-att-style="'color: %s;' % o.company_id.secondary_color">Delivery Guide No: </span> |
| 10 |
<span t-out="o.l10n_ar_delivery_guide_number"/> |
| 11 |
</xpath> |
| 12 |
</template> |
| 13 |
|
| 14 |
<template id="report_delivery_document" inherit_id="stock.report_delivery_document" primary="True"> |
| 15 |
<xpath expr="//t[@t-set='address']" position="after"> |
| 16 |
<t t-set="pre_printed_report" t-value="False"/> |
| 17 |
<t t-set="header_address" t-value="o.company_id"/> |
| 18 |
<t t-set="report_date" t-value="o.scheduled_date"/> |
| 19 |
<t t-if="o.l10n_ar_cai_data"> |
| 20 |
<t t-set="stock_doc_type" t-value="o.env['l10n_latam.document.type'].browse(o.l10n_ar_cai_data['document_type_id'])"/> |
| 21 |
<t t-set="document_letter" t-value="stock_doc_type.l10n_ar_letter"/> |
| 22 |
<t t-set="document_legend" t-value="stock_doc_type.code and 'Cod. %02d' % int(stock_doc_type.code) or ''"/> |
| 23 |
<t t-set="report_name" t-value="stock_doc_type.report_name"/> |
| 24 |
</t> |
| 25 |
<t t-set="custom_header" t-value="'l10n_ar_stock.custom_header'"/> |
| 26 |
<div id="informations"> |
| 27 |
<t><strong>Customer: </strong></t> |
| 28 |
<span t-field="o.partner_id.commercial_partner_id.name"/> |
| 29 |
<br/> |
| 30 |
<span t-field="o.partner_id" |
| 31 |
t-options="{'widget': 'contact', 'fields': ['address'], 'no_marker': true, 'no_tag_br': True}"/> |
| 32 |
<strong>VAT Cond: </strong> |
| 33 |
<span t-field="o.partner_id.l10n_ar_afip_responsibility_type_id"/> |
| 34 |
<t t-if="o.partner_id.vat and |
| 35 |
o.partner_id.l10n_latam_identification_type_id and |
| 36 |
o.partner_id.l10n_latam_identification_type_id.l10n_ar_afip_code != '99'"> |
| 37 |
<br/> |
| 38 |
<strong> |
| 39 |
<t t-out="o.partner_id.l10n_latam_identification_type_id.name or |
| 40 |
o.company_id.account_fiscal_country_id.vat_label" |
| 41 |
id="inv_tax_id_label"/>: |
| 42 |
</strong> |
| 43 |
<span t-if="o.partner_id.l10n_ar_vat" t-out="o.partner_id.l10n_ar_formatted_vat"/> |
| 44 |
<span t-else="" t-out="o.partner_id.vat"/> |
| 45 |
</t> |
| 46 |
</div> |
| 47 |
<t t-set="custom_footer"> |
| 48 |
<div class="row"> |
| 49 |
<div name="footer_left_column" class="col-6 text-start"> |
| 50 |
<div name="pager" t-if="report_type == 'pdf'"> |
| 51 |
Page: <span class="page"/> / <span class="topage"/> |
| 52 |
</div> |
| 53 |
<div name="sequence_range" t-if="o.l10n_ar_cai_data"> |
| 54 |
Sequence from <t t-out="o.l10n_ar_cai_data['sequence_number_start']"/> to <t t-out="o.l10n_ar_cai_data['sequence_number_end']"/> |
| 55 |
</div> |
| 56 |
</div> |
| 57 |
<div name="footer_right_column" class="col-6 text-end" t-if="o.l10n_ar_cai_data"> |
| 58 |
<div name="cai_number"> |
| 59 |
CAI: <t t-out="o.l10n_ar_cai_data['cai_authorization_code']"/> |
| 60 |
</div> |
| 61 |
<div name="cai_expiration_date"> |
| 62 |
CAI Expiration Date: <t t-out="o.l10n_ar_cai_data['cai_expiration_date']" t-options='{"widget": "date"}'/> |
| 63 |
</div> |
| 64 |
</div> |
| 65 |
</div> |
| 66 |
</t> |
| 67 |
</xpath> |
| 68 |
<xpath expr="//t[@t-set='address']" position="replace"/> |
| 69 |
<xpath expr="//t[@t-set='information_block']" position="replace"/> |
| 70 |
<xpath expr="//h2/span[@t-field='o.name']/.." position="replace"> |
| 71 |
<br/> |
| 72 |
</xpath> |
| 73 |
</template> |
| 74 |
|
| 75 |
<template id="report_delivery_guide"> |
| 76 |
<t t-foreach="docs" t-as="o"> |
| 77 |
<t t-set="lang" t-value="o.company_id.partner_id.lang or o.env.lang"/> |
| 78 |
<t t-call="l10n_ar_stock.report_delivery_document" t-lang="lang"/> |
| 79 |
</t> |
| 80 |
</template> |
| 81 |
|
| 82 |
<record id="action_delivery_guide_report_pdf" model="ir.actions.report"> |
| 83 |
<field name="name">Delivery Guide (AR)</field> |
| 84 |
<field name="model">stock.picking</field> |
| 85 |
<field name="report_type">qweb-pdf</field> |
| 86 |
<field name="report_name">l10n_ar_stock.report_delivery_guide</field> |
| 87 |
<field name="report_file">l10n_ar_stock.report_delivery_guide</field> |
| 88 |
<field name="print_report_name">'Remito - %s' % (object.l10n_ar_delivery_guide_number or 's/n')</field> |
| 89 |
<field name="binding_model_id" ref="model_stock_picking"/> |
| 90 |
<field name="binding_type">report</field> |
| 91 |
<field name="attachment">'Remito - %s.pdf' % (object.l10n_ar_delivery_guide_number or 's/n')</field> |
| 92 |
</record> |
| 93 |
|
| 94 |
</data> |
| 95 |
</odoo> |