Skip to content

Commit

Permalink
[ADD] l10n_ar_sale: add delivery_date into quotation report and online
Browse files Browse the repository at this point in the history
closes #130

Signed-off-by: jok-adhoc <jok@adhoc.com.ar>
  • Loading branch information
matiasperalta1 committed Sep 19, 2023
1 parent dd80676 commit bbd2755
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion l10n_ar_sale/__manifest__.py
@@ -1,6 +1,6 @@
{
'name': 'Argentinian Sale Total Fields',
'version': "16.0.1.4.0",
'version': "16.0.1.5.0",
'category': 'Localization/Argentina',
'sequence': 14,
'author': 'ADHOC SA',
Expand Down
5 changes: 5 additions & 0 deletions l10n_ar_sale/security/invoice_sale_security.xml
Expand Up @@ -12,6 +12,11 @@
<field name="category_id" ref="base.module_category_hidden"/>
</record>

<record id="group_delivery_date_on_report_online" model="res.groups">
<field name="name">Show Delivery Date in Quotations report and online budget</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>

<record id="sale_checkbook_comp_rule" model="ir.rule">
<field name="name">Sale Checkbook multi-company</field>
<field name="model_id" ref="model_sale_checkbook"/>
Expand Down
6 changes: 6 additions & 0 deletions l10n_ar_sale/views/l10n_ar_sale_templates.xml
Expand Up @@ -37,6 +37,12 @@
</td>
</td>

<xpath expr="//div[@id='shipping_address']" position="before">
<div class="mb-3 col-6" groups="l10n_ar_sale.group_delivery_date_on_report_online">
<strong>Delivery Date:</strong> <span t-field="sale_order.commitment_date" t-options="{&quot;widget&quot;: &quot;date&quot;}"/>
</div>
</xpath>

</template>

</odoo>
5 changes: 5 additions & 0 deletions l10n_ar_sale/views/sale_report_templates.xml
Expand Up @@ -126,6 +126,11 @@
<span t-field="doc.validity_date"/>
</t>

<t groups="l10n_ar_sale.group_delivery_date_on_report_online">
<br/><strong>Delivery Date: </strong>
<span t-out="doc.commitment_date or doc.date_order" t-options='{"widget": "date"}'/>
</t>

<t t-if="doc.payment_term_id" name="payment_term">
<br/><strong>Payment Terms: </strong><span t-field="doc.payment_term_id.name"/>
</t>
Expand Down
4 changes: 4 additions & 0 deletions l10n_ar_sale/wizards/res_config_settings.py
Expand Up @@ -12,3 +12,7 @@ class ResConfigSettings(models.TransientModel):
"Use Sale Checkbook in Sales",
implied_group='l10n_ar_sale.use_sale_checkbook',
)
group_delivery_date = fields.Boolean(
"Show Delivery Date in Quotations report and online budget",
implied_group='l10n_ar_sale.group_delivery_date_on_report_online'
)
11 changes: 11 additions & 0 deletions l10n_ar_sale/wizards/res_config_settings_view.xml
Expand Up @@ -31,6 +31,17 @@
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="group_delivery_date"/>
</div>
<div class="o_setting_right_pane">
<label for="group_delivery_date"/>
<div class="text-muted">
Shows the delivery date field in the budget report and in the online budget.
</div>
</div>
</div>
</div>
</field>
</record>
Expand Down

0 comments on commit bbd2755

Please sign in to comment.