Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Intelligence artificielle
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Supermarché
    • Quincaillerie
    • Magasin de jouets
    Restauration & Hôtellerie
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brasserie
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Commerce
    • Homme à tout faire
    • Matériel informatique & support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Parcourir toutes les industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenir partenaire
    • Services pour partenaires
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Add products cost in the internal transfer

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
inventoryinternal-transfer
2 Réponses
1155 Vues
Avatar
Anbar

Hello, 
My company has three warehouses and we make daily many internal transfers, we want to show the value of teh products(price) in each transfer
in teh table of the internal transfer items we would like to add acolumn of price and a total price of all the transfered products 

Note: Odoo V19 Enterprise edition
thanks

0
Avatar
Ignorer
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Meilleure réponse
Hi,
Please refer to the code:


from odoo import models, fields, api

class StockMove(models.Model):
    _inherit = 'stock.move'

    unit_cost = fields.Float(
        string='Unit Cost',
        compute='_compute_unit_cost',
        store=True
    )
    line_value = fields.Float(
        string='Line Value',
        compute='_compute_line_value',
        store=True
    )

    @api.depends('stock_valuation_layer_ids.unit_cost')
    def _compute_unit_cost(self):
        for move in self:
            svl = move.stock_valuation_layer_ids[:1]
            move.unit_cost = svl.unit_cost if svl else 0.0

    @api.depends('quantity_done', 'unit_cost')
    def _compute_line_value(self):
        for move in self:
            move.line_value = move.quantity_done * move.unit_cost
            
            
from odoo import models, fields, api

class StockPicking(models.Model):
    _inherit = 'stock.picking'

    total_transfer_value = fields.Float(
        string='Total Transfer Value',
        compute='_compute_total_transfer_value',
        store=True
    )

    @api.depends('move_ids.line_value')
    def _compute_total_transfer_value(self):
        for picking in self:
            picking.total_transfer_value = sum(
                picking.move_ids.mapped('line_value')
            )


Hope it helps.

0
Avatar
Ignorer
Avatar
Patrick Sylvester-Jose
Meilleure réponse

Not a simple answer.  By value you mean the cost of the product or the sales price?  Is the company multi-currency?  Do you have product variants?  Do you have UOM conversion for products?  

The answers to the above change which fields are used to perform the computation, but regardless you are going to need at a minimum three customer fields.  The first custom field is the move's line item value which will be part of the Product Move (Stock Line) aka stock.move.line model.  The second is the move total which is on the Stock Move stock.move table.  The third is a currency_id field for the line item referencing the res.currency table.


The line item value (let's call that field stock.move.line/x_value_total) calculation is going to depend a lot on the first part set of questions I asked.  


Edit:  It will be a monetary field referencing the currency_id field.  The correct qty field I believe is quantity_product_uom (quantity of line item converted to the base quantity of the product) which is multiple by the product's (from product.product) cost / sales price.  If the currencies are different then currency conversion will be needed too.



The stock move total will of course be a summation of the all of the line's x_value_total.


UI additions can be handled in Odoo Studio by going to the form, opening Odoo Studio, clicking on the appropriate section and adding the monetary fields where you need them.

0
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
How to Enable Inventory Internal Transfers to have "Sign" Button like Deliveries
inventory internal-transfer
Avatar
0
déc. 25
1280
2 Step process Transfer
inventory internal-transfer
Avatar
Avatar
1
sept. 24
3507
avoid internal transfer merge Résolu
inventory transfer internal-transfer
Avatar
Avatar
2
mai 26
6384
false reserve in Inventory
inventory internal-transfer Odoo17
Avatar
1
mai 25
2439
Packaging count in stock transfer
inventory packaging internal-transfer
Avatar
0
août 24
3079
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenir partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now