Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
315 Vistas

i want  inherit field price in pricelist discount in sale.order.line odoo 16


i want appear the discount pricelist field in the line  Product


class Employee(models.Model): 

   _inherit = 'sale.order.line'


    fixed_price = fields.Float(related="order_id.pricelist_id.item_ids.fixed_price")


 <record id="view_dis_product_inherit" model="ir.ui.view">   

         <field name="name">dis.product.inherited</field> 

           <field name="model">sale.order</field>   

         <field name="inherit_id" ref="sale.view_order_form"/> 

           <field name="arch" type="xml">         

       <xpath expr="/form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit']" position="after">                  

  <field name="fixed_price"/>             

      </xpath>          


  </field>     

   </record>


Avatar
Descartar