conv_bal
Test server 2014-10-01 14:40:18 +07:00
parent 0c897d79b8
commit 56140b4048
3 changed files with 19 additions and 9 deletions

View File

@ -43,16 +43,24 @@
<field name="total"/>
</list>
</field>
<field name="fee" span="2" offset="7" attrs='{"readonly":[["state","in",["canceled","approved","validate"]]]}'/>
<field name="total" span="2" offset="8"/>
<field name="amount" span="2" offset="8"/>
<group attrs='{"readonly":[["state","in",["canceled","approved","validate"]]]}'/>
<field name="fee" span="2" offset="7"/>
</group>
<group attrs='{"readonly":[["state","not in",["canceled","approved","validate"]]]}'/>
<field name="fee" span="2" offset="9"/>
</group>
<field name="total" span="2" offset="9"/>
<field name="amount" span="2" offset="9"/>
<foot>
<button string="Confirm" type="success" method="confirmed" states="draft" />
<button string="Approved" type="success" method="approved" states="confirmed"/>
<button string="Validate" type="success" method="validate" states="approved" />
<button string="Canceled" type="danger" method="canceled" confirm="You are sure to canceled hd case"/>
<button string="Confirm" type="success" method="confirmed" states="draft" />
<button string="Approved" type="success" method="approved" states="confirmed"/>
<button string="Validate" type="success" method="validate" states="approved" />
<button string="Canceled" type="danger" method="canceled" confirm="You are sure to canceled hd case"/>
</foot>
<related>
<field name="comments"/>
<field name="invoices" click_action="view_invoice"/>
<field name="payments" click_action="view_payment"/>
<field name="pickings" click_action="view_picking"/>
<field name="comments"/>
</related>
</form>

View File

@ -34,6 +34,9 @@ class HDcase(Model):
"amount": fields.Float("Amount",function="get_total",readonly=True,function_multi=True),
"total": fields.Float("Total",function="get_total",readonly=True,function_multi=True),
"reconcile_id": fields.Many2One("account.reconcile","Reconcile Id",readonly=True),
"invoices": fields.One2Many("account.invoice","related_id","Invoices"),
"pickings": fields.One2Many("stock.picking","related_id","Pickings"),
"payments": fields.One2Many("account.payment","related_id","Payments"),
}
def _get_number(self,context={}):

View File

@ -155,5 +155,4 @@ class Patient(Model):
obj=self.browse(ids)[0]
obj.write({"state":"voided"})
Patient.register()