Skip to content

Commit

Permalink
Update fsm_person.py
Browse files Browse the repository at this point in the history
  • Loading branch information
max3903 authored Jul 18, 2019
1 parent d32136d commit 9961bb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fieldservice_purchase/models/fsm_person.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class FSMPerson(models.Model):
def _compute_pricelist_count(self):
for worker in self:
worker.pricelist_count = self.env['product.supplierinfo'].\
search_count([('name', '=', worker.name)])
search_count([('name', '=', worker.partner_id.id)])

@api.multi
def action_view_pricelists(self):
for worker in self:
pricelist = self.env['product.supplierinfo'].search(
[('name', '=', worker.name)])
[('name', '=', worker.partner_id.id)])
action = self.env.ref(
'product.product_supplierinfo_type_action').read()[0]
if len(pricelist) == 1:
Expand Down

0 comments on commit 9961bb3

Please sign in to comment.