Skip to Content

Contributors

Snippet examples

Hi

This might be the wrong email list but pointers appreciated...

Working on a small website project and one requirement is making a page with some airbnb properties. So I was adding the HTML from Airbnb for each one, but it is cumbersome so I wanted to make a snippet where one could edit the description and the property ID. But I have not been able to find a working description of how to create a snippet for the website builder, let alone one that has editable properties like that. An alternative to adding each property as a snippet would be to make a domain object with the info and then display that on a page, but have not come across any easy examples of web views for that either...

Torvald Baade Bringsvor
Bringsvor Consulting AS - Consulting and Odoo implementor

Tel (+47) 4548 2848

by Torvald Bringsvor - 10:56 - 1 Oct 2020

Follow-Ups

  • Re: Snippet examples
    Hi Simone

    Yes, I have seen it but I got a bit lost at the options. The thing is that my data is so static that it could just as well be entered by the website editor, but I'm not sure if I can do that, technically. So I think I will follow the route of the Odoo Experience presentation and render the data serverside.

    -Torvald


    fre. 2. okt. 2020 kl. 06:57 skrev Simone Orsi <simahawk@gmail.com>:

    On Thu, Oct 1, 2020 at 10:57 AM Torvald Baade Bringsvor <torvald@bringsvor.com> wrote:
    Hi

    This might be the wrong email list but pointers appreciated...

    Working on a small website project and one requirement is making a page with some airbnb properties. So I was adding the HTML from Airbnb for each one, but it is cumbersome so I wanted to make a snippet where one could edit the description and the property ID. But I have not been able to find a working description of how to create a snippet for the website builder, let alone one that has editable properties like that. An alternative to adding each property as a snippet would be to make a domain object with the info and then display that on a page, but have not come across any easy examples of web views for that either...

    Torvald Baade Bringsvor
    Bringsvor Consulting AS - Consulting and Odoo implementor

    Tel (+47) 4548 2848

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe



    --
    Simone Orsi

    Full stack Python web developer, Odoo specialist, Odoo Community Board Member, Freelance in love with open source.

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Torvald Bringsvor - 11:16 - 4 Oct 2020
  • Re: Snippet examples

    On Thu, Oct 1, 2020 at 10:57 AM Torvald Baade Bringsvor <torvald@bringsvor.com> wrote:
    Hi

    This might be the wrong email list but pointers appreciated...

    Working on a small website project and one requirement is making a page with some airbnb properties. So I was adding the HTML from Airbnb for each one, but it is cumbersome so I wanted to make a snippet where one could edit the description and the property ID. But I have not been able to find a working description of how to create a snippet for the website builder, let alone one that has editable properties like that. An alternative to adding each property as a snippet would be to make a domain object with the info and then display that on a page, but have not come across any easy examples of web views for that either...

    Torvald Baade Bringsvor
    Bringsvor Consulting AS - Consulting and Odoo implementor

    Tel (+47) 4548 2848

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe



    --
    Simone Orsi

    Full stack Python web developer, Odoo specialist, Odoo Community Board Member, Freelance in love with open source.

    by Simone Orsi - 06:56 - 2 Oct 2020
  • Re: Snippet examples
    Thanks Benjamin. I'm a bit rusty on the Odoo development these days, guess it's time to get back in the game.

    You mean a snippet like this could live in the OCA/website repo somewhere? Ok, will have a look.

    And thanks for the info on the talk, I am attending the Odoo XP so will check that out.

    -Torvald




    tor. 1. okt. 2020 kl. 11:17 skrev Benjamin Brich <b.brich@humanilog.org>:

    Hi Torvald,

     

    You can check this repo to get some inspiration: https://github.com/OCA/website/ There are a couple of great examples for building snippets.

     

    Furthermore there is a talk about ‘How to develop Building Blocks’ today at 5 pm CET live @ odoo xp.

     

    I hope this helps. Don’t forget the issue and PR for your new snippet in the github repo.

     

    warm Regards

     

    Ben

     

    Benjamin Brich
    Humanitarian Logistics Organisation e.V. (HLO)
    Phone: +49 40 228686751
    Cell: +49 160 97467007
    b.brich@humanilog.org

    Winsbergring 2
    22525 Hamburg
    Germany

    www.humanilog.org

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Torvald Bringsvor - 11:36 - 1 Oct 2020
  • AW: Snippet examples

    Hi Torvald,

     

    You can check this repo to get some inspiration: https://github.com/OCA/website/ There are a couple of great examples for building snippets.

     

    Furthermore there is a talk about ‘How to develop Building Blocks’ today at 5 pm CET live @ odoo xp.

     

    I hope this helps. Don’t forget the issue and PR for your new snippet in the github repo.

     

    warm Regards

     

    Ben

     

    Benjamin Brich
    Humanitarian Logistics Organisation e.V. (HLO)
    Phone: +49 40 228686751
    Cell: +49 160 97467007
    b.brich@humanilog.org

    Winsbergring 2
    22525 Hamburg
    Germany

    www.humanilog.org


    by Benjamin Brich - 11:16 - 1 Oct 2020