product_retail_cm gestiona las ventas a minoristas
quitado archivo de backup
This commit is contained in:
parent
1ff451205a
commit
3dffeeba00
5 changed files with 98 additions and 0 deletions
2
product_retail_cm/__init__.py
Normal file
2
product_retail_cm/__init__.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
from . import models
|
||||
|
36
product_retail_cm/__manifest__.py
Normal file
36
product_retail_cm/__manifest__.py
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
'name': 'Product Retail',
|
||||
'category': 'Product',
|
||||
'summary': 'Gestiona productos en distribución / Venta a minoristas',
|
||||
'version': '12.0.1.0.0',
|
||||
'description': """
|
||||
|
||||
Gestiona productos en distribución / Venta a minoristas
|
||||
==================================================
|
||||
* Añade campo a product: En Distribución y margin de minoristas.
|
||||
* Filtro de productos en distribución en las vistas de productos
|
||||
|
||||
ToDo:
|
||||
* Configuración para elegir lista de precios a minoristas
|
||||
* Los minoristas se configuran a mano con esa tarifa, público normal con la Tarifa Pública por efecto
|
||||
* los productos con margen configurado se agregan en esa tarifa con el descuento marcado
|
||||
* Impide la venta a minoristas de artículos que no están en distribución
|
||||
""",
|
||||
'author': 'Criptomart',
|
||||
'depends': [
|
||||
'product',
|
||||
],
|
||||
'external_dependencies': {'python': [], 'bin': []},
|
||||
'data': [
|
||||
'views/product.xml',
|
||||
],
|
||||
'qweb': [],
|
||||
'demo': [],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'application': False,
|
||||
"post_load": None,
|
||||
"pre_init_hook": None,
|
||||
"post_init_hook": None,
|
||||
"uninstall_hook": None,
|
||||
}
|
4
product_retail_cm/models/__init__.py
Normal file
4
product_retail_cm/models/__init__.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from . import product_template
|
||||
|
||||
|
||||
|
14
product_retail_cm/models/product_template.py
Normal file
14
product_retail_cm/models/product_template.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Copyright (C) 2022: Criptomart (https://criptomart.net)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
#import logging
|
||||
|
||||
from odoo import tools, models, fields, api, _
|
||||
|
||||
#_logger = logging.getLogger(__name__)
|
||||
|
||||
class ProductTemplate(models.Model):
|
||||
_inherit = "product.template"
|
||||
|
||||
in_distribution = fields.Boolean('En distribución')
|
||||
retail_margin = fields.Float('Margen aplicado a minoristas')
|
42
product_retail_cm/views/product.xml
Normal file
42
product_retail_cm/views/product.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- Copyright (C) 2022: Criptomart (https://criptomart.net)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="product_retail_cm_form_config">
|
||||
<field name="name">product.template.reatil.form</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="sale_ok" position="before">
|
||||
<div>
|
||||
<field name="in_distribution"/>
|
||||
<label for="in_distribution" />
|
||||
</div>
|
||||
</field>
|
||||
<!-- <field name="list_price" position="after" attrs="{'invisible': [('in_distribution', '=', False)]}">
|
||||
<field name="retail_margin" attrs="{'invisible': [('in_distribution', '=', False)]}"/>
|
||||
</field> -->
|
||||
</field>
|
||||
</record>
|
||||
<!--Filter for products in distribution -->
|
||||
<record id="view_product_search_form_inherit_dsitribution" model="ir.ui.view">
|
||||
<field name="name">view.product.search.form.inherit.distribution</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_search_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='services']" position="before">
|
||||
<separator/>
|
||||
<filter string="En Distribución"
|
||||
name="products_dsitribution_filter"
|
||||
domain="[('in_distribution', '=', True)]"
|
||||
help="Products sold to retailers."
|
||||
icon="terp-project"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
Loading…
Add table
Reference in a new issue