mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
quality_control * PEP8 * Travis * Size in field (deprecated)
This commit is contained in:
committed by
lreficent
parent
5eed926b73
commit
e5d34062ba
@@ -120,19 +120,13 @@ class QcProof(orm.Model):
|
|||||||
'qc_proof_posible_value_rel', 'proof_id',
|
'qc_proof_posible_value_rel', 'proof_id',
|
||||||
'posible_value_id', 'Posible Values'),
|
'posible_value_id', 'Posible Values'),
|
||||||
'synonyms': fields.function(_synonyms, method=True, type='char',
|
'synonyms': fields.function(_synonyms, method=True, type='char',
|
||||||
size='1000', string='Synonyms',
|
string='Synonyms', store=False),
|
||||||
store=False),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'active': lambda *a: True,
|
'active': lambda *a: True,
|
||||||
}
|
}
|
||||||
|
|
||||||
_sql_constraints = [
|
|
||||||
('proof_method_unique', 'UNIQUE (id, method_id)',
|
|
||||||
_('Proof-Method relation alredy exists!')),
|
|
||||||
]
|
|
||||||
|
|
||||||
def name_search(self, cr, uid, name='', args=None, operator='ilike',
|
def name_search(self, cr, uid, name='', args=None, operator='ilike',
|
||||||
context=None, limit=None):
|
context=None, limit=None):
|
||||||
result = super(QcProof, self).name_search(cr, uid, name=name,
|
result = super(QcProof, self).name_search(cr, uid, name=name,
|
||||||
@@ -147,7 +141,7 @@ class QcProof(orm.Model):
|
|||||||
limit=limit)
|
limit=limit)
|
||||||
syns = [x[0] for x in syns]
|
syns = [x[0] for x in syns]
|
||||||
for syn in synonym_obj.browse(cr, uid, syns, context=context):
|
for syn in synonym_obj.browse(cr, uid, syns, context=context):
|
||||||
if not syn.proof_id.id in ids:
|
if syn.proof_id.id not in ids:
|
||||||
new_ids.append(syn.proof_id.id)
|
new_ids.append(syn.proof_id.id)
|
||||||
result += self.name_get(cr, uid, new_ids, context=context)
|
result += self.name_get(cr, uid, new_ids, context=context)
|
||||||
return result
|
return result
|
||||||
@@ -258,7 +252,7 @@ class QcTestTemplate(orm.Model):
|
|||||||
_description = 'Test Template'
|
_description = 'Test Template'
|
||||||
|
|
||||||
def _links_get(self, cr, uid, context=None):
|
def _links_get(self, cr, uid, context=None):
|
||||||
#TODO: Select models
|
# TODO: Select models
|
||||||
link_obj = self.pool['res.request.link']
|
link_obj = self.pool['res.request.link']
|
||||||
ids = link_obj.search(cr, uid, [], context=context)
|
ids = link_obj.search(cr, uid, [], context=context)
|
||||||
res = link_obj.read(cr, uid, ids, ['object', 'name'], context=context)
|
res = link_obj.read(cr, uid, ids, ['object', 'name'], context=context)
|
||||||
|
|||||||
Reference in New Issue
Block a user