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 define a many2one field as selection field in odoo website shopping cart?

By
vadivel
on 7/28/16, 5:53 AM 332 views

Hello everyone.

Can anyone know, how to display customized many2one field as selection field in website shopping cart. Please share the ideas(also code).Thanks in advance

dear vadivel,

If i understood you right , I think you need to add widget="selection" on your many2one field.

I hope I helped you.

ayman mohammed adam
on 7/28/16, 6:41 AM
2
shameem@axon
On 7/28/16, 7:24 AM

Try it...

Pass all model  objects of the many2one field to the template.

then ...

<select>

    <t t-foreach="all_objects" t-as="each_objects">
        <option>

            <t t-esc="each_objects.name"/>
         </option>
     </t>

</select>    


Don't forget to close the <t>-Tag with </t>.

Andre
on 7/28/16, 7:31 AM

tank u , i shall ...

shameem@axon
on 7/28/16, 7:37 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: 7/28/16, 5:53 AM
Seen: 332 times
Last updated: 7/28/16, 7:24 AM