[IMP] hs_code_link: black, isort, prettier

This commit is contained in:
mreficent
2020-09-29 16:04:44 +02:00
parent 8d247d91e0
commit a456fece35
5 changed files with 18 additions and 35 deletions

View File

@@ -1,3 +1 @@
# -*- coding: utf-8 -*-
from . import models

View File

@@ -1,20 +1,14 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "HS Code Link",
"version": "10.0.1.0.0",
"depends": [
'product_harmonized_system',
'delivery',
],
"depends": ["product_harmonized_system", "delivery"],
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"website": "http://www.camptocamp.com",
"license": "AGPL-3",
"category": "Reporting",
"data": [
'views/product_views.xml',
],
'installable': True,
'auto_install': True,
"data": ["views/product_views.xml"],
"installable": True,
"auto_install": True,
}

View File

@@ -1,3 +1 @@
# -*- coding: utf-8 -*-
from . import product

View File

@@ -1,15 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields
from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = 'product.template'
_inherit = "product.template"
hs_code = fields.Char(
related='hs_code_id.hs_code',
readonly=True,
store=True,
)
hs_code = fields.Char(related="hs_code_id.hs_code", readonly=True, store=True)

View File

@@ -1,15 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_template_hide_hs" model="ir.ui.view">
<field name="name">product.template.hs.hidden</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="delivery.product_template_hs_code"/>
<field name="arch" type="xml">
<field name="hs_code" position="attributes">
<attribute name="invisible">True</attribute>
</field>
</field>
</record>
<record id="view_template_hide_hs" model="ir.ui.view">
<field name="name">product.template.hs.hidden</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="delivery.product_template_hs_code" />
<field name="arch" type="xml">
<field name="hs_code" position="attributes">
<attribute name="invisible">True</attribute>
</field>
</field>
</record>
</odoo>