【问题标题】:get value of field from an existing module in odoo 15get value of field from an existing module in odoo 15
【发布时间】:2022-12-02 11:12:19
【问题描述】:

every product in odoo should have quantity minimum

i have created product and i set the quantity min to it in reordering rule

what i want to do is get the product name and it's quantity min in python

this is my python file

from odoo import fields,models,api

class Qty_Min_Alert(models.Model):
    _inherit='product.template'
    product_name = # here i want to set the product name from product.template
    product_qty_min = # here i want to set the product quantity minimum from product.template

i added 'product' in depends onmanifest.py can you help me please

【问题讨论】:

    标签: python ubuntu odoo odoo-15


    【解决方案1】:

    your question is bit unclear, according to your question what i understood is that you want to set every product in product with a particular quantity which is in your case will be the minimum quantity?

    if so then you have to inherit the product.product and create a method to search all records and then update the in_hand_qty to your desired minimum value as you have set it already on a field

    【讨论】:

      猜你喜欢
      • 2022-12-02
      • 2022-12-01
      • 2014-04-22
      • 2022-12-02
      • 2022-12-27
      • 2022-12-02
      • 1970-01-01
      • 2022-12-02
      • 2022-12-01
      相关资源
      最近更新 更多