Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
7478 Lượt xem

By creating a product with a BOM, you can compute the "cost" based on the BOM.

It is possible to generate the Sales Price of products based on the sales prices of BOM components and services?

Thanks

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

that can be a pretty complex thing. We had our partner develop a special module for this. To do this, the BOM calculation is first carried out, and the manufacturing overheads are added to the result. This gives you the manufacturing costs. Then, various other surcharges (e.g. overheads for sales, development, etc. or even profit) are added via a configurable table and finally a gross price is shown. This module is protected by access rights, so that the individual factors are not recognizable for unauthorized persons.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

by default, you will see bom cost, but it want update product(kit product cost or sales price).

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

# Charger les enregistrements de nomenclature associés pour le produit actuel
rec_boms = env[' mrp.bom.line'].search([('product_id', '=', record.id)]).mapped('bom_id')

for bom in rec_boms :
    # Charger le produit de référence de la nomenclature
    pour ref_prod dans bom.product_tmpl_id :
        prod = env['product.product'].search([('id', '=', ref_prod.id )])

        # Appelez la méthode Update Price from BOM pour mettre à jour le coût du produit
        prod.button_bom_cost()

Or








your_fields = fields.float(string='Prix de vente' ,compute='compute_your_fields', ...)



@api.depends('your_prix_de_vente_fields', 'your_service_bom_fields')

def compute_your_fields(self ):

   self.your_fields=  your_prix_de_vente_fields + your_service_bom_fields



self.your_fields= your_prix_de_vente_fields + your_service_bom_fields :changer ce formule selon ton methode de calcule .


Thanks 🥰🤔

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 21
7085
5
thg 1 25
4643
1
thg 12 24
2384
1
thg 2 24
2369
2
thg 2 23
3366