Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

snippets issues in Odoo 14 theme tutorial

Subscribe

Get notified when there's activity on this post

This question has been flagged
imagedropdownodoosnippetssnippet
9657 Views
Avatar
Adrien

Hello,

I'm new on Odoo, I installed Odoo 14 from "Source Install" on Windows 10, Python 3.9


I started to read th documentation:

https://www.odoo.com/documentation/14.0/developer/reference/orm.html


And I started the Odoo 14 tutorial, totday I'm stuck on the Snippets part:

https://www.odoo.com/documentation/14.0/developer/howtos/themes.html#create-snippets


I created all differents folders (img, UI), then I created images throught Paint with basic 1 number for client_1.jpg, 2 number for client_2.jpg, 3 number for client_3.jpg and S letter for snippet_thumb.jpg


After that I updated the theme of the website then I refreshed the website page, then I saw issues:

- When I cliked on "Edit" I can see the snippet "Testimonial snippet" but the image is not diplaying

- When I drag and drop the snippet the page start to shake up to down very fast

- then When I click on "Save" the page stop to shake but images 1,2,3 are not diplayed


So I continue the next step:

https://www.odoo.com/documentation/14.0/developer/howtos/themes.html#default-option-methods


And here I can only see "Your Option" so I changed the drop-down parameter to see options, but when I click on it its not working.


I tried to change values in the code, to change images, to take images from website, but nothing is working.

I tried to search is someone who had the same issue but I didn't find.


Is someone know what is the issue and help me to stop my page to check and to have diplayed images :)


Please find my programme bellow.

Best regards,

Adrien


pages.xml

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <!-- === Services Page === -->
    <record id="services_page" model="website.page">
        <field name="name">Services page</field>
        <field name="website_published">True</field>
        <field name="url">/services</field>
        <field name="type">qweb</field>
        <field name="key">theme_tryitnow.services_page</field>
        <field name="arch" type="xml">
            <t t-name="theme_tryitnow.services_page_template">
<t t-call="website.layout">
<div id="wrap">
<div class="container">
<h1>Our Services</h1>
<ul class="services">
<li>Cloud Hosting</li>
<li>Support</li>
<li>Unlimited space</li>
</ul>
</div>
<!-- === Snippets' area === -->
                        <div class="oe_structure" />
</div>
</t>
            </t>
        </field>
    </record>
<record id="services_page_link" model="website.menu">
  <field name="name">Services</field>
  <field name="page_id" ref="services_page"/>
  <field name="parent_id" ref="website.main_menu" />
  <field name="sequence" type="int">99</field>
</record>
 </odoo>

snippets.xml:

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="s_testimonial" name="Testimonial snippet">
<section class="s_testimonial">
<div class="container">
<div class="row">
<div class="col-lg-4 text-center">
<img alt="client" class="rounded-circle" src="/theme_tryitnow/static/src/img/client_1.jpg"/>
<h3>Client Name</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
<div class="col-lg-4 text-center">
<img alt="client" class="rounded-circle" src="/theme_tryitnow/static/src/img/client_2.jpg"/>
<h3>Client Name</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
<div class="col-lg-4 text-center">
<img alt="client" class="rounded-circle" src="/theme_tryitnow/static/src/img/client_3.jpg"/>
<h3>Client Name</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
</div>
</div>
</section>
</template>
<template id="place_into_bar" inherit_id="website.snippets" name="Place into bar">
<xpath expr="//div[@id='snippet_structure']/div[hasclass('o_panel_body')]" position="inside">
<t t-snippet="theme_tryitnow.s_testimonial"
t-thumbnail="/theme_tryitnow/static/src/img/ui/snippet_thumb.jpg"/>
</xpath>
</template>
</odoo>

options.xml:

<odoo>
	<template id="snippet_testimonial_opt" name="Snippet Testimonial Options" inherit_id="website.snippet_options">
		<xpath expr="//div[@data-js='Box']" position="after">
			<div data-selector=".s_testimonial"> <!-- Options group -->
				<div class="dropdown-submenu">
					<a href="#" class="dropdown-item">Your Option</a>
					<div class="dropdown-submenu"><!-- Options list -->
						<a href="#" class="dropdown-item" data-select-class="shadow">Shadow Images</a>
						<a href="#" class="dropdown-item" data-select-class="grey_bg">Grey Bg</a>
						<a href="#" class="dropdown-item" data-select-class="">None</a>
					</div>
				</div>
			</div>
		</xpath>
	</template>
</odoo>

style.scss:

// These lines will add a default style for our snippet. Now let's create our custom rules for the options.
.s_testimonial {
    border: 1px solid #EAEAEA;
    padding: 20px;
    &.s_testimonial_shadow img {
        box-shadow: 0 2px 5px rgba(51, 51, 51, 0.4);
    }
    &.s_testimonial_grey_bg {
        border: none;
        background-color: #EAEAEA;
    }
}
0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
How to set image upload size?
image odoo
Avatar
Avatar
1
Jan 23
4301
Add image with marker
image odoo
Avatar
0
Jun 21
3914
Image upload in odoo
image odoo
Avatar
Avatar
2
Jun 17
10512
Set background on child section element.
odoo snippets
Avatar
0
Nov 16
3537
[odoo v16] How to Show image in tree view when there are no records? Solved
image html odoo
Avatar
Avatar
1
May 23
4191
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now