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 on __manifest__.py
can you help me please 
Odoo is the world's easiest all-in-one management software.
 It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
            
                1
                
                    回复
                
            
        
        
            
                1407
                
                    查看
                
            
        
    Hi,
You can refer to this code.
from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = 'product.template'
product_name = fields.Many2one('product.template', string='Prooooooo')
product_qty_min = fields.Float(related='product_name.reordering_min_qty')
Regards
