تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
5734 أدوات العرض

Hello

I have Odoo 8.0 Version and a migrating form Openerp 6.1 where i used:

amount = self.pool.get('stock.location')._product_get(cr, uid, order.name.warehouse_id.lot_stock_id.id, [product], {'uom': uom, 'to_date': order.date, 'compute_child': False})[product]


but in V8 does not exist this function.

I searched with google and find it some like this

product = self.env['product.product'].browse(product_id.id)

available_qty = product.with_context({'location' : self.name.location_id_sales.id, 'date': self.date}).qty_available

My doubt is: in this context can i send date? 

with_context({'location' : self.name.location_id_sales.id, 'date': self.date}) 

Somebody  help me?

Best regards




الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
Locations تم الحل
1
مارس 15
8560
8
ديسمبر 23
37861
1
أكتوبر 23
4094
2
أغسطس 21
4734
6
أكتوبر 17
13180