Quantcast
Channel: OpenERP Help - Individual question feed
Viewing all articles
Browse latest Browse all 6389

How to link Sales Quotation to Purchase Quotation?

$
0
0
Hi, I've created a module that link Sales Quotation with Purchase Quotation. Basically with this module after I create a Sale Quotation, I can choose in Purchase Quotation the Sale Quotation associated for this Purchase Quotation. So, after select the correct Sale Quotation on Purchase Quotation, I would like that item of product on tab "Purchase Order" be automatically filled with all products that Sale Quotation selected previously have. Someone knows resolve this problem? thanks, ![image description](/upfiles/13649946017791224.png) My module: [my_module].py: class purchase_order(osv.osv): _inherit = 'purchase.order' _name = 'purchase.order' _columns = { 'asd_pquotation_id': fields.many2one('sale.order','Sale Quotation', domain=[('state','in',('draft','sent'))]), } _defaults = { 'asd_pquotation_id': lambda self, cr, uid, context: context.get('asd_pquotation_id', False), } purchase_order() class sale_order(osv.osv): _inherit = "sale.order" _name = "sale.order" _columns = { 'asd_squotation': fields.one2many('purchase.order','asd_pquotation_id', 'Purchase Quotation'), } sale_order() [my_module]_view.xml: purchase.order.form.changepurchase.ordersale.order.form.changedsale.order

Viewing all articles
Browse latest Browse all 6389

Trending Articles