mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
intrastat_product: Add xml_attachment_id field
intrastat_product: add mail.activity.mixin and widget in form view product_harmonized_system: remove archive button (use Action menu) All modules: - use super() instead of super(class, self) - Update domain_force in multi-company ir.rule to v13 standard
This commit is contained in:
committed by
Víctor Martínez
parent
c5ee5b54b6
commit
79583cbe64
@@ -99,9 +99,9 @@ class HSCode(models.Model):
|
||||
def create(self, vals):
|
||||
if vals.get("local_code"):
|
||||
vals["local_code"] = vals["local_code"].replace(" ", "")
|
||||
return super(HSCode, self).create(vals)
|
||||
return super().create(vals)
|
||||
|
||||
def write(self, vals):
|
||||
if vals.get("local_code"):
|
||||
vals["local_code"] = vals["local_code"].replace(" ", "")
|
||||
return super(HSCode, self).write(vals)
|
||||
return super().write(vals)
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<field name="model_id" ref="model_hs_code" />
|
||||
<field
|
||||
name="domain_force"
|
||||
>['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
|
||||
>['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -55,6 +55,13 @@
|
||||
<field name="model">hs.code</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="H.S. Code">
|
||||
<field name="active" invisible="1" />
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
text="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
@@ -82,18 +89,6 @@
|
||||
<span class="o_stat_text"> Products</span>
|
||||
</div>
|
||||
</button>
|
||||
<button
|
||||
name="toggle_active"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-archive"
|
||||
>
|
||||
<field
|
||||
name="active"
|
||||
widget="boolean_button"
|
||||
options='{"terminology": "archive"}'
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<group name="main">
|
||||
<field name="local_code" />
|
||||
|
||||
Reference in New Issue
Block a user