Skip to content

Commit

Permalink
[MIG] : Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartinacu committed Jan 22, 2025
1 parent 41b53c5 commit 38a66d1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion document_quick_access/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Document Quick Access",
"summary": """
Document quick access""",
"version": "17.0.1.0.0",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-ux",
Expand Down
10 changes: 6 additions & 4 deletions document_quick_access/models/document_quick_access_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import json
import re

from odoo import _, api, fields, models
from odoo import api, fields, models
from odoo.exceptions import UserError


Expand Down Expand Up @@ -72,11 +72,13 @@ def read_code_action(self, code):
"default_model": "document.quick.access.rule",
"default_method": "read_code_action",
"default_state": "warning",
"default_status": _("Document cannot be found"),
"default_status": self.env._(
"Document cannot be found",
),
}
),
}
record.check_access_rights("read")
record.check_access("read")
result = {
"type": "ir.actions.act_window",
"res_model": record._name,
Expand All @@ -99,4 +101,4 @@ def read_code(self, code):
]
):
return record
raise UserError(_("No format has been found for this record"))
raise UserError(self.env._("No format has been found for this record"))
10 changes: 5 additions & 5 deletions document_quick_access/views/document_quick_access_rule.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@
</search>
</field>
</record>
<record id="document_quick_access_rule_tree_view" model="ir.ui.view">
<record id="document_quick_access_rule_list_view" model="ir.ui.view">
<field
name="name"
>document.quick.access.rule.tree (in document_quick_access)</field>
>document.quick.access.rule.list (in document_quick_access)</field>
<field name="model">document.quick.access.rule</field>
<field name="arch" type="xml">
<tree>
<list>
<field name="name" />
<field name="model_id" />
<field name="barcode_format" />
</tree>
</list>
</field>
</record>
<record id="document_quick_access_rule_act_window" model="ir.actions.act_window">
<field name="name">Document Quick Access Rule</field>
<field name="res_model">document.quick.access.rule</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
<field name="domain">[]</field>
<field name="context">{}</field>
</record>
Expand Down

0 comments on commit 38a66d1

Please sign in to comment.