Commit 4977b805 authored by Luis Ernesto Garcia Medina's avatar Luis Ernesto Garcia Medina
Browse files

[MERGE] merge with lp:addons-vauxoo

parents 7a24ca0e 06867f95
# -*- encoding: utf-8 -*-
# ############################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
# All Rights Reserved
# ############ Credits #######################################################
# Coded by: Yanina Aular <yani@vauxoo.com>
# Planified by: Moises Lopez <moises@vauxoo.com>
# Audited by: Humberto Arocha <hbto@vauxoo.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 model
from . import tests
# -*- encoding: utf-8 -*-
# ############################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
# All Rights Reserved
# ############ Credits #######################################################
# Coded by: Yanina Aular <yani@vauxoo.com>
# Planified by: Moises Lopez <moises@vauxoo.com>
# Audited by: Humberto Arocha <hbto@vauxoo.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/>.
# ############################################################################
{
"name": "Import Tax and Tariff",
"version": "1.0",
"summary": "Import Tax and Tariff",
"depends": [
"account_accountant",
"stock"],
"author": "Vauxoo",
"description": """
Import Tax and Tariff
=====================
""",
"website": "http://www.vauxoo.com/",
"category": "Accounting",
"data": [
"view/import_tax_view.xml",
"view/tariff_tariff_view.xml",
"security/ir.model.access.csv"],
"demo": [],
"test": [],
"active": False,
"images": [],
"installable": True,
"application": True,
}
# -*- encoding: utf-8 -*-
# ############################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
# All Rights Reserved
# ############ Credits #######################################################
# Coded by: Yanina Aular <yani@vauxoo.com>
# Planified by: Moises Lopez <moises@vauxoo.com>
# Audited by: Humberto Arocha <hbto@vauxoo.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 import_tax
from . import product_template
# -*- encoding: utf-8 -*-
# ############################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
# All Rights Reserved
# ############ Credits #######################################################
# Coded by: Yanina Aular <yani@vauxoo.com>
# Planified by: Moises Lopez <moises@vauxoo.com>
# Audited by: Humberto Arocha <hbto@vauxoo.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 openerp import models, fields
class import_tax_tariff(models.Model):
_name = "import.tax.tariff"
_description = "Import Tax Tariff"
name = fields.Char(required=True)
tariff_ids = fields.One2many('tariff.tariff',
'import_tax_id',
string='Tariff')
product_category_id = fields.Many2one('product.category',
string='Product Category',)
description = fields.Text()
class tariff_tariff(models.Model):
_name = "tariff.tariff"
name = fields.Char(required=True)
description = fields.Text()
code = fields.Char()
unit_value = fields.Float(digits=(6, 2), help="Tariff per Unit of Product")
tax_percentage = fields.Float(digits=(6, 2), help="Tax Percentage")
minimum = fields.Float(digits=(6, 2), help="Amount Minimun")
import_tax_id = fields.Many2one('import.tax.tariff',
ondelete='set null',
string='Import Tax',
index=True)
type_id = fields.Selection([('ad_valorem', "Ad Valorem"),
('specific', "Specific"),
('mixed', "Mixed")], string='Type',
default='ad_valorem')
# -*- encoding: utf-8 -*-
# ############################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
# All Rights Reserved
# ############ Credits #######################################################
# Coded by: Yanina Aular <yani@vauxoo.com>
# Planified by: Moises Lopez <moises@vauxoo.com>
# Audited by: Humberto Arocha <hbto@vauxoo.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 openerp import models, fields
class product_template(models.Model):
_inherit = "product.template"
tariff_id = fields.Many2one("import.tax.tariff", string="Tariff")
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_import_tax_tariff,access_import_tax_tariff,model_import_tax_tariff,,1,1,1,1
access_tariff_tariff,access_tariff_tariff,model_tariff_tariff,,1,1,1,1
# -*- encoding: utf-8 -*-
# ############################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
# All Rights Reserved
# ############ Credits #######################################################
# Coded by: Yanina Aular <yani@vauxoo.com>
# Planified by: Moises Lopez <moises@vauxoo.com>
# Audited by: Humberto Arocha <hbto@vauxoo.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/>.
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_import_tax_tariff_tree" model="ir.ui.view">
<field name="name">import.tax.tariff</field>
<field name="model">import.tax.tariff</field>
<field name="arch" type="xml">
<tree string="Import Tax - Tariff">
<field name="name"/>
</tree>
</field>
</record>
<record id="view_import_tax_tariff_form" model="ir.ui.view">
<field name="name">import.tax.tariff</field>
<field name="model">import.tax.tariff</field>
<field name="arch" type="xml">
<form string="Import Tax - Tariff">
<sheet>
<label for="name"/>
<field name="name" nolabel="1"/>
<label for="product_category_id"/>
<field name="product_category_id"/>
<label for="description"/>
<field name="description" nolabel="1"/>
<notebook>
<page>
<field name="tariff_ids">
<tree editable="bottom">
<field name="name"/>
<field name="description"/>
<field name="code" required="True"/>
<field name="type_id" required="True"/>
<field name="minimum" required="1"/>
<field name="tax_percentage" attrs="{'required': [('type_id', 'in', ['ad_valorem', 'mixed'])], 'readonly': [('type_id', '=', 'specific')]}"/>
<field name="unit_value" attrs="{'required': [('type_id', 'in', ['specific', 'mixed'])], 'readonly': [('type_id', '=', 'ad_valorem')]}"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="action_import_tax_tariff" model="ir.actions.act_window">
<field name="name">Import Tax - Tariff</field>
<field name="res_model">import.tax.tariff</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_import_tax_tariff_tree"/>
<!--
<field name="search_view_id" ref="view_tax_code_search"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new tax code.
</p><p>
Depending on the country, a tax code is usually a cell to fill
in your legal tax statement. Odoo allows you to define the
tax structure and each tax computation will be registered in
one or several tax code.
</p>
</field>
-->
</record>
<menuitem action="action_import_tax_tariff"
id="menu_action_import_tax_tariff"
parent="account.next_id_27"
sequence="20" groups="base.group_no_one"/>
<record id="view_import_tax_tariff_inh_product_template" model="ir.ui.view">
<field name="name">import.tax.tariff.product.template</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='taxes_id']" position="after">
<field name="tariff_id"/>
</xpath>
</field>
</record>
</data>
</openerp>
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_tariff_tariff_form" model="ir.ui.view">
<field name="name">view.tariff.tariff</field>
<field name="model">tariff.tariff</field>
<field name="arch" type="xml">
<form string="Import Tax - Tariff" version="7.0">
<sheet>
<label for="name"/>
<field name="name" nolabel="1"/>
<label for="code"/>
<field name="code" required="True"/>
<label for="minimum"/>
<field name="minimum" required="True"/>
<label for="type_id"/>
<field name="type_id" required="True"/>
<label for="tax_percentage"/>
<field name="tax_percentage" attrs="{'required': [('type_id', 'in', ['ad_valorem', 'mixed'])], 'readonly': [('type_id', '=', 'specific')]}"/>
<label for="unit_value"/>
<field name="unit_value" attrs="{'required': [('type_id', 'in', ['specific', 'mixed'])], 'readonly': [('type_id', '=', 'ad_valorem')]}"/>
<label for="description"/>
<field name="description"/>
</sheet>
</form>
</field>
</record>
<record id="action_tariff_tariff" model="ir.actions.act_window">
<field name="name">Tariff Tariff</field>
<field name="res_model">tariff.tariff</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_tariff_tariff_form"/>
</record>
<menuitem action="action_tariff_tariff"
id="menu_action_tariff_tariff"
parent="account.next_id_27"
sequence="30" groups="base.group_no_one"/>
</data>
</openerp>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment