Small fixes/enhancements in purchase_suggest
This commit is contained in:
@@ -37,7 +37,7 @@ class PurchaseSuggestionGenerate(models.TransientModel):
|
|||||||
'product.category', string='Product Categories')
|
'product.category', string='Product Categories')
|
||||||
seller_ids = fields.Many2many(
|
seller_ids = fields.Many2many(
|
||||||
'res.partner', string='Suppliers',
|
'res.partner', string='Suppliers',
|
||||||
domain=[('supplier', '=', True), ('is_company', '=', True)])
|
domain=[('supplier', '=', True)])
|
||||||
location_id = fields.Many2one(
|
location_id = fields.Many2one(
|
||||||
'stock.location', string='Stock Location', required=True,
|
'stock.location', string='Stock Location', required=True,
|
||||||
default=lambda self: self.env.ref('stock.stock_location_stock'))
|
default=lambda self: self.env.ref('stock.stock_location_stock'))
|
||||||
@@ -227,7 +227,7 @@ class PurchaseSuggestPoCreate(models.TransientModel):
|
|||||||
pick_types = spto.search(
|
pick_types = spto.search(
|
||||||
pick_type_dom + [('default_location_dest_id', '=', location.id)])
|
pick_type_dom + [('default_location_dest_id', '=', location.id)])
|
||||||
if not pick_types:
|
if not pick_types:
|
||||||
pick_types = spto.search(pick_type_domain)
|
pick_types = spto.search(pick_type_dom)
|
||||||
if not pick_types:
|
if not pick_types:
|
||||||
raise Warning(_(
|
raise Warning(_(
|
||||||
"Make sure you have at least an incoming picking "
|
"Make sure you have at least an incoming picking "
|
||||||
|
|||||||
Reference in New Issue
Block a user