<?xml version="1.0"?>
<!--
    Copyright (C) 2020-Today: La Osa (<https://laosa.coop/>)
    @author: Criptomart (https://criptomart.net)
    License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->

<odoo>

    <!-- Add action entry in the Action Menu for calculate sale price in Products -->
    <record id="action_product_calculate_theoritical_price" model="ir.actions.server">
        <field name="name">Update Sales Price</field>
        <field name="model_id" ref="product.model_product_template"/>
        <field name="binding_model_id" ref="product.model_product_template"/>
        <field name="state">code</field>
        <field name="code">
            records.action_update_list_price()
        </field>
    </record>

    <!-- Bulk-correct last_purchase_price_received from main supplierinfo discounts -->
    <record id="action_sync_purchase_price_from_supplierinfo" model="ir.actions.server">
        <field name="name">Sync Purchase Price from Supplier</field>
        <field name="model_id" ref="product.model_product_template"/>
        <field name="binding_model_id" ref="product.model_product_template"/>
        <field name="state">code</field>
        <field name="code">
            records.action_sync_purchase_price_from_supplierinfo()
        </field>
    </record>

</odoo>
