bug
parent
c5b922e7ff
commit
da14324956
|
@ -5,7 +5,7 @@
|
||||||
</button>
|
</button>
|
||||||
</head>
|
</head>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="available" readonly="1"/>
|
<field name="available"/>
|
||||||
<field name="sequence"/>
|
<field name="sequence"/>
|
||||||
<field name="note"/>
|
<field name="note"/>
|
||||||
<field name="company_id" invisible="1"/>
|
<field name="company_id" invisible="1"/>
|
||||||
|
|
|
@ -492,6 +492,13 @@ class HDCase(Model):
|
||||||
wh_loc_id=stock_journal.location_from_id.id
|
wh_loc_id=stock_journal.location_from_id.id
|
||||||
cust_loc_id=stock_journal.location_to_id.id
|
cust_loc_id=stock_journal.location_to_id.id
|
||||||
print("get location from stock journal %s "%(stock_journal.name))
|
print("get location from stock journal %s "%(stock_journal.name))
|
||||||
|
elif obj.branch_id:
|
||||||
|
stock_journal=obj.branch_id.pick_out_journal_id
|
||||||
|
if stock_journal:
|
||||||
|
wh_loc_id=stock_journal.location_from_id.id
|
||||||
|
cust_loc_id=stock_journal.location_to_id.id
|
||||||
|
print("get location from stock journal %s "%(stock_journal.name))
|
||||||
|
|
||||||
|
|
||||||
pick_vals={
|
pick_vals={
|
||||||
"type": "out",
|
"type": "out",
|
||||||
|
@ -984,11 +991,17 @@ class HDCase(Model):
|
||||||
if mode=='create':
|
if mode=='create':
|
||||||
line_vals=line[1]
|
line_vals=line[1]
|
||||||
amt=line_vals.get("amount",0)
|
amt=line_vals.get("amount",0)
|
||||||
if mode=='delete':
|
elif mode=='delete':
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
|
mode=line[0]
|
||||||
|
if mode=='create':
|
||||||
|
prod_id=line[1]['product_id']
|
||||||
|
prod=get_model("product").browse(prod_id)
|
||||||
|
line['uom_id']=prod.uom_id.id
|
||||||
|
continue
|
||||||
line_id=line[1][0]
|
line_id=line[1][0]
|
||||||
line_vals=line[2]
|
line_vals=line[1]
|
||||||
line=get_model('clinic.hd.case.line').browse(line_id)
|
line=get_model('clinic.hd.case.line').browse(line_id)
|
||||||
amt=line.amount or 0
|
amt=line.amount or 0
|
||||||
total_amt+=amt
|
total_amt+=amt
|
||||||
|
|
|
@ -41,6 +41,7 @@ class SickBed(Model):
|
||||||
'available': True,
|
'available': True,
|
||||||
"company_id": lambda *a: get_active_company(),
|
"company_id": lambda *a: get_active_company(),
|
||||||
'sequence': 0,
|
'sequence': 0,
|
||||||
|
'state': 'available',
|
||||||
}
|
}
|
||||||
|
|
||||||
_order="sequence"
|
_order="sequence"
|
||||||
|
|
Loading…
Reference in New Issue