diff --git a/product_update_price_last_purchase/__manifest__.py b/product_update_price_last_purchase/__manifest__.py index 1b46229..b0b5d3b 100644 --- a/product_update_price_last_purchase/__manifest__.py +++ b/product_update_price_last_purchase/__manifest__.py @@ -1,10 +1,11 @@ { - 'name': 'Product Update Sale Price', - 'version': '12.0.1.1.0', - 'category': 'product', - 'summary' : 'Allow updating list_price when the cost price changes in last purchase.', + 'name': 'Product Update Price From Last Purchase', + 'version': '12.0.2.1.0', + 'category': 'purchase', + 'summary' : 'Product Update Price From Last Purchase', 'description' : """ - * Setea los impuestos del proveedor al mismo tipo que el impuesto de venta. + Personaliza el comportamiento de Product para supermercados: + * setea los impuestos del proveedor al mismo tipo que el impuesto de venta. * Actualiza el precio de venta segĂșn el precio de coste aplicado a una tarifa. * Filtro para productos actualizados el precio de coste. * Filtro para productos que necesitan etiqueta nueva. diff --git a/product_update_price_last_purchase/models/product_template.py b/product_update_price_last_purchase/models/product_template.py index 493dd01..0f7b163 100644 --- a/product_update_price_last_purchase/models/product_template.py +++ b/product_update_price_last_purchase/models/product_template.py @@ -18,7 +18,7 @@ class ProductTemplate(models.Model): def _compute_theoritical_price(self): partner = self.env['res.users'].browse(self.env.uid).partner_id pricelist_obj = self.env['product.pricelist'] - pricelist_id = self.env['ir.config_parameter'].sudo().get_param('product_laosa.product_pricelist_automatic') or False + pricelist_id = self.env['ir.config_parameter'].sudo().get_param('product_update_price_last_purchase.product_pricelist_automatic') or False pricelist = pricelist_obj.browse(int(pricelist_id)) _logger.debug("Calculating price with PriceList : %s" %pricelist.name) if pricelist: diff --git a/product_update_price_last_purchase/models/res_config.py b/product_update_price_last_purchase/models/res_config.py index 9727164..338ad5c 100644 --- a/product_update_price_last_purchase/models/res_config.py +++ b/product_update_price_last_purchase/models/res_config.py @@ -1,9 +1,5 @@ -#import logging - from odoo import models, fields, api -#_logger = logging.getLogger(__name__) - class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' @@ -19,7 +15,7 @@ class ResConfigSettings(models.TransientModel): res = super(ResConfigSettings, self).get_values() config_obj = self.env["ir.config_parameter"] product_pricelist_automatic = config_obj.sudo().get_param( - "product_laosa.product_pricelist_automatic", default=0) + "product_update_price_last_purchase.product_pricelist_automatic", default=0) return res @api.multi @@ -27,7 +23,7 @@ class ResConfigSettings(models.TransientModel): super(ResConfigSettings, self).set_values() config_obj = self.env["ir.config_parameter"] config_obj.sudo().set_param( - "product_laosa.product_pricelist_automatic", + "product_update_price_last_purchase.product_pricelist_automatic", int(self.product_pricelist_automatic.id) ) diff --git a/product_update_price_last_purchase/report/product_barcode.xml b/product_update_price_last_purchase/report/product_barcode.xml index 4f27aa8..1cbce8c 100644 --- a/product_update_price_last_purchase/report/product_barcode.xml +++ b/product_update_price_last_purchase/report/product_barcode.xml @@ -6,11 +6,11 @@ string="Barcode" model="product.product" report_type="qweb-pdf" - name="product_laosa.report_productbarcode_laosa" - file="product_laosa.report_productbarcode_laosa"/> + name="product_update_price_last_purchase.report_productbarcode_update" + file="product_update_price_last_purchase.report_productbarcode_update"/> - + - + @@ -39,11 +39,11 @@ /> - + - - + + - - + + diff --git a/product_update_price_last_purchase/report/report_product_barcode.xml b/product_update_price_last_purchase/report/report_product_barcode.xml index 6f41d88..e7a69fc 100644 --- a/product_update_price_last_purchase/report/report_product_barcode.xml +++ b/product_update_price_last_purchase/report/report_product_barcode.xml @@ -1,6 +1,6 @@ -