Skip to content

Commit

Permalink
[MIG] product_brand_report: Migration to 17.0
Browse files Browse the repository at this point in the history
closes #573

Signed-off-by: Bruno Zanotti <bz@adhoc.com.ar>
  • Loading branch information
lef-adhoc committed May 7, 2024
1 parent ba837ef commit 1e87180
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 40 deletions.
4 changes: 2 additions & 2 deletions product_brand_report/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Product Brand Report',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'category': 'Product',
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
Expand All @@ -34,7 +34,7 @@
'reports/report_invoice_document.xml',
'views/res_config_settings_view.xml'
],
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
23 changes: 5 additions & 18 deletions product_brand_report/i18n/es_AR.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Project-Id-Version: Odoo Server 17.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-03 21:18+0000\n"
"PO-Revision-Date: 2024-01-03 21:18+0000\n"
"POT-Creation-Date: 2024-01-17 20:13+0000\n"
"PO-Revision-Date: 2024-01-17 20:13+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand All @@ -18,34 +18,21 @@ msgstr ""
#. module: product_brand_report
#: model_terms:ir.ui.view,arch_db:product_brand_report.report_invoice_document
#: model_terms:ir.ui.view,arch_db:product_brand_report.report_saleorder
#: model_terms:ir.ui.view,arch_db:product_brand_report.report_saleorder_portal
msgid "Brand"
msgstr "Marca"

#. module: product_brand_report
#: model:ir.model,name:product_brand_report.model_res_config_settings
msgid "Config Settings"
msgstr "Opciones de configuración"
msgstr "Ajustes de configuración"

#. module: product_brand_report
#: model:ir.model,name:product_brand_report.model_account_move
msgid "Journal Entry"
msgstr "Asiento contable"

#. module: product_brand_report
#: model:ir.model,name:product_brand_report.model_sale_order
msgid "Sales Order"
msgstr "Pedido de venta"

#. module: product_brand_report
#: model:ir.model.fields,field_description:product_brand_report.field_account_bank_statement_line__show_brand
#: model:ir.model.fields,field_description:product_brand_report.field_account_move__show_brand
#: model:ir.model.fields,field_description:product_brand_report.field_account_payment__show_brand
#: model:ir.model.fields,field_description:product_brand_report.field_res_config_settings__show_brand_invoice_report
msgid "Show product brand on invoices"
msgstr "Mostrar marca de productos en facturas"

#. module: product_brand_report
#: model:ir.model.fields,field_description:product_brand_report.field_res_config_settings__show_brand_sales_report
#: model:ir.model.fields,field_description:product_brand_report.field_sale_order__show_brand
msgid "Show product brand on quotations & sale orders"
msgstr "Mostrar marca de productos en presupuestos y órdenes de venta"
11 changes: 11 additions & 0 deletions product_brand_report/reports/report_saleorder_document.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,15 @@
</td>
</xpath>
</template>

<template id="report_saleorder_portal" inherit_id="sale.sale_order_portal_content">
<xpath expr="//th[@id='product_name_header']" position="after">
<th class="text-center" t-if="sale_order.env['ir.config_parameter'].sudo().get_param('product_brand_report.show_brand_sales_report')">Brand</th>
</xpath>
<xpath expr="//td[@id='product_name']" position="after">
<td name="td_product_brand" class="text-center" t-if="sale_order.env['ir.config_parameter'].sudo().get_param('product_brand_report.show_brand_sales_report')">
<span t-field="line.product_id.product_brand_id.display_name" />
</td>
</xpath>
</template>
</odoo>
30 changes: 10 additions & 20 deletions product_brand_report/views/res_config_settings_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="sale.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@data-key='sale_management']/div[3]" position="inside">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_brand_sales_report"/>
</div>
<div class="o_setting_right_pane">
<label for="show_brand_sales_report"/>
</div>
</div>
</xpath>
<block name="quotation_order_setting_container" position="inside">
<setting id="show_brand_sales_report">
<field name="show_brand_sales_report"/>
</setting>
</block>
</field>
</record>

Expand All @@ -23,16 +18,11 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='invoicing_settings']" position="inside">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="show_brand_invoice_report"/>
</div>
<div class="o_setting_right_pane">
<label for="show_brand_invoice_report"/>
</div>
</div>
</xpath>
<block id="invoicing_settings" position="inside">
<setting id="show_brand_invoice_report">
<field name="show_brand_invoice_report"/>
</setting>
</block>
</field>
</record>
</odoo>

0 comments on commit 1e87180

Please sign in to comment.