コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4143 ビュー

Hello All,

I have two module which override _amount_all method of sale.order.

Here is the code of default method .

@api.depends('order_line.price_total')
def _amount_all(self):
    """
    Compute the total amounts of the SO.
    """
    for order in self:
        amount_untaxed = amount_tax = 0.0
        for line in order.order_line:
            amount_untaxed += line.price_subtotal
            amount_tax += line.price_tax
        order.update({
            'amount_untaxed': amount_untaxed,
            'amount_tax': amount_tax,
            'amount_total': amount_untaxed + amount_tax,
        })


How can i override this method to successfully archived updation of value without replace whole method.

both method do some operation on amount_untaxed, taxed and amount tax and update amount_untaxed,amount_tax and amount_total based on calculation.







アバター
破棄
最善の回答

same problem !!!!!!!!!!!!!!!

アバター
破棄
関連投稿 返信 ビュー 活動
3
11月 23
17618
3
11月 24
25342
1
4月 23
6267
2
12月 22
7031
1
11月 22
4182