0
odoo見積もりや販売注文で総製品重量を計算したいのですが、その方法を書く方法がわからない、誰かが私にそれについてのヒントを与えることができますか?ここodooで製品重量を計算するには?
class ProductWeight(models.Model):
_inherit = "sale.order"
th_weight = fields.Float('Weight')
@api.one
def _calcweight(self):
currentweight = 0
for weight in self.weight_ids:
currentweight = currentweight + weight.th_weight
self.weight_total = currentweight
weight_total = fields.Float('Total Weight', store=True, compute="_calcweight")
は、上記の総重量を計算するための私の方法ですが、その権利はない、私に404エラーを与えます。
私に404が見つかりませんでしたエラー –
問題の[mcve]を共有できますか? 404は非常に具体的な意味を持つので、間違ってAPIを使用しているようです –
これは私の完全なコードです。私は理解できない間違いを犯していると思います –