Skip to content

Commit

Permalink
[FIX]Fix supplier search for variant (#108)
Browse files Browse the repository at this point in the history

* [10.0][FIX]Fix supplier search for variant

* fix flake8

* use _select_seller
  • Loading branch information
luc-demeyer authored and pedrobaeza committed May 28, 2019
1 parent 13a3cb8 commit 741ab98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base_ubl/models/ubl.py
Expand Up @@ -342,9 +342,9 @@ def _ubl_add_item(
if product:
if type == 'purchase':
if seller:
sellers = self.env['product.supplierinfo'].search([
('name', '=', seller.id),
('product_tmpl_id', '=', product.product_tmpl_id.id)])
sellers = product._select_seller(
partner_id=seller, quantity=0.0, date=None,
uom_id=False)
if sellers:
product_name = sellers[0].product_name
seller_code = sellers[0].product_code
Expand Down

0 comments on commit 741ab98

Please sign in to comment.