[IMP] delivery: HS codes for product
HS Code is a standardized code used to describe products categories, and facilitate customs clearance. (https://en.wikipedia.org/wiki/Harmonized_System) Some international transporters require HS codes and use them. We allow users to store them on product.template's.
This commit is contained in:
@@ -18,6 +18,7 @@ invoices from picking, the system is able to add and compute the shipping line.
|
||||
'security/ir.model.access.csv',
|
||||
'views/delivery_view.xml',
|
||||
'views/partner_view.xml',
|
||||
'views/product_template_view.xml',
|
||||
'data/delivery_data.xml',
|
||||
'views/report_shipping.xml',
|
||||
'views/report_deliveryslip.xml'
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from openerp import api, models
|
||||
from openerp import api, models, fields
|
||||
|
||||
|
||||
class ProductTemplate(models.Model):
|
||||
_inherit = 'product.template'
|
||||
|
||||
hs_code = fields.Char(string="HS Code", help="Standardized code for international shipping and goods declaration", oldname="x_hs_code")
|
||||
|
||||
@api.multi
|
||||
def write(self, vals):
|
||||
res = super(ProductTemplate, self).write(vals)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="delivery.product_template_hs_code">
|
||||
<field name="name">product.template.form.hs_code</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<field name="active" position="after">
|
||||
<field name="hs_code"/>
|
||||
</field>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user