#12 debrand
This commit is contained in:
parent
5f4bb24894
commit
f874606369
6 changed files with 23 additions and 27 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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"/>
|
||||
|
||||
<record id="report_productbarcode" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_laosa.paperformat_barcode"/>
|
||||
<field name="paperformat_id" ref="product_update_price_last_purchase.paperformat_barcode"/>
|
||||
</record>
|
||||
|
||||
<report
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
/>
|
||||
|
||||
<record id="report_product_product_barcode" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_laosa.paperformat_barcode"/>
|
||||
<field name="paperformat_id" ref="product_update_price_last_purchase.paperformat_barcode"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
|
@ -39,11 +39,11 @@
|
|||
/>
|
||||
|
||||
<record id="report_product_template_barcode" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_laosa.paperformat_barcode"/>
|
||||
<field name="paperformat_id" ref="product_update_price_last_purchase.paperformat_barcode"/>
|
||||
</record>
|
||||
|
||||
<report
|
||||
id="report_simple_barcode_laosa"
|
||||
id="report_simple_barcode_update"
|
||||
string="Product Barcode (PDF)"
|
||||
model="product.product"
|
||||
report_type="qweb-pdf"
|
||||
|
|
@ -52,12 +52,12 @@
|
|||
print_report_name="'Products barcode - %s' % (object.name)"
|
||||
/>
|
||||
|
||||
<record id="report_simple_barcode_laosa" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_laosa.paperformat_barcode"/>
|
||||
<record id="report_simple_barcode_update" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_update_price_last_purchase.paperformat_barcode"/>
|
||||
</record>
|
||||
|
||||
<report
|
||||
id="report_productbarcode_laosa"
|
||||
id="report_productbarcode_update"
|
||||
string="Product Barcode (PDF)"
|
||||
model="product.product"
|
||||
report_type="qweb-pdf"
|
||||
|
|
@ -66,8 +66,8 @@
|
|||
print_report_name="'Products barcode - %s' % (object.name)"
|
||||
/>
|
||||
|
||||
<record id="report_productbarcode_laosa" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_laosa.paperformat_barcode"/>
|
||||
<record id="report_productbarcode_update" model="ir.actions.report" >
|
||||
<field name="paperformat_id" ref="product_update_price_last_purchase.paperformat_barcode"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="report_simple_barcode_laosa" inherit_id="product.report_simple_barcode" >
|
||||
<template id="report_simple_barcode_update" inherit_id="product.report_simple_barcode" >
|
||||
<xpath expr="." position="replace">
|
||||
<t t-name="product.report_simple_barcode">
|
||||
<div style="height: 1.65cm; width: 3.5cm; margin-top: 0.2mm; padding: 0; text-align: center; position: relative; display: inline-table; border: 2px solid black;">
|
||||
|
|
@ -16,13 +16,13 @@
|
|||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="report_productbarcode_laosa" inherit_id="product.report_productbarcode">
|
||||
<template id="report_productbarcode_update" inherit_id="product.report_productbarcode">
|
||||
<xpath expr="." position="replace">
|
||||
<t t-name="product.report_productbarcode">
|
||||
<t t-call="web.html_container">
|
||||
<div class="page" >
|
||||
<t t-foreach="docs" t-as="product">
|
||||
<t t-call="product.report_simple_barcode_laosa">
|
||||
<t t-call="product.report_simple_barcode_update">
|
||||
<t t-set="product" t-value="product"/>
|
||||
</t>
|
||||
</t>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
<!-- Settings Window -->
|
||||
<record id="res_config_settings_view_form_pricelists" model="ir.ui.view">
|
||||
<field name="name">product_update_price_last_purchase.res.config.settings.form</field>
|
||||
<!-- <field name="name">res.config.settings.view.form.inherit.sale.pricelists</field>-->
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval="100"/>
|
||||
<field name="inherit_id" ref="stock.res_config_settings_view_form"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue