Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

How to pass product_ids from old sales order to new sales order.

Odoberať

Get notified when there's activity on this post

This question has been flagged
salessale.order.linesale.orderodooV8odoo8.0
2 Replies
5710 Zobrazenia
Avatar
Logicious

Hello,

Can anyone tell how can i pass product from old sales order into new sales order. I made one reference veriable of sales order as many2one in sales order, from here we can able to select any sales order. when i am creating a sales order i can able to select any previous orders , if i selected any one of them , i need to pass the entire products from that order line into my new sales order. How can i do that.?? i added one button for that, but its not working.


Thanking you,

Logicious

1
Avatar
Zrušiť
Logicious
Autor

i got a same situation in form , but its for purchase . exact same thing i needed for my sales. i am attaching that for reference.https://www.odoo.com/forum/help-1/question/how-to-fill-purchase-order-line-with-sale-order-line-9924

Avatar
Prasanth ks
Best Answer

in this you all ready told that you created on but, you can continue with that,if you refer the module "sale_add_products_wizard" apps, you can easily add that into your function.

i will give you my code , if you can modify it .

def button_submission_submit(self,cr,uid,ids,context=None):

order_line_obj = self.pool.get('sale.order.line')

product_obj = self.pool.get('product.product')

data=self.browse(cr,uid,ids[0]) 

partner = data.partner_id.id  

pricelist = data.pricelist_id.id  

line_ids = data.sale_id.order_line

for line in line_ids:

product_id = line.product_id.id

p = product_obj.browse(cr,uid,product_id)

uom_q = p.uom_id.id

qty_p = line.product_uom_qty 

product = self.pool.get('sale.order.line').product_id_change(cr, uid, ids,

pricelist,

product_id,

qty=qty_p,

uom=uom_q,

partner_id=partner

)

val = {

'name': product['value'].get('name'),

'product_uom_qty': qty_p,

'order_id': ids[0],

'product_id': p.id or False,

'product_uom':uom_q,

'price_unit': product['value'].get('price_unit'), 

} 

order_line_obj.create(cr,uid,val)

return True

1
Avatar
Zrušiť
Logicious
Autor

@pks thank you , its working fine.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
Sales - add constraint on "Confirm Sales" button Solved
sales sale.order.line odooV8 odoo8.0 odoo8
Avatar
Avatar
6
mar 17
8123
How to create a new model inherit from sale.order.line ? Solved
sale.order.line sale.order odooV8
Avatar
Avatar
Avatar
3
apr 17
9539
How can I add a product to a Sales Order with its Barcode? Solved
sales barcode sale.order.line sale.order
Avatar
Avatar
Avatar
Avatar
3
júl 24
14669
How to get product quantity in particular warehouse in sales order Odoo 9 ?
sales sale.order.line sale.order odoo-v9
Avatar
Avatar
Avatar
Avatar
3
mar 18
6489
Select custom supplier when creating sale.order.line
sale.order.line purchase_order odooV8 odoo8.0
Avatar
Avatar
2
apr 17
5994
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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