Skip to content

Commit

Permalink
pep8 pyflakes
Browse files Browse the repository at this point in the history
  • Loading branch information
gborelli committed Nov 10, 2014
1 parent 9cfd34c commit a65cd84
Show file tree
Hide file tree
Showing 5 changed files with 274 additions and 101 deletions.
12 changes: 8 additions & 4 deletions sale_commission/model/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,12 @@ class sale_order(models.Model):
# if context is None:
# context = {}
# agent_pool = self.pool.get('sale.order.agent')
# res = super(sale_order, self).create(cr, uid, values, context=context)
# res = super(sale_order, self).create(
# cr, uid, values, context=context)
# if 'sale_agent_ids' in values:
# for sale_order_agent in values['sale_agent_ids']:
# agent_pool.write(cr, uid, sale_order_agent[1], {'sale_id': res})
# agent_pool.write(
# cr, uid, sale_order_agent[1], {'sale_id': res})
# return res

# XXX: It doesn't work with Odoo v8.0 and I think it is not necessary
Expand All @@ -122,8 +124,10 @@ class sale_order(models.Model):
# if sale_order_agent[2]:
# sale_order_agent[2]['sale_id'] = id
# else:
# agent_pool.unlink(cr, uid, sale_order_agent[1], context=context)
# return super(sale_order, self).write(cr, uid, ids, values, context=context)
# agent_pool.unlink(
# cr, uid, sale_order_agent[1], context=context)
# return super(sale_order, self).write(
# cr, uid, ids, values, context=context)

def onchange_partner_id(self, cr, uid, ids, part, context=None):
"""Agent id field will be changed according to new partner
Expand Down
Loading

0 comments on commit a65cd84

Please sign in to comment.