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-profit organisatie
    • 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

customizing the search more popup window

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
2 Antwoorden
756 Weergaven
Avatar
Emad Jaddo

Hello

I am trying to customize the search more popup window in the the stock move / picking to add description_pickin field there for a meaningful product list which i believe should be the default behavior.

This is the code I am using in my custom module but it is not working.



class ProductProduct(models.Model):
    _inherit = 'product.product'

    description_pickingin = fields.Text(
        string='Picking In Description',
        related='product_tmpl_id.description_pickingin',
        readonly=True,
    )



class StockPicking(models.Model):
    _inherit = 'stock.picking'

    description_pickingin = fields.Text(
        string='Picking In Description',
        related='move_ids.description_pickingin', # Assuming you use move_ids
        readonly=True,
    )





and the following in the view:

        <record id="stock_picking_tree_view_with_pickingin" model="ir.ui.view">
            <field name="name">stock.picking.tree.with.pickingin</field>
            <field name="model">stock.picking</field>
            <field name="inherit_id" ref="stock.view_picking_tree"/>
            <field name="arch" type="xml">
                <xpath expr="//field[@name='name']" position="after">
                     <field name="description_pickingin" optional="show"/>
                </xpath>
            </field>
        </record>

        <record id="stock_move_tree_view_with_pickingin" model="ir.ui.view">
            <field name="name">stock.move.tree.with.pickingin</field>
            <field name="model">stock.move</field>
            <field name="inherit_id" ref="stock.view_move_tree"/>
            <field name="arch" type="xml">
                <xpath expr="//field[@name='name']" position="after">
                    <field name="description_pickingin" optional="show"/>
                </xpath>
            </field>
        </record>


This code is not showing what i ned.


appreciate your help in advance.



Edit:

So The search more menu is this:


from there I get this screen:

his is the screen i am trying to add purchase description or picking description.

0
Avatar
Annuleer
Emad Jaddo
Auteur

I have tried your code but same thing. nothing show up on the popup window.

What did you mean by:

 If you want to show it in “Search More,” make sure the field is in the tree view that opens in the popup.
Christoph Farnleitner

Since your current view isn't what you need, a screenshot highlighting what you aim to achieve exactly would probably be beneficial.

Avatar
Christoph Farnleitner
Beste antwoord

By default, the List view rendered here as Search: Product is product.product_product_tree_view (basically the same view that is used for, i.e. Sales -> Products -> Product Variants).

So, something like this should update the view:

<record id="product_product_tree_view_inherit" model="ir.ui.view">
    <field name="name">product.product.list.inherit</field>
    <field name="model">product.product</field>
    <field name="inherit_id" ref="product.product_product_tree_view"/>
   <field name="arch" type="xml">
       <field name="name" position="after">
        <field name="description_pickingin" optional="show"/>
        </field>
   </field>
</record>
2
Avatar
Annuleer
Emad Jaddo
Auteur

Worked like a charm. Thank you for your help.

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Beste antwoord

Hi,


Try the following.


1. Add field to stock.move.

   You probably want the product’s picking description (from product.product → product.template → description_pickingin):


class StockMove(models.Model):

    _inherit = 'stock.move'


    description_pickingin = fields.Text(

        string="Picking In Description",

        related="product_id.product_tmpl_id.description_pickingin",

        store=False,  # set store=True if you want to search/filter

        readonly=True,

    )


2. Update the View

    Now you can safely extend the stock move tree view:


<record id="stock_move_tree_view_with_pickingin" model="ir.ui.view">

    <field name="name">stock.move.tree.with.pickingin</field>

    <field name="model">stock.move</field>

    <field name="inherit_id" ref="stock.view_move_tree"/>

    <field name="arch" type="xml">

        <xpath expr="//field[@name='name']" position="after">

            <field name="description_pickingin" optional="show"/>

        </xpath>

    </field>

</record>



* You must define description_pickingin on stock.move, not stock.picking.

* Use a related field from product_id.product_tmpl_id.description_pickingin.

* Then inherit stock.view_move_tree to display it.

* If you want to show it in “Search More,” make sure the field is in the tree view that opens in the popup.



Hope it helps

0
Avatar
Annuleer
Emad Jaddo
Auteur

I hope you are able to check my reply on yours.

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
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