Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Comments field in Shopping Cart?

Odebírat

Get notified when there's activity on this post

This question has been flagged
3 Odpovědi
6869 Zobrazení
Avatar
Bart Criel

How can I show an editable text field in the Shopping cart ? The field is properly defined as a field.text on the Sales Order object, and is visible and editable in the Quotations and Sales Order views in the backend.

I tried entering

    <p>Enter your remarks here:</p>
    <p t-field="website_sale_order.comments" placeholder="Enter your comments here..."/>

just after the table in the 'total' thing of the Shopping Cart, but that shows only the label 'Enter your remarks here:' and no editable text field.

1
Avatar
Zrušit
michel Guénard

do you need an editable text that the customers can use or a text from our side?

Bart Criel
Autor

The purpose of the field is that the customer can enter some additional comments to her/his order; I want to store that information in a text field on the Sales Order. So I need an editable text that the customers can use.

Avatar
Sébastien Theys (seb)
Nejlepší odpověď

"<p t-field=..."
This is just displaying the value of the field in a paragraph, if you need the user to enter something, you need to create some kind of input or textarea in a form. And then you need to override the route to handle the additional parameter.

Note that the feature you want to create already exists, if you click on "customize" as admin during the checkout flow, you have "extra step option".

0
Avatar
Zrušit
Avatar
michel Guénard
Nejlepší odpověď

I have a similar need: how to add a product attribute to the shopping cart (just below the product name)

My 2cents if it can help you.

below is the html code generated by Odoo for the comments block that is attached to the blog web pages


<?xml version="1.0"?>
<data name="Allow Comments">
<xpath expr="//ul[@id='comments-list']" position="before">
<section class="mb32 css_editable_mode_hidden">
<form id="comment" t-attf-action="/blogpost/comment" method="POST">
<input name="blog_post_id" t-att-value="blog_post.id" type="hidden"/>
<img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&field=image_small&id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
<div class="pull-left mb32" style="width: 75%">
<textarea rows="3" name="comment" class="form-control" placeholder="Ecrire vos observations..."/>
<button type="submit" class="btn btn-primary mt8">Publier</button>
</div>
</form>
</section>
<div class="clearfix"/>
</xpath>
</data>

0
Avatar
Zrušit
Avatar
Luke Branch
Nejlepší odpověď

@Bart,

I'll also be needing this for my own project.

I think your issue may be due to the fact you don't seem to be using your t-for-each's t-as attribute. Here's the code that controls the foreach loop:

 <t t-foreach="website_sale_order.website_order_line" t-as="line">

I think in your situation you need to add "line" to your t-field like this:

<p t-field="line.website_sale_order.comments" placeholder="Enter your comments here..."/>

Without seeing the rest of your custom code it's hard to say if this is definitely the problem, however from a brief look at your issue I have a feeling it is.

Check out the developer documenation here, specifically the section on loops:

https://www.odoo.com/documentation/8.0/reference/qweb.html

Please comment back if you run into any issues and i'd be glad to help.

0
Avatar
Zrušit
Bart Criel
Autor

Thank you for your remarks, but as far as I can see, your solution works for a Sales Order Line, while I need something on Sales Order level. I probably need to add some form-related xml; I'll try to see how stuff is done in the next screen of the Order Processing.

Enjoying the discussion? Don't just read, join in!

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

Přihlásit se
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 ภาษาไทย Türkçe українська Tiếng Việt

Odoo je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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