Przejdź do zawartości
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Sztuczna inteligencja
    • IoT
    • VoIP
    • Wiedza
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    • Referral Program
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

Add products cost in the internal transfer

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
inventoryinternal-transfer
2 Odpowiedzi
1160 Widoki
Awatar
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
Awatar
Odrzuć
Awatar
Cybrosys Techno Solutions Pvt.Ltd
Najlepsza odpowiedź
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
Awatar
Odrzuć
Awatar
Patrick Sylvester-Jose
Najlepsza odpowiedź

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
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
How to Enable Inventory Internal Transfers to have "Sign" Button like Deliveries
inventory internal-transfer
Awatar
0
gru 25
1282
2 Step process Transfer
inventory internal-transfer
Awatar
Awatar
1
wrz 24
3509
avoid internal transfer merge Rozwiązane
inventory transfer internal-transfer
Awatar
Awatar
2
maj 26
6390
false reserve in Inventory
inventory internal-transfer Odoo17
Awatar
1
maj 25
2441
Packaging count in stock transfer
inventory packaging internal-transfer
Awatar
0
sie 24
3081
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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