Odoo Help

Welcome!

This community 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.

0

How do i create a request for quotation on odoo v8 using xmlrpc?

By
labsdcjkbcdjks
on 6/12/15, 7:32 AM 468 views

Im looking at how to create an RFQ  but i cant see some fields in the purchase.order model, 

in the browser the user can add products to the RFQ and their properties such as:

Description, Scheduled Date, Quantity , Unit Price, Product, 

However, the  Taxes field seems to be present. 

there is nothing akin these fields in the model:

models.execute_kw(
 db, uid, password, 'purchase.order', 'fields_get',
 [], {'attributes': ['string', 'help', 'type']})

i only see these fields:

['__last_update', 'amount_tax', 'amount_total', 'amount_untaxed', 'bid_date', 'bid_validity', 'company_id', 'create_date', 'create_uid', 'currency_id', 'date_approve', 'date_order', 'dest_address_id', 'display_name', 'fiscal_position', 'id', 'incoterm_id', 'invoice_count', 'invoice_ids', 'invoice_method', 'invoiced', 'invoiced_rate', 'journal_id', 'location_id', 'message_follower_ids', 'message_ids', 'message_is_follower', 'message_last_post', 'message_summary', 'message_unread', 'minimum_planned_date', 'name', 'notes', 'order_line', 'origin', 'partner_id', 'partner_ref', 'payment_term_id', 'picking_ids', 'picking_type_id', 'pricelist_id', 'product_id', 'related_location_id', 'related_usage', 'requisition_id', 'shipment_count', 'shipped', 'shipped_rate', 'state', 'validator', 'write_date', 'write_uid']


1
John
On 6/12/15, 7:48 AM

 labsdcjkbcdjks,

There is another model 'purchase.order.line' that provides each of the lines that you see in the body of the purchase order.  The field that contains these order lines is 'order_line'

In order to insert these order lines, you need to learn the "command syntax" for inserting one2many fields.  See this link here: https://www.odoo.com/documentation/8.0/reference/orm.html and search for CRUD in the model reference.  The basic idea is that you would assign the field order_line a value of something like this: (0,0,{'description': description, 'other_dict_entries': etc. etc.})

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/12/15, 7:32 AM
Seen: 468 times
Last updated: 6/12/15, 7:48 AM