Skip to content

Commit

Permalink
[IMP] edi_oca: remove logs' warnings causes
Browse files Browse the repository at this point in the history
- remove usage of ``active_id`` from view
- de-duplicate fields' strings
  • Loading branch information
SilvioC2C committed Dec 2, 2024
1 parent 521c7b1 commit 9c42de4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion edi_oca/models/edi_exchange_type_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ class EDIExchangeTypeRule(models.Model):
ondelete="cascade",
)
model_id = fields.Many2one(
string="Model",
comodel_name="ir.model",
help="Apply to this model",
ondelete="cascade",
)
model = fields.Char(related="model_id.model") # Tech field
model = fields.Char(related="model_id.model", string="Model Tech Name")
enable_domain = fields.Char(
string="Enable on domain", help="Filter domain to be checked on Models"
)
Expand Down
6 changes: 2 additions & 4 deletions edi_oca/views/edi_exchange_type_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@
string="Model rules"
groups="edi_oca.group_edi_advanced_settings_manager"
>
<field
name="rule_ids"
context="{'default_type_id': active_id}"
>
<field name="id" invisible="1" />
<field name="rule_ids" context="{'default_type_id': id}">
<tree decoration-muted="(not active)">
<field name="active" invisible="1" />
<field name="name" />
Expand Down

0 comments on commit 9c42de4

Please sign in to comment.