Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to set Default option methods in openerp

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 186
    Comment on it

    Options apply standard CSS classes to the snippet. Depending on the method that you choose, the UI will behave differently.

    1. data-select_class=" class name "

    More data-select_class in the same group defines a list of classes that the user can choose to apply. Only one option can be enabled at a time.

    1. data-toggle_class=" class name "

    The data-toggle_class is used to apply one or more CSS classes from the list to a snippet. Multiple selections can be applied at once.
    Let's demonstrate how default options work with a basic example.
    We start by adding a new file in our views folder - name it options.xml and add the default Odoo XML markup. Create a new template copy/pasting the following

    1. <template id="snippet_testimonial_opt" name="Snippet Testimonial Options" inherit_id="website_less.snippet_options">
    2. <xpath expr="//div[@data-js='background']" position="after">
    3. <div data-selector=".snippet_testimonial"> <!-- Options group -->
    4. <li class="dropdown-submenu">
    5. <a href="#">Your Option</a>
    6. <ul class="dropdown-menu"> <!-- Options list -->
    7. <li data-select_class="opt_shadow"><a>Shadow Images</a></li>
    8. <li data-select_class="opt_grey_bg"><a>Grey Bg</a></li>
    9. <li data-select_class=""><a>None</a></li>
    10. </ul>
    11. </li>
    12. </div>
    13. </xpath>
    14. </template>

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Reset Password
Fill out the form below and reset your password: