Revert "[FIX] product_form: remove hs code and duplicate internal note"
The field hs_code has been removed but will be used in future tasks and
customers have already filled this field.
So we set it back in a sperate module to respect our stable policy.
This reverts commit 2d738f8563
closes odoo/odoo#28071
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import models
|
||||
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
|
||||
{
|
||||
'name': 'Delivery HS Code',
|
||||
'version': '1.0',
|
||||
'category': 'Stock',
|
||||
'description': """
|
||||
Set back field hs_code on pruduct template.
|
||||
==============================================================
|
||||
|
||||
""",
|
||||
'depends': ['delivery'],
|
||||
'data': [
|
||||
'views/product_template_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': True,
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import product_template
|
||||
@@ -0,0 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import 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")
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="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">
|
||||
<xpath expr="//group[@name='group_lots_and_weight']" position="inside">
|
||||
<field name="hs_code"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user