Remove _error_messages in ORM object and put the translation in
translation.xml
This commit is contained in:
1 parent
a3336d5f47
commit
da7ce435e0
2 files changed
+26
-4
No files matched your search
@@ -68,6 +68,31 @@
|
||||
<menuitem name="Translations" parent="ir.menu_ir"
|
||||
action="act_translation_form" id="menu_translation_form"/>
|
||||
|
||||
<record model="ir.translation" id="translation_delete_xml_record">
|
||||
<field name="name">None</field>
|
||||
<field name="lang">en_US</field>
|
||||
<field name="type">error</field>
|
||||
<field name="src">You are not allowed to delete this record.</field>
|
||||
<field name="module">ir</field>
|
||||
<field name="fuzzy" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.translation" id="translation_xml_record_desc">
|
||||
<field name="name">None</field>
|
||||
<field name="lang">en_US</field>
|
||||
<field name="type">error</field>
|
||||
<field name="src">This record is part of the base configuration.</field>
|
||||
<field name="module">ir</field>
|
||||
<field name="fuzzy" eval="False"/>
|
||||
</record>
|
||||
<record model="ir.translation" id="translation_write_xml_record">
|
||||
<field name="name">None</field>
|
||||
<field name="lang">en_US</field>
|
||||
<field name="type">error</field>
|
||||
<field name="src">You are not allowed to modify this record.</field>
|
||||
<field name="module">ir</field>
|
||||
<field name="fuzzy" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="act_translation_update_report_init_view_form">
|
||||
<field name="model">ir.translation.update_report.init</field>
|
||||
<field name="type">form</field>
|
||||
|
||||
+1
-4
@@ -519,10 +519,7 @@ class ORM(object):
|
||||
self._constraints = []
|
||||
self._inherit_fields = []
|
||||
self._order = [('id', 'ASC')]
|
||||
self._error_messages = {
|
||||
'delete_xml_record': 'You are not allowed to delete this record.',
|
||||
'xml_record_desc': "This record is part of the base configuration.",
|
||||
'write_xml_record': 'You are not allowed to modify this record.'}
|
||||
self._error_messages = {}
|
||||
# reinit the cache on _columns and _defaults
|
||||
self.__columns = None
|
||||
self.__defaults = None
|
||||
|
||||
Reference in new issue
Block a user