Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

how to add the fiscal position note field in the pos receipt

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
posrecieptFiscalPositionfiscalpositonv15
2 Antwoorden
2886 Weergaven
Avatar
fojja bilel

hi all,

i want to know how to add the fiscal position note field in the pos receipt

thanks

0
Avatar
Annuleer
Avatar
fojja bilel
Auteur Beste antwoord

thanks  MUHAMMAD Imran

0
Avatar
Annuleer
Avatar
MUHAMMAD Imran
Beste antwoord

Here is an example of how you can add the fiscal position note field to the POS receipt in Odoo using code:


First, you will need to create a new field for the fiscal position note on the pos.order model. You can do this by adding the following code to your module's models.py fil

Copy cod

from odoo import fields, model


class PosOrder(models.Model

    _inherit = 'pos.order

    fiscal_position_note = fields.Char('Fiscal Position Note'

Next, you will need to add the field to the POS receipt template. You can do this by modifying the pos_ticket.xml file in your module's views folder. For example, you can add the following code to the template to display the fiscal position note

Copy cod

 

Finally, you will need to add the field in the POS order creation process. You can do this by overriding the create_from_ui method on the pos.order model in your module's models.py file

Copy cod

class PosOrder(models.Model)

    _inherit = 'pos.order


    def create_from_ui(self, orders

        for order in orders

            # Add the fiscal position note to the order dat

            order['fiscal_position_note'] = 'example note

        return super(PosOrder, self).create_from_ui(orders

Note that this is just an example and you'll need to adjust it to your specific use case, for example by taking the note from the fiscal position itself or from a specific field that you've created for this purpose

0
Avatar
Annuleer
fojja bilel
Auteur

thanks MUHAMMAD
by default there is a field named note in account.fiscal.position
and a field named fiscal_position_id in pos.order
how can add this field in the receipt ?
my pos.xml file :
<templates id="template" xml:space="preserve">
<t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
<xpath expr="//div[@class='pos-receipt-contact']" position="inside">

</xpath>
</t>
</templates>
thanks for helping me

MUHAMMAD Imran

To add the "note" field from the "account.fiscal.position" model and the "fiscal_position_id" field from the "pos.order" model to the receipt, you can use the xpath element to specify where in the template you want to add the fields and then use the field element to define the fields themselves. Here is an example of what that might look like:

Copy code
<templates id="template" xml:space="preserve">
<t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
<xpath expr="//div[@class='pos-receipt-contact']" position="inside">
<div class="pos-receipt-note">
<span class="pos-receipt-label">Note:</span>
<field name="note" widget="text" options='{"readonly": true}'/>
</div>
<div class="pos-receipt-fiscal-position-id">
<span class="pos-receipt-label">Fiscal Position ID:</span>
<field name="fiscal_position_id" widget="text" options='{"readonly": true}'/>
</div>
</xpath>
</t>
</templates>
You should also check if the fields you want to add are related to the receipt model in odoo.

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
How to show the fiscal tax on the pos odoo16 slip?
pos reciept FiscalPosition odoo16features
Avatar
0
jun. 24
397
How do I format the date on the POS receipt? (without time and timezone)
community pos reciept v15
Avatar
Avatar
1
jan. 24
3418
how can i change product line size font in the receipt pos
pos reciept point_of_sale v15
Avatar
Avatar
1
jan. 23
5304
Error in replace div in custom receipt
pos v15
Avatar
Avatar
1
jul. 24
3751
Fiscal position not working as expected Opgelost
FiscalPosition fiscalpositon
Avatar
Avatar
Avatar
2
nov. 23
3884
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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