Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2664 Prikazi

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)

Avatar
Opusti
Avtor

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)

Avtor

Sorry The Indentation getting mixed up everytime.

Related Posts Odgovori Prikazi Aktivnost
2
okt. 24
1344
2
avg. 25
2754
1
jul. 25
1098
1
avg. 25
1151
0
maj 25
1527