Skip to Content
Menu
This question has been flagged
1 Reply
2608 Views

Is it possible to change the Purchasing price_unit decimal places without affecting the Sales price_unit?   Purchase order rounding does not reflect my necessary .0001 prices.

Avatar
Discard
Best Answer

Hello Stonelock,

you can create a new decimal accuracy for your purchase order price unit like this.


<record id="decimal_new_purchase_price" model="decimal.precision">

    <field name="name">Purchase Price</field>

    <field name="digits" eval="4"/>

</record>


Then you need to override the Price Unit of the Purchase Order Line and change the decimal precision to this one that you have created right now like this:


class PurchaseOrderLine(models.Model):

    _inherit = 'purchase.order.line'


    price_unit = fields.Float(string='Unit Price', required=True, digits='Purchase Price')

Thanks
For more information Contact us: -    https://kanakinfosystems.com/odoo-development-services
Avatar
Discard