Add method to format warning name with records
issue10507 review346471002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Add method to format warning name with records
|
||||
* Add option to trytond-console to start a readonly transaction
|
||||
* Add support for werkzeug 2.0
|
||||
* Combine search and get_keys in DictSchemaMixin
|
||||
|
||||
@@ -1011,6 +1011,11 @@ class Warning_(ModelSQL, ModelView):
|
||||
name = fields.Char('Name', required=True, select=True)
|
||||
always = fields.Boolean('Always')
|
||||
|
||||
@classmethod
|
||||
def format(cls, name, records):
|
||||
return '%s.%s' % (
|
||||
hashlib.md5(str(records).encode('utf-8')).hexdigest(), name)
|
||||
|
||||
@classmethod
|
||||
def check(cls, warning_name):
|
||||
transaction = Transaction()
|
||||
|
||||
Reference in New Issue
Block a user