Odoo Ver. 17.0 last build
I need help with this and tks
I have this model "cost.fleet.vehicle.fuel" in delegation inherit from "product.product" (inherit from product.template)
class costFleetVehicleFuel(models.Model):
_name="cost.fleet.vehicle.fuel"
_inherits = {'product.product': 'product_id'}
_description = 'Vehicle Fuel'
product_id = fields.Many2one( 'product.product', 'Product Id',auto_join=True, index=True, ondelete="cascade", required=True)
I imported xml data without problems through this model cost.fleet.vehicle.fuel, odoo creates the cost.fleet.vehicle.fuel registry, product.product registry and the product.template registry
(I deleted of the code greater-than and less-than symbols)
record id='provider01' model="res.partner">
field name="name">provider X
/record
record id="cat_fuel" model="product.category"
field name="name">Fuel
/record
record id="prod_fuel_1" model="cost.fleet.vehicle.fuel"
field name="name">Fuel 88 /field
field name="categ_id" ref="cat_fuel_gasoline"/
field name="standard_price">6000.0 /field
field name="uom_id" ref="uom.product_uom_litre"/
field name="uom_po_id" ref="uom.product_uom_litre"/
field name="sale_ok">False /field
/record
----this record is my problem --
record id="product_supplierinfo_1" model="product.supplierinfo"
field name="product_tmpl_id" ref="?????????" ---- this line is my problem
field name="partner_id" ref="provider01"/
field name="delay" 1 /field
field name="min_qty">1 field name="price" 6000.0 /field
field name="currency_id" search="[('name','=','PYG')]"/
/record
Question: How Can I to reference to ('cost.fleet.vehicle.fuel').product_id.product_tmpl_id.id in the xml to insert registries in the model : product.supplierinfo, my problem is the reference to "id" of product.template
I have not found much info over ref o eval
tks for you help