【问题标题】:calculate the (discount = sales price - unit price )计算(折扣=销售价格-单价)
【发布时间】:2020-06-08 12:36:59
【问题描述】:

如何计算(折扣=销售价格-单价) (1-price_unite/list_price)*100

详情见下图 https://i.stack.imgur.com/sdoe5.png

【问题讨论】:

    标签: odoo odoo-10 odoo-12


    【解决方案1】:

    请根据您的sale_priceunit_price 制作一个可以计算 diccount 的计算函数。

    @api.depends('unit_price', 'sale_price')
    def compute_discount(self):
        for rec in self:
            rec.discount = (1-unit_price/sale_price)/100
    

    如果我猜对了,您需要在 purchase.order.line 中添加此计算方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-09-16
      • 1970-01-01
      • 1970-01-01
      • 2020-05-05
      • 1970-01-01
      • 2021-08-29
      • 1970-01-01
      相关资源
      最近更新 更多