Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

How to modify Delivery Order & Incoming Shipment view ?

Naroči se

Get notified when there's activity on this post

This question has been flagged
stockstock_pickingdeliveryorder
2 Odgovori
15280 Prikazi
Avatar
nishad

Hi am a new bee to OpenERP , i would like to do few additions to my current Delivery Order & Incoming Shipment modules , but am confused (stock.move, stock.picking,stock.picking.in,stock.picking.out etc...etc...) with the structure of the view and the way it is inherited in several other modules.

  1. How to add new fields in to 'Additional Info' page of Incoming Shipment and Delivery Order modules?

  2. How to enable 'product description column in both Incoming Shipment & Delivery Order modules?

I had an attempt to do this by creating a separate module that depends on module 'stock' but no changes happens to my view . Can anyone please point out the issue in my .xml ,.py etc... files , any help is appreciated .

Here is my source for reference :

stock.py

from openerp.osv import fields, osv

class stock_picking(osv.osv):

_inherit = "stock.picking"

_columns = {
            'po_number': fields.char('Customer PO#', size=25),
            'po_date': fields.date('Customer PO Date')
            }

stock_view.xml

  <?xml version="1.0" encoding="utf-8"?>
  <openerp>
  <data>
    <record model="ir.ui.view" id="view_picking_form2">
        <field name="name">stock.picking.form2</field>
        <field name="model">stock.picking</field>
        <field name="inherit_id" ref="stock.view_picking_form"/>
        <field name="arch" type="xml">
                <xpath expr="//group/field[@name='move_type']" position='before'>
                <field name="po_number"/>
                <field name="po_date"/>
               </xpath>
        </field>
    </record>

    <record model="ir.ui.view" id="view_move_picking_tree2">
        <field name="name">stock.picking.tree2</field>
        <field name="model">stock.picking</field>
        <field name="inherit_id" ref="stock.view_move_picking_form"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='move_line']/tree/field[@name='product_id']" position="after">
                <field name="name"/>
            </xpath>
        </field>
    </record>
</data>

</openerp>

1
Avatar
Opusti
Avatar
Hiral Patel (hip)
Best Answer

Hello nishad,

You have to inherit 'stock.picking.in' & 'stock.picking.out', As you want to display the fields in Incoming Shipment and Delivery Order.

  • 'stock.picking.in' used to display Incoming Shipment
  • 'stock.picking.out' used to display Delivery Order

Write following code in .py file:

 class stock_picking_in(osv.osv):

    _inherit = "stock.picking.in"
    _columns = {
        'po_number': fields.char('Customer PO#', size=25),
        'po_date': fields.date('Customer PO Date')
    }

class stock_picking_out(osv.osv):

    _inherit = "stock.picking.out"
    _columns = {
        'po_number': fields.char('Customer PO#', size=25),
        'po_date': fields.date('Customer PO Date')
    }

And in .xml file write:

    <record model="ir.ui.view" id="view_picking_form21">
            <field name="name">stock.picking.form21</field>
            <field name="model">stock.picking.in</field>
            <field name="inherit_id" ref="stock.view_picking_form"/>
            <field name="arch" type="xml">
                <field name="move_type" position='before'>
                    <field name="po_number"/>
                    <field name="po_date"/>
                </field>
            </field>
        </record>

        <record model="ir.ui.view" id="view_picking_form22">
            <field name="name">stock.picking.form22</field>
            <field name="model">stock.picking.out</field>
            <field name="inherit_id" ref="stock.view_picking_form"/>
            <field name="arch" type="xml">
                <field name="move_type" position='before'>
                    <field name="po_number"/>
                    <field name="po_date"/>
                </field>
            </field>
        </record>

        <record id="view_stock_move_1" model="ir.ui.view">
            <field name="name">stock.move.tree.inherit5</field>
            <field name="model">stock.move</field>
            <field name="inherit_id" ref="stock.view_move_picking_tree"/>
            <field name="arch" type="xml">
                <field name="product_id" position="after">
                    <field name="name"/>
                </field>
            </field>
        </record>

Here to display the description of product we have to inherit the tree view of 'stock.move'.

Thank You.

1
Avatar
Opusti
Sampath Kumar S

Hello Sir, I've products with different attributes and when I place a purchase order for a product i need the product attributes to be displayed on the incoming shipments form. Please suggest me how can i do this

Hiral Patel (hip)

Hello Sampath, You can find a _prepare_order_picking() method in purchase.py, This function will be called when you confirm the purchase order. Here pass the value for your new field. Define this custom field in stock.picking object.

Avatar
nishad
Avtor Best Answer

Thanks hiral for your effort to figure out exact way of inheriting the view , but a small change to the source . Instead of inheriting

field name="inherit_id" ref="stock.view_picking_form we need to inherit

field name="inherit_id"ref="stock.view_picking_in_form" for Incoming shipment &

field name="inherit_id" ref="stock.view_picking_out_form" for Delivery Order .

Thanks .....

0
Avatar
Opusti
Hiral Patel (hip)

We can use 'stock.view_picking_in_form' & 'stock.view_picking_out_form' as both inherit's the view 'view_picking_form'. Thanks for correction. :)

nishad
Avtor

Hi Hiral , its works fine for adding columns , fields etc.... but it shown an attribute error while am using that field in report =>File "/home/nishad/Downloads/openerp-7.0-20130630-231044/openerp/osv/orm.py", line 487, in __getattr__ raise AttributeError(e) AttributeError: 'po_date'

Sam path

Hi Nishad, did you got a solution for report print even i'm facing the same problem. If you have got a solution can you please help me out in getting the solution

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

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Why don't save my new field?
stock stock_picking deliveryorder save
Avatar
0
mar. 15
5603
odoo 10 : slowness at level of view render when performing stock picking
stock stock_picking
Avatar
0
maj 24
2174
How to confirm a delivery order from sale order screen ?
stock stock_picking
Avatar
1
mar. 15
5974
Delivery Orders - Stock Levels
stock deliveryorder
Avatar
0
mar. 15
3881
How can I ignore a stock level of a part?
stock stock_picking
Avatar
0
mar. 15
4413
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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