Odoo Help


how to show particular purchase order total price in my custom module for that particular purchase order in openerp

Atul Kumar jain
on 1/15/14, 2:42 AM 1,062 views

How to show particular purchase order total price in my custom module I am creating a function for show amount_total iin my custom module but it's not showing

def create(self, cr, uid, vals, context=None):
if vals.get('buy_back'):
    sequence=self.pool.get('ir.sequence').get(cr, uid, 'purchase.order')
    new_purchase=purchase_obj.create(cr, uid, {'name':sequence,'amt_total':vals.get('amount_total')}, context=context)
    import pprint
    pprint.pprint( vals )
    print 'amount_total'
    pprint.pprint( vals )

this is my view file

                <field name="buy_back"/>
                <field name="purchase_order"/>
                <fiels name="amt_total"/>

Atul Kumar jain

--Atul Kumar jain--
| 5 3 7
Indore, India
--Atul Kumar jain--


Atul Kumar jain
On 2/22/14, 3:43 PM

use related field

'purchase_order':fields.related('purchase_id', 'custom_field' relation=purchase.order................................)

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

0 follower(s)


Asked: 1/15/14, 2:42 AM
Seen: 1062 times
Last updated: 3/16/15, 8:10 AM