Skip ke Konten
Odoo Menu
  • Login
  • Uji coba gratis
  • Aplikasi
    Keuangan
    • Akuntansi
    • Faktur
    • Pengeluaran
    • Spreadsheet (BI)
    • Dokumen
    • Tanda Tangan
    Sales
    • CRM
    • Sales
    • POS Toko
    • POS Restoran
    • Langganan
    • Rental
    Website
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Rantai Pasokan
    • Inventaris
    • Manufaktur
    • PLM
    • Purchase
    • Maintenance
    • Kualitas
    Sumber Daya Manusia
    • Karyawan
    • Rekrutmen
    • Cuti
    • Appraisal
    • Referensi
    • Armada
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Acara
    • Otomatisasi Marketing
    • Survei
    Layanan
    • Project
    • Timesheet
    • Layanan Lapangan
    • Meja Bantuan
    • Planning
    • Appointment
    Produktivitas
    • Diskusi
    • Approval
    • IoT
    • VoIP
    • Pengetahuan
    • WhatsApp
    Aplikasi pihak ketiga Odoo Studio Platform Odoo Cloud
  • Industri-Industri
    Retail
    • Toko Buku
    • Toko Baju
    • Toko Furnitur
    • Toko Kelontong
    • Toko Hardware
    • Toko Mainan
    Makanan & Hospitality
    • Bar dan Pub
    • Restoran
    • Fast Food
    • Rumah Tamu
    • Distributor Minuman
    • Hotel
    Real Estate
    • Agensi Real Estate
    • Firma Arsitektur
    • Konstruksi
    • Estate Management
    • Perkebunan
    • Asosiasi Pemilik Properti
    Konsultansi
    • Firma Akuntansi
    • Mitra Odoo
    • Agensi Marketing
    • Firma huku
    • Talent Acquisition
    • Audit & Sertifikasi
    Manufaktur
    • Tekstil
    • Logam
    • Perabotan
    • Makanan
    • Brewery
    • Corporate Gift
    Kesehatan & Fitness
    • Sports Club
    • Toko Kacamata
    • Fitness Center
    • Wellness Practitioners
    • Farmasi
    • Salon Rambut
    Perdagangan
    • Handyman
    • IT Hardware & Support
    • Sistem-Sistem Energi Surya
    • Pembuat Sepatu
    • Cleaning Service
    • Layanan HVAC
    Lainnya
    • Organisasi Nirlaba
    • Agen Lingkungan
    • Rental Billboard
    • Fotografi
    • Penyewaan Sepeda
    • Reseller Software
    Browse semua Industri
  • Komunitas
    Belajar
    • Tutorial-tutorial
    • Dokumentasi
    • Sertifikasi
    • Pelatihan
    • Blog
    • Podcast
    Empower Education
    • Program Edukasi
    • Game Bisnis 'Scale Up!'
    • Kunjungi Odoo
    Dapatkan Softwarenya
    • Download
    • Bandingkan Edisi
    • Daftar Rilis
    Kolaborasi
    • Github
    • Forum
    • Acara
    • Terjemahan
    • Menjadi Partner
    • Layanan untuk Partner
    • Daftarkan perusahaan Akuntansi Anda.
    Dapatkan Layanan
    • Temukan Mitra
    • Temukan Akuntan
    • Temui penasihat
    • Layanan Implementasi
    • Referensi Pelanggan
    • Bantuan
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dapatkan demo
  • Harga
  • Bantuan

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Akuntansi
  • Inventaris
  • PoS
  • Project
  • MRP
All apps
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Anda harus terdaftar untuk dapat berinteraksi di komunitas.
Semua Post Orang Lencana-Lencana
Label (Lihat semua)
odoo accounting v14 pos v15
Mengenai forum ini
Help

How to create a transfer (stock.picking) from an Automated Action in Studio?

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
pythontransferstock.movestudiostock.picking
1 Balas
18696 Tampilan
Avatar
mike@rehabtronics.com

I've managed to create a transfer (stock.picking) record and, through setting the Stock Moves field in the transfer, a stock.move record.

The trouble is that, despite the stock.move being created as a field in the stock.picking record, the two resulting records appear to be unrelated:

•    The Transfer record has nothing in its move lines
•    The Stock Move record has "Stock Rule/External ID" = FALSE

Below is are details of the current Automated Action setup.  Any advice/guidance/resource-links would be greatly appreciated:

My automated action intent is to create a stock transfer (stock.picking) under certain conditions (in this case if a "quantity_rejected" number field changes from 0 to a number >0):

I create a new automated action with the following settings:

  • Action To Do: Create a new Record
  • Create/Write Target Model: Transfer

Under the "Data to Write", I have the following:

FIELD (stock.picking)

EVALUATION TYPE

Record / Value

Company

Reference

MyCompany

Source Location

Reference

WH/Input

Destination Location

Reference

WH/Scrap

Operation Type

Reference

MyCompany: Internal Transfer

Source Document

Python expression

record.x_name

Qty

Python expression

record.x_studio_quantity_rejected

Product

Python expression

record.x_studio_product.id

Stock Moves
Python expression
env['stock.move'].create({
'name': 'Rejected Product Transfer',
'location_id': 14,
'location_dest_id': 20,
'product_id': record.x_studio_product.id,
'product_uom': 1,
'product_uom_qty': record.x_studio_quantity_rejected,
'procure_method': 'make_to_stock',
'date_expected': datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
'date': datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
'company_id': 1,
})


As I say, this successfully creates both a new transfer, and a new stock move record.  But, like I say, despite the stock.move being created as a field in the stock.picking record, the two records appear to be unrelated:
•    The Transfer record has nothing in its move lines
•    The Stock Move record has "Stock Rule/External ID" = FALSE


(Odoo v12 Enterprise)

0
Avatar
Buang
Alexander Christen

Did you manage to find a solution for this?

mike@rehabtronics.com
Penulis

Unfortunately, no.  Experimented a bit more, but never found a solution. Ultimately I gave up.

Would still be really nice to know how to accomplish this though... ;)

Avatar
Frank Scholten
Jawaban Terbai

Hi,

I managed to do this the following way.

You are creating a new record in the table stock.move, whereas using the transfer['move_lines'] i'm creating it in the context of the transfer.

----------------------------------

destination = record.location_id
orderlines = record.move_lines
note = "Nieuwe Transfer"
id = record.id

transfer = env['stock.picking'].create({
'picking_type_id': 5,
'location_id': 8,
'location_dest_id' : destination.id,
'note' : note
})

for line in orderlines:
transfer['move_lines'] = [(0,0, {
'name' : note,
'product_uom_qty' : line.product_uom_qty,
'product_id' : line.product_id.id,
"product_uom" : line.product_id.uom_id.id,
"location_id" : 8,
"location_dest_id" : destination.id
})]

1
Avatar
Buang
Menikmati diskusi? Jangan hanya membaca, ikuti!

Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!

Daftar
Post Terkait Replies Tampilan Aktivitas
How can you get a list of all product_id's associated to a given a stock_picking id?
python stock.move stock.picking odooV8
Avatar
Avatar
2
Jan 16
7014
Manage Immediate Internal Transfer from RPC API
python rpc stock.move stock.picking 13.0
Avatar
Avatar
2
Apr 20
6191
How to show moves and their details from picking
stock.move stock.picking
Avatar
Avatar
Avatar
2
Mei 25
7254
Display Debit and Credit in USD in Journal Items
python studio
Avatar
Avatar
1
Feb 25
2069
Studio - link between project and quotation
python studio
Avatar
0
Jun 19
1867
Komunitas
  • Tutorial-tutorial
  • Dokumentasi
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Terjemahan
Layanan
  • Odoo.sh Hosting
  • Bantuan
  • Peningkatan
  • Custom Development
  • Pendidikan
  • Temukan Akuntan
  • Temukan Mitra
  • Menjadi Partner
Tentang Kami
  • Perusahaan kami
  • Aset Merek
  • Hubungi kami
  • Tugas
  • Acara
  • Podcast
  • Blog
  • Pelanggan
  • Hukum • Privasi
  • Keamanan
الْعَرَبيّة 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 ภาษาไทย Türkçe українська Tiếng Việt

Odoo adalah rangkaian aplikasi bisnis open source yang mencakup semua kebutuhan perusahaan Anda: CRM, eCommerce, akuntansi, inventaris, point of sale, manajemen project, dan seterusnya.

Mudah digunakan dan terintegrasi penuh pada saat yang sama adalah value proposition unik Odoo.

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