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

How to customize Sale Order "Accept & Sign" modal to include required custom fields?

Odebírat

Get notified when there's activity on this post

This question has been flagged
saleportal16.0
1220 Zobrazení
Avatar
Richard PALO

In France, it's legally required to include the customer's purchase order reference ("numéro de bon de commande") on confirmed sales orders. We need to collect this information during the signature process in the portal.


I'm trying to add a required `client_order_ref` field to the signature modal in sale orders, but the `SignatureForm` widget only transmits `name` and `signature` parameters to the server.


Currently I'm working on

- **Odoo Version**: Community 16.0

- **Module**: Custom signature_advanced module

- **Goal**: Add required customer PO reference field to signature modal


I've tried 


 1. Template Inheritance

```xml

<template id="portal_signature_client_ref" inherit_id="sale.sale_order_portal_template">

    <xpath expr="//div[@id='modalaccept']//main[@id='sign-dialog']/p" position="after">

        <div class="form-group mb-3">

            <label for="client_order_ref">Customer PO Reference *</label>

            <input type="text" name="client_order_ref" id="client_order_ref"

                   class="form-control" required="required"/>

        </div>

    </xpath>

</template>

```


 2. JavaScript Widget Extension

```javascript

publicWidget.registry.SignatureForm.include({

    _onClickSignSubmit: function (ev) {

        var clientRef = $('#modalaccept #client_order_ref').val();

        if (clientRef) {

            this.rpcParams.client_order_ref = clientRef;

        }

        return this._super.apply(this, arguments);

    },

});

```


 3. Controller Override

```python

@http.route(["/my/orders/<int:order_id>/accept"], type="json", auth="public", website=True)

def portal_quote_accept(self, order_id, access_token=None, **kw):

    client_order_ref = kw.get('client_order_ref')  # Always None

    # ... rest of processing

```


The problem remains that the field appears in the modal and validation works, but `client_order_ref` never reaches the controller. Server logs show only `name` and `signature` in received parameters.


Questions

1. **How does the `SignatureForm` widget determine which fields to include in the RPC call?**

2. **What's the proper way to extend it to include custom fields from the modal?**

3. **Is there a better approach than overriding the widget?**


Additional Context

- Field validation works (JavaScript detects the value)

- DOM contains the field with correct value

- Only RPC transmission fails

- Need solution that survives module updates


Any guidance on the correct approach would be greatly appreciated. 

This seems like a common requirement for B2B scenarios.


BTW, using

- Python 3.13, PostgreSQL 17

- Custom module extends `sale`, `portal`

- Using `publicWidget.registry.SignatureForm.include()`


Thank you for any insights!
Cheers

0
Avatar
Zrušit
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
Related Posts Odpovědi Zobrazení Aktivita
How to make Products public in the Portal Sale module?
sale portal
Avatar
0
lis 16
3929
Getting an error when I try to give Portal Access to a customer
portal
Avatar
0
lis 25
42
Trying to replace default “Invoices & Bills” breadcrumb in Odoo portal
portal
Avatar
Avatar
1
lis 25
429
Dynamically update cart icon after adding products from a reorder popup in Custom Odoo portal
portal
Avatar
Avatar
1
lis 25
359
is possible to add 2 filters to the web portal similar to searchbar_filters?
portal
Avatar
Avatar
Avatar
2
čvc 25
2283
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