Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
10282 มุมมอง

I inherit from stock.picking.out to add some fields

_inherit = 'stock.picking.out'

_columns = {
    'transp_name':fields.char('Chauffeur', size=25,store=True),
    'transp_tel':fields.char('Téléphone',size=14,store=True,),
    'transp_cin': fields.char('CIN Chauffeur', size=8,store=True, ),
    'transp_matricule': fields.char('Matricule Camion', size=64,store=True,  ),
}
_defaults = {
    'transp_name':'/',
    'transp_cin': '/',
    'transp_matricule': '/',
}

_order = "origin desc"

and the view :

     <record id="view_inherits" model="ir.ui.view">
        <field name="name">inherits.form</field>
        <field name="type">form</field>
        <field name="model">stock.picking.out</field>
        <field name="inherit_id" ref="stock.view_picking_out_form"/>
        <field name="arch" type="xml">
            <field name="invoice_state" position="after">
              <field name="transp_name"/>
              <field name="transp_cin"/>
              <field name="transp_tel"/>
              <field name="transp_matricule"/>
            </field>
        </field>
    </record>

when I clic in the Save button the transp_* became '' NOT SAVING !

อวตาร
ละทิ้ง

Please copy the details of the error message ?

ผู้เขียน

there's no errors in log this is the addons http://www.mediafire.com/?bijzw7r78tx48gv

the module works without any problem!! and all transp_* are saved

ผู้เขียน

oups I will try in other DB

ผู้เขียน

are you using Openerp 7 ? because it doesn't work in my server !!!!

yes .OpenERP7

ผู้เขียน

weird, My server is mad !!!!

ผู้เขียน

probmel solved (y)

คำตอบที่ดีที่สุด

stock.picking.out is using the same table as stock.picking.in, namely the table stock.picking.

Did you add the same fields to the table/model stock.picking? I had issues when I added something to stock.picking, and not to stock.picking.out, that I could not save the data in my new field when using model stock.picking.out.

อวตาร
ละทิ้ง
ผู้เขียน

thanks for helping I solved the problem (y)

ผู้เขียน คำตอบที่ดีที่สุด

the problem was in the server version I downloaded an other version and it work well :)

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ต.ค. 23
1781
Filed does not exist error. แก้ไขแล้ว
1
ส.ค. 23
2078
3
พ.ค. 25
1762
1
เม.ย. 25
1297
one2one relational field แก้ไขแล้ว
3
ก.ย. 24
14215