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 to copy in requisition to purchase order?

By
Nanie BE
on 11/7/14, 1:55 AM 609 views

I want that all messages with attachements written manually in the purchase requisition are copied automatically in the purchase order generated.

How to proceed? Any help please.

Thanks

0

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
3918
| 5 3 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 11/7/14, 5:00 AM

We can show the messages of purchase requisition in a new CHATTER BOX at Purchase Order/Quotation by adding a related field.

class purchase_order(orm.Model):
    _inherit='purchase.order' 
    _columns = {
                'requisition_message_ids': fields.related('requisition_id', 'message_ids', type="one2many"),
                } 

        <record model="ir.ui.view" id="purchase_order_form_inherit">
            <field name="name">purchase.order.sciencefirst</field>
            <field name="model">purchase.order</field>
            <field name="inherit_id" ref="purchase.purchase_order_form" />
            <field name="arch" type="xml">
                <xpath expr="//form[@string='Purchase Order']" position="inside">
                    <div class="oe_chatter">
                        <field name="requisition_message_ids" widget="mail_thread"/>
                    </div>
                </xpath>
            </field>
        </record>

Thanks, that works!

Nanie BE
on 11/7/14, 7:54 AM

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: 11/7/14, 1:55 AM
Seen: 609 times
Last updated: 3/16/15, 8:10 AM