Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Impossible to extend stock.view_picking_form view

By
Victor Godayer
on 2/12/15, 9:00 AM 792 views

Hi

 

I try to extend the view with external id `stock.view_picking_form` as follows :

 

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
        <record model="ir.ui.view" id="cap_stock.stock_picking_form">
            <field name="name">cap_stock.stock_picking_form</field>
            <field name="model">stock.picking</field>
            <field name="inherit_id" ref="stock.view_picking_form" />
            <field name="arch" type="xml">

                <xpath expr="//button[@name='action_assign']"  position="replace">
                    <button name="action_assign" invisible="1"/>
                </xpath>
               
        </record>


</data>
</openerp>

 

But I get all the time

 

ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition

Error details:
Model not found: stock.picking

Error context:
View `cap_stock.stock_picking_form`
[view_id: 996, xml_id: n/a, model: stock.picking, parent_id: 722]" while parsing /var/www/cbl_openerp/openerp/cap_addons/cap_stock/data.xml:4, near

 

What am I missing ?

Why is the model `stock.picking` not recognized ?

0

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
3883
| 5 3 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 2/12/15, 9:09 AM

did you add 'stock' in your module depends? Check whether stock module is installed? then check whether stock picking is available in your db through sql commands

select * from ir_model where model='stock.picking'
select * from stock_picking

If sql results do not show any record, then check your addons configuration

Atchuthan - Technical Consultant, Sodexis Inc
on 2/12/15, 9:11 AM
0
Victor Godayer
On 2/12/15, 9:27 AM

Thanks a lot that was the reason !!

I did not declared stock in 'depends' list in __openerp__.py

 

Thank you again

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 2/12/15, 9:00 AM
Seen: 792 times
Last updated: 3/16/15, 8:10 AM