Skip to content

Commit

Permalink
[IMP] product_pricelist_direct_print: Add order option + change widge…
Browse files Browse the repository at this point in the history
…t for pricelist (OCA#290)
  • Loading branch information
carlosdauden authored and therbin200 committed Nov 26, 2024
1 parent 99c37ab commit 48bc5c5
Show file tree
Hide file tree
Showing 7 changed files with 247 additions and 13 deletions.
2 changes: 1 addition & 1 deletion product_pricelist_direct_print/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Product Pricelist Direct Print",
"summary": "Print price list from menu option, product templates, "
"products variants or price lists",
"version": "9.0.1.0.0",
"version": "9.0.1.1.0",
"category": "Product",
"website": "http://www.tecnativa.com",
"author": "Tecnativa, "
Expand Down
32 changes: 24 additions & 8 deletions product_pricelist_direct_print/i18n/es.po
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_pricelist_direct_print
#
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-09 03:40+0000\n"
"PO-Revision-Date: 2017-03-09 03:40+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"POT-Creation-Date: 2018-02-19 18:53+0100\n"
"PO-Revision-Date: 2018-02-19 19:00+0100\n"
"Last-Translator: Carlos Dauden <carlos.dauden@tecnativa.com>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.7.1\n"

#. module: product_pricelist_direct_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document
Expand Down Expand Up @@ -76,7 +77,7 @@ msgstr "Creado en"
#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_id
msgid "Customer"
msgstr ""
msgstr "Cliente"

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_display_name
Expand All @@ -93,6 +94,11 @@ msgstr "Opciones de filtrado"
msgid "ID"
msgstr "ID (identificación)"

#. module: product_pricelist_direct_print
#: selection:product.pricelist.print,order_field:0
msgid "Internal Reference"
msgstr "Referencia interna"

#. module: product_pricelist_direct_print
#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_ids
#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids
Expand All @@ -114,6 +120,16 @@ msgstr "Última actualización de"
msgid "Last Updated on"
msgstr "Última actualización en"

#. module: product_pricelist_direct_print
#: selection:product.pricelist.print,order_field:0
msgid "Name"
msgstr "Nombre"

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_order_field
msgid "Order"
msgstr "Orden"

#. module: product_pricelist_direct_print
#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_partner_pricelist_print
#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_pricelist_print
Expand Down Expand Up @@ -168,7 +184,7 @@ msgid "Show variants"
msgstr "Mostrar variantes"

#. module: product_pricelist_direct_print
#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:61
#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:65
#, python-format
msgid "You must set price list or any show price option."
msgstr "Debe seleccionar una tarifa o alguna opción mostrar precio."
Expand Down
21 changes: 18 additions & 3 deletions product_pricelist_direct_print/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_pricelist_direct_print
#
#
# Translators:
# leemannd <denis.leemann@camptocamp.com>, 2017
msgid ""
Expand All @@ -12,10 +12,10 @@ msgstr ""
"PO-Revision-Date: 2017-03-09 03:40+0000\n"
"Last-Translator: leemannd <denis.leemann@camptocamp.com>, 2017\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. module: product_pricelist_direct_print
Expand Down Expand Up @@ -93,6 +93,11 @@ msgstr ""
msgid "ID"
msgstr ""

#. module: product_pricelist_direct_print
#: selection:product.pricelist.print,order_field:0
msgid "Internal Reference"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_ids
#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids
Expand All @@ -114,6 +119,16 @@ msgstr "Dernière modification par"
msgid "Last Updated on"
msgstr ""

#. module: product_pricelist_direct_print
#: selection:product.pricelist.print,order_field:0
msgid "Name"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_order_field
msgid "Order"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_partner_pricelist_print
#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_pricelist_print
Expand Down Expand Up @@ -168,7 +183,7 @@ msgid "Show variants"
msgstr ""

#. module: product_pricelist_direct_print
#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:61
#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:65
#, python-format
msgid "You must set price list or any show price option."
msgstr ""
Expand Down
190 changes: 190 additions & 0 deletions product_pricelist_direct_print/i18n/product_pricelist_direct_print.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_pricelist_direct_print
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: product_pricelist_direct_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document
msgid "<strong>Cost Price</strong>"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document
msgid "<strong>Currency</strong>:<br/>"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document
msgid "<strong>Description</strong>"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document
msgid "<strong>List Price</strong>"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document
msgid "<strong>Price List Name</strong>:<br/>"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document
msgid "<strong>Print date</strong>:<br/>"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document
msgid "<strong>Sale Price</strong>"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print
msgid "Cancel"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_categ_ids
msgid "Categories"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_uid
msgid "Created by"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_create_date
msgid "Created on"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_partner_id
msgid "Customer"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_display_name
msgid "Display Name"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print
msgid "Filter Options"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_id
msgid "ID"
msgstr ""

#. module: product_pricelist_direct_print
#: selection:product.pricelist.print,order_field:0
msgid "Internal Reference"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_ids
#: model:ir.model.fields,help:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids
msgid "Keep empty for all products"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print___last_update
msgid "Last Modified on"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_uid
msgid "Last Updated by"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_write_date
msgid "Last Updated on"
msgstr ""

#. module: product_pricelist_direct_print
#: selection:product.pricelist.print,order_field:0
msgid "Name"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_order_field
msgid "Order"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_partner_pricelist_print
#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_pricelist_print
#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_product_pricelist_print
#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_product_template_pricelist_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.report_product_pricelist_document
msgid "Price List"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_pricelist_id
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print
msgid "Pricelist"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print
msgid "Print"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.actions.act_window,name:product_pricelist_direct_print.action_pricelist_print
#: model:ir.ui.menu,name:product_pricelist_direct_print.menu_product_pricelist_print
msgid "Print Price List"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.actions.report.xml,name:product_pricelist_direct_print.action_report_product_pricelist
msgid "Product Price List"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_ids
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_product_tmpl_ids
#: model:ir.ui.view,arch_db:product_pricelist_direct_print.view_product_pricelist_print
msgid "Products"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_standard_price
msgid "Show Cost Price"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_sale_price
msgid "Show Sale Price"
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model.fields,field_description:product_pricelist_direct_print.field_product_pricelist_print_show_variants
msgid "Show variants"
msgstr ""

#. module: product_pricelist_direct_print
#: code:addons/product_pricelist_direct_print/wizards/product_pricelist_print.py:65
#, python-format
msgid "You must set price list or any show price option."
msgstr ""

#. module: product_pricelist_direct_print
#: model:ir.model,name:product_pricelist_direct_print.model_product_pricelist_print
msgid "product.pricelist.print"
msgstr ""

Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@
<t t-set="category_products"
t-value="products and products.with_context(categ_id=category.id).filtered(lambda x: x.categ_id.id == x.env.context['categ_id']) or
products.search([('sale_ok','=',True), ('categ_id','=',category.id)])"/>
<t t-if="o.order_field == 'name'">
<t t-set="category_products"
t-value="category_products.sorted(lambda x: x.name)"/>
</t>
<t t-if="o.order_field == 'default_code'">
<t t-set="category_products"
t-value="category_products.sorted(lambda x: x.default_code)"/>
</t>
<tr t-if="category_products">
<td colspan="100">
<strong t-field="category.name"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class ProductPricelistPrint(models.TransientModel):
)
show_standard_price = fields.Boolean(string='Show Cost Price')
show_sale_price = fields.Boolean(string='Show Sale Price')
order_field = fields.Selection([
('name', 'Name'),
('default_code', 'Internal Reference'),
], string='Order')

@api.model
def default_get(self, fields):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
<field name="arch" type="xml">
<form>
<group string="Pricelist" invisible="context.get('active_model') in ('product.pricelist', 'res.partner')">
<field name="pricelist_id" widget="selection" options="{'no_create': True}"/>
<field name="pricelist_id" options="{'no_create': True, 'no_create_edit': True}"/>
</group>
<group string="Filter Options" col="4">
<field name="show_sale_price"/>
<field name="show_standard_price"/>
<field name="order_field"/>
<field name="show_variants" groups="product.group_product_variant"/>
</group>
<group attrs="{'invisible':['|',('product_tmpl_ids','!=',[]), ('product_ids','!=',[])]}">
Expand Down

0 comments on commit 48bc5c5

Please sign in to comment.