跳至內容
選單
此問題已被標幟
2692 瀏覽次數

if pickings:
for picking in pickings:
if picking.seller_id.name in already_scanned:
exist_in_list = self.env['highest.bill.done.report'].search(
[('name', '=', picking.seller_id.name)])
for each_row in exist_in_list:
if each_row.name in exist_in_list:
new_qty = exist_in_list.write({'quantity': each_row.quantity + 1})
else:
already_scanned.append(picking.seller_id.name)
highest_biller = self.env['highest.bill.done.report'].create(
{'name': picking.seller_id.name, 'quantity': 1})
created_ids.append(highest_biller.id)

頭像
捨棄
作者

The Indentation got mixed up here...This is the correct one....

if pickings:

for picking in pickings:

if picking.seller_id.name in already_scanned:

exist_in_list = self.env['highest.bill.done.report'].search(

[('name', '=', picking.seller_id.name)])

for each_row in exist_in_list:

if each_row.name in exist_in_list:

new_qty = exist_in_list.write({'quantity': each_row.quantity + 1})

else:

already_scanned.append(picking.seller_id.name)

highest_biller = self.env['highest.bill.done.report'].create(

{'name': picking.seller_id.name, 'quantity': 1})

created_ids.append(highest_biller.id)

作者

Sorry The Indentation getting mixed up everytime.

相關帖文 回覆 瀏覽次數 活動
2
10月 24
1364
2
8月 25
2853
1
7月 25
1159
1
8月 25
1152
0
5月 25
1593