Odoo Help


Is it necessary to fill up data in stock picking model

Abegail Sanchez
on 6/18/14, 1:03 AM 743 views

I have a billing module that has a model "hospital.billing" with one2many relationship "hospital.account.lines" , it is like POS module with "pos.order" and pos.order.line",stock picking in POS is in pos.order model but my stock picking is in hospital account lines model since my transaction always in hospital account lines. Everytime the patient order a medicine  will be added its to Statement of Account. Since patient has only one SOA. This is my model stucture.
    _description="Hospital Billing System"
              'name' : fields.char ('Bill Number',required=True,states={'process':[('readonly',True)], 'cancel':[('readonly',True)]}, size=20),
              'date_processed': fields.date('Date Processed', select=True, readonly=True),
              'patient_case_id' : fields.many2one ('his.admission', 'Patient Admission', required=True, states={'process':[('readonly',True)], 'cancel':[('readonly',True)]}),
              'inpac_rmbd_invoices' : fields.one2many ('hospital.roomboard_invoice', 'name', 'In-Patient Room and Board Lines' ,states={'process':[('readonly',True)], 'cancel':[('readonly',True)]}),

              'billing_soa_lines' : fields.one2many ('hospital.account.lines', 'name', 'In-Patient SOA Lines' ,states={'process':[('readonly',True)], 'cancel':[('readonly',True)]}),
              'creditor_id' : fields.one2many ('creditor.mgmt', 'creditor', 'Creditors' ,states={'process':[('readonly',True)], 'cancel':[('readonly',True)]},domain=[('refund','=',False)]),
              'note': fields.text('Note' ,states={'process':[('readonly',True)], 'cancel':[('readonly',True)]}),
              'opd': fields.boolean('Out Patient'),
              'date_created':fields.datetime('Date Created'),
              'data_encoder':fields.many2one('res.users','Data Created by',readonly=True),

        _description ="Hospital Account lines"
                   'price_unit':fields.float('Price Unit',),
                   'discount':fields.float('Discount %'),
                   'price_subtotal':fields.function(price_subtotal,method=True,type="float",string="Price Subtotal w/o   Tax",store=False,readonly=True),
                   #'creditor_amt':fields.float('Creditor Amount',readonly=True),
                   'patient_amount':fields.function(patient_amount,method=True,type="float",string="Patient               Amount",store=False,readonly=True),
                   **'picking_id':fields.many2one('stock.picking','Stock Picking'),**
                   'pricelist_id':fields.many2one('product.pricelist','Product Pricelist'),
                   'primary_shop_id':fields.many2one('sale.shop','Primary Shop',),
                   'secondary_shop_id':fields.many2one('sale.shop','Secondary Shop'),
                   'date_created':fields.date('Date Created'),


Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
Serpent Consulting Services Pvt. Ltd.
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 6/18/14, 4:57 AM


There should be a field in hospital.account.lines for many2one ref to hospital.billing.

What you can do is, upon validating/confirmng the SOA(billing), create a picking and link it to hospital.account.lines.

Better solution, you should link hospital.account.lines with stock.move (many2one), and hospital.billing should have many2one for stock.picking.


Abegail Sanchez
On 6/18/14, 11:56 PM


Yes, hospital account lines has a many2one rel to hospital billing.

How about if I will refund a medicine or products? Will I use the same stock picking id for the whole hospital account lines or I need to update/change it in every transaction?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 6/18/14, 1:03 AM
Seen: 743 times
Last updated: 3/16/15, 8:10 AM