Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

how to add many2one field in website?

Odoberať

Get notified when there's activity on this post

This question has been flagged
ubuntu18ODOO12Python3.7
2 Replies
9717 Zobrazenia
Avatar
zarchithu470@gmail.com

Hello all,

 Now I want to show many2one field in the website to send backed data.How should I do?Please Kindly guide to me.Your help is highly appreciating.Thanks

0
Avatar
Zrušiť
Niyas Raphy (Walnut Software Solutions)

See this video explaining the same: https://www.youtube.com/watch?v=-fCSsNxGYjk&list=PLqRRLx0cl0hofGW8Nn9RH8Y3gtHIemlC8&index=7

Avatar
MUHAMMAD Imran
Best Answer
Try this
<div class="form-group form-field o_website_form_required_custom">
<div class="col-md-12" style="margin-bottom:10px;">
<label class="col-md-offset-1 col-md-1 col-sm-4 control-label" style="padding-top: 8px;" for="search">CHAIR*</label>
<div class="col-md-5 col-sm-8">
<select id="chair" required="True" class="form-control" style="width: 432px; height: 35px;">
<t t-foreach="chair_details" t-as="chair">
<option t-att-value="chair.id" t-esc="chair.name"/></t>
</select>
</div>
<div class="col-md-5" style="padding-left:0px !important;">
<p style="font-size: 16px;padding-top: 9px;">( Select the chair that free in the preferred time )</p>
</div>
</div>
</div>
4
Avatar
Zrušiť
zarchithu470@gmail.com
Autor

thanks Imran, It's work fine.

MUHAMMAD Imran

You are Most Welcome

Avatar
SAAD
Best Answer

Hello Muhammad i need help here, i had added a many2one field ('stock.warehouse') to website sale ( payment phase ) , but i still could not get the selected value by the user.


this is my code:

----> python

def _get_shop_payment_values(self, order, **kwargs):
sup = super(WebsiteEcommerce, self)._get_shop_payment_values(order)
company_id = request.env.user.company_id
sup['jours'] = 'jours'
sup['livraison_domicile'] = company_id.livraison_domicile
sup['livraison_collect'] = company_id.livraison_collect
   sup['warehouses']=request.env['stock.warehouse'].sudo().search([])

return sup

----> xml:

       <div class="form-group" attrs="{'inivisible':[('type_livraison','=','domicile')]}">
    <label for="warehouse" class="control-label">Magasin</label>
<div class="col-md-5 col-sm-8">
<select id="magasin" required="True" class="form-control" name="magasin"
style="width: 432px; height: 35px;">
<t t-foreach="warehouses" t-as="warehouse">
<option t-att-value="warehouse.id" t-esc="warehouse.name"/>
</t>
</select>
</div>
</div>

getting the selected value

    @http.route(['/shop/confirmation'], type='http', auth="public", website=True, sitemap=False)

def payment_confirmation(self, **post):
print('post',**post)
order = request.website.sale_get_order(force_create=1)
print('current order', order)
values = {key: post.get(key) for key in ('magasin')}
print("VALLLLLLL", values)

# print(post.get('livraison_domicile'))
return super(WebsiteEcommerce, self).payment_confirmation()


but this still not working , i appreciate your help.
0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
how to save backend record using website form with multiple selection values. v12
dropdownlist ODOO12
Avatar
Avatar
1
júl 24
5393
AttributeError: module 'PyPDF2' has no attribute 'filters' Solved
odoo12 Python3.7
Avatar
Avatar
Avatar
Avatar
3
aug 22
20112
How to hide contacts menu in Odoo 12 (only users in a cerain group will be allowed to se it)? Solved
menu ODOO12
Avatar
Avatar
1
mar 22
4066
how to print subtotal of a specific product in report
odoo ODOO12
Avatar
0
jan 21
1858
while sending messages in communication(mail messages) i am getting 403 forbidden error v12.
comments ODOO12
Avatar
0
máj 20
4222
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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