Hello ,
this is my code xml:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- Product Sequences -->
<record id="seq_type_ean13_sequence" model="ir.sequence.type">
<field name="name">EAN13 code</field>
<field name="code">product.ean13.code</field>
</record>
<record id="seq_ean13_sequence" model="ir.sequence">
<field name="name">Ean13 code</field>
<field name="code">product.ean13.code</field>
<field name="prefix">000000</field>
<field name="padding">6</field>
<field name="number_next">1</field>
</record>
</data>
</openerp>
and my code python:
class product_product(orm.Model):
_inherit = 'product.product'
_columns = {
'ean_sequence_id': fields.many2one('ir.sequence', 'Ean Sequence'),
}
my question is :
how can i get the ID of ean_sequence_id from ID XML( seq_type_ean13_sequence)?
7.0, 8.0 ?
hello Temur, i want exectly to get a default value to ean_sequence_id by use id xml : class product_product(orm.Model): _inherit = 'product.product' _columns = { 'ean_sequence_id': fields.many2one('ir.sequence', 'Ean Sequence'), } _defaults = { 'ean_sequence_id': the default value }