commit
eb588c0eb7
|
|
@ -74,7 +74,7 @@ class InternalTransaction(models.Model):
|
|||
self.partner_id = False
|
||||
|
||||
partner_id = fields.Many2one('res.partner', string='Partner', readonly=True,
|
||||
related='to_ids.secretary_id.partner_id')
|
||||
related='to_ids.manager_id.partner_id')
|
||||
cc_ids = fields.Many2many(comodel_name='cm.entity', relation='internal_entity_cc_rel',
|
||||
column1='internal_id', column2='entity_id', string='CC To')
|
||||
|
||||
|
|
|
|||
|
|
@ -122,8 +122,8 @@ class Transaction(models.Model):
|
|||
def default_employee_id(self):
|
||||
user = self.env.user
|
||||
em = self.env['cm.entity'].search([('user_id', '=', user.id)], limit=1)
|
||||
#return len(em) and em or self.env['cm.entity']
|
||||
return em
|
||||
return len(em) and em or self.env['cm.entity']
|
||||
#return em
|
||||
|
||||
def compute_receive_id(self):
|
||||
for rec in self:
|
||||
|
|
@ -323,8 +323,8 @@ class Transaction(models.Model):
|
|||
to_id = transaction.to_ids[0].id
|
||||
if transaction.to_ids[0].type != 'employee':
|
||||
to_id = transaction.to_ids.manager_id.id
|
||||
if transaction.subject_type_id.transaction_need_approve or transaction.preparation_id.need_approve and transaction.state == 'to_approve':
|
||||
to_id = transaction.preparation_id.manager_id.id
|
||||
# if transaction.subject_type_id.transaction_need_approve or transaction.preparation_id.need_approve and transaction.state == 'to_approve':
|
||||
# to_id = transaction.preparation_id.manager_id.id
|
||||
transaction.trace_ids.create({
|
||||
'action': action,
|
||||
'to_id': to_id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue