conv_bal
watcha.h@almacom.co.th 2015-01-13 13:08:55 +07:00
parent c5b922e7ff
commit da14324956
3 changed files with 17 additions and 3 deletions

View File

@ -5,7 +5,7 @@
</button>
</head>
<field name="name"/>
<field name="available" readonly="1"/>
<field name="available"/>
<field name="sequence"/>
<field name="note"/>
<field name="company_id" invisible="1"/>

View File

@ -492,6 +492,13 @@ class HDCase(Model):
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))
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={
"type": "out",
@ -984,11 +991,17 @@ class HDCase(Model):
if mode=='create':
line_vals=line[1]
amt=line_vals.get("amount",0)
if mode=='delete':
elif mode=='delete':
continue
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_vals=line[2]
line_vals=line[1]
line=get_model('clinic.hd.case.line').browse(line_id)
amt=line.amount or 0
total_amt+=amt

View File

@ -41,6 +41,7 @@ class SickBed(Model):
'available': True,
"company_id": lambda *a: get_active_company(),
'sequence': 0,
'state': 'available',
}
_order="sequence"