product_library adds some fields to product and some utilities addons from OCA

This commit is contained in:
santiky 2021-08-06 13:03:47 +02:00
parent 9145e0cabe
commit 6c8876b991
Signed by: snt
GPG key ID: A9FD34930EADBE71
334 changed files with 92878 additions and 0 deletions

View file

@ -0,0 +1,2 @@
from . import models

View file

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import models
#import controllers

View file

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
{
'name': 'Product Library',
'category': 'Product',
'summary': 'Add library related fields to product',
'version': '0.1',
'description': """
Add several fields to product for libraries
==================================================
Autor, coleccion, ISBN,....
""",
'author': 'Criptomart',
'depends': ['product'],
'data': [
'views/product.xml',
#'views/templates.xml',
'data/product_code_sequence.xml',
],
'demo': [],
'installable': True,
'auto_install': False,
'application': True,
}

View file

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
{
'name': 'Product Library',
'category': 'Product',
'summary': 'Add library related fields to product',
'version': '0.1',
'description': """
Add several fields to product for libraries
==================================================
Autor, coleccion, ISBN,....
""",
'author': 'Criptomart',
'depends': ['product'],
'data': [
'views/product.xml',
#'views/templates.xml',
'data/product_code_sequence.xml',
],
'installable': True,
'auto_install': False,
'application': True,
}

View file

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- últimas referencias de sigelib
DD-LP0880
DD-CD2514
DD-SG0668
DD-LB0710
DD-LX0491
DD-DVD0207
DD-TX0061
-->
<openerp>
<data noupdate="1">
<!-- <record id="seq_type_product_code_lp" model="ir.sequence.type">
<field name="name">Product Code LP</field>
<field name="code">product.template.code.lp</field>
</record>
<record id="seq_type_product_code_k7" model="ir.sequence.type">
<field name="name">Product Code K7</field>
<field name="code">product.template.code.k7</field>
</record>
<record id="seq_type_product_code_cd" model="ir.sequence.type">
<field name="name">Product Code CD</field>
<field name="code">product.template.code.cd</field>
</record>
<record id="seq_type_product_code_sg" model="ir.sequence.type">
<field name="name">Product Code SG</field>
<field name="code">product.template.code.sg</field>
</record>
<record id="seq_type_product_code_vi" model="ir.sequence.type">
<field name="name">Product Code video</field>
<field name="code">product.template.code.vi</field>
</record>
<record id="seq_type_product_code_tx" model="ir.sequence.type">
<field name="name">Product Code Textil</field>
<field name="code">product.template.code.tx</field>
</record>
<record id="seq_type_product_code_lb" model="ir.sequence.type">
<field name="name">Product Code Libros</field>
<field name="code">product.template.code.lb</field>
</record>
<record id="seq_type_product_code_lx" model="ir.sequence.type">
<field name="name">Product Code Libelos</field>
<field name="code">product.template.code.lx</field>
</record>
-->
<record id="seq_product_code_lp" model="ir.sequence">
<field name="name">Product Code LP</field>
<field name="code">product.template.code.lp</field>
<field name="prefix">DD-LP</field>
<field name="number_next">3057</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
<record id="seq_product_code_k7" model="ir.sequence">
<field name="name">Product Code Casete</field>
<field name="code">product.template.code.k7</field>
<field name="prefix">DD-K7</field>
<field name="number_next">3006</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
<record id="seq_product_code_cd" model="ir.sequence">
<field name="name">Product Code CD</field>
<field name="code">product.template.code.cd</field>
<field name="prefix">DD-CD</field>
<field name="number_next">3040</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
<record id="seq_product_code_sg" model="ir.sequence">
<field name="name">Product Code Single</field>
<field name="code">product.template.code.sg</field>
<field name="prefix">DD-SG</field>
<field name="number_next">3022</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
<record id="seq_product_code_lb" model="ir.sequence">
<field name="name">Product Code Libro</field>
<field name="code">product.template.code.lb</field>
<field name="prefix">DD-LB</field>
<field name="number_next">3055</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
<record id="seq_product_code_lx" model="ir.sequence">
<field name="name">Product Code Libelos</field>
<field name="code">product.template.code.lx</field>
<field name="prefix">DD-LX</field>
<field name="number_next">3015</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
<record id="seq_product_code_vi" model="ir.sequence">
<field name="name">Product Code Video</field>
<field name="code">product.template.code.vi</field>
<field name="prefix">DD-VI</field>
<field name="number_next">3002</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
<record id="seq_product_code_tx" model="ir.sequence">
<field name="name">Product Code Textil</field>
<field name="code">product.template.code.tx</field>
<field name="prefix">DD-TX</field>
<field name="number_next">3019</field>
<field name="padding">4</field>
<field name="company_id" eval="False"/>
</record>
</data>
</openerp>

View file

@ -0,0 +1,2 @@
from . import res_product

View file

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import res_product

View file

@ -0,0 +1,24 @@
# Copyright (C) 2021: Criptomart (https://criptomart.net)
# @author Santi Noreña (<santi@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 Product(models.Model):
_inherit = "product.template"
subtitle = fields.Char('Subtítulo')
editorial = fields.Char('Editorial')
pais_edicion = fields.Char('País de Edicion')
colacion = fields.Char('Colación')
autor = fields.Char('Autor')
isbn = fields.Char('ISBN')
coleccion = fields.Char('Colección')
subcoleccion = fields.Char('Subcolección')
idioma = fields.Char('Idioma')
fecha_entrada = fields.Char('Fecha de entrada')

View file

@ -0,0 +1,25 @@
# Copyright (C) 2021: Criptomart (https://criptomart.net)
# @author Santi Noreña (<santi@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"
subtitle = fields.Char('Subtítulo')
editorial = fields.Char('Editorial')
pais_edicion = fields.Char('País de Edicion')
colacion = fields.Char('Colación')
autor = fields.Char('Autor')
isbn = fields.Char('ISBN')
coleccion = fields.Char('Colección')
subcoleccion = fields.Char('Subcolección')
idioma = fields.Char('Idioma')
fecha_entrada = fields.Char('Fecha de entrada')

View file

@ -0,0 +1,24 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="product_library_form_config">
<field name="name">product.product.library.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="list_price" position="after">
<field name="subtitle"/>
<field name="autor"/>
<field name="isbn"/>
<field name="editorial"/>
<field name="pais_edicion"/>
<field name="fecha_entrada"/>
<field name="colacion"/>
<field name="coleccion"/>
<field name="subcoleccion"/>
<field name="idioma"/>
</field>
</field>
</record>
</data>
</openerp>

View file

@ -0,0 +1,14 @@
<openerp>
<data>
<template id="report_external_layout_header_custom" inherit_id="report.external_layout_header" name="Report Layout Header NIF" priority="17">
<xpath expr="//div[@t-field='company.partner_id']" position="before">
<!-- <div t-field="company.partner_id"
t-field-options="{'widget': 'contact',
'fields': ['address','name'],
'no_marker': true }"
/> -->
<span t-field="company.vat" />
</xpath>
</template>
</data>
</openerp>