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

Configure product wizard in sale product price need to show based on varient

Langganan

Dapatkan notifikasi saat terdapat aktivitas pada post ini

Pertanyaan ini telah diberikan tanda
productproduct.productProduct-variants
1 Balas
935 Tampilan
Avatar
Vishnu Rajesh

i have two variants in a single product each variants price need to taken as as a lst_price from product.product,

getFormattedPrice() {
return formatCurrency(this.props.price, this.env.currency.id);
}


as per this code product price is taken from product.template list_price + extra_price 
insted of this i need product.product lst_price(sales price)

0
Avatar
Buang
Christoph Farnleitner

Did you change _compute_product_lst_price()? Because ultimately: product.lst_price = list_price + product.price_extra

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Jawaban Terbai

Hi,

Create a custom module or use your existing one. Add the following controller in controllers/main.py:


from odoo import http

from odoo.http import request

from datetime import datetime


class ProductConfiguratorController(http.Controller):


    @http.route(

        route='/sale/product_configurator/update_combination',

        type='json',

        auth='user',

        methods=['POST'],

    )

    def sale_product_configurator_update_combination(

        self,

        product_template_id,

        ptav_ids,

        currency_id,

        so_date,

        quantity,

        product_uom_id=None,

        company_id=None,

        pricelist_id=None,

        **kwargs,

    ):

        if company_id:

            request.update_context(allowed_company_ids=[company_id])


        product_template = request.env['product.template'].browse(product_template_id)

        combination = request.env['product.template.attribute.value'].browse(ptav_ids)

        product = product_template._get_variant_for_combination(combination)


        pricelist = request.env['product.pricelist'].browse(pricelist_id)

        product_uom = request.env['uom.uom'].browse(product_uom_id)

        currency = request.env['res.currency'].browse(currency_id)


        # Use _get_basic_product_information to fetch all necessary info

        values = self._get_basic_product_information(

            product,

            pricelist,

            combination,

            quantity=quantity or 0.0,

            uom=product_uom,

            currency=currency,

            date=datetime.fromisoformat(so_date),

            **kwargs,

        )


        # ⛔ Remove computed price — set variant's list price (sales price)

        values['price'] = product.lst_price


        return values

def _get_basic_product_information(

    self,

    product,

    pricelist,

    combination,

    quantity,

    uom,

    currency,

    date,

    **kwargs,

):

    name = product.get_product_multiline_description_sale()

    return {

        'product_id': product.id,

        'product_template_id': product.product_tmpl_id.id,

        'combination': combination.ids,

        'name': name,

        'price': pricelist.get_product_price(product, quantity, request.env.user.partner_id),

        'product_uom': uom.id if uom else product.uom_id.id,

        'currency_id': currency.id,

    }


Hope it helps

0
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
Modifying currency_id on product.template Diselesaikan
product product.product
Avatar
Avatar
1
Mei 21
7257
How to associate image with product variant?
product product.product
Avatar
Avatar
1
Mar 18
8546
Product variant infos not in sale description
sales product Product-variants
Avatar
Avatar
1
Mei 25
1149
How to Inherit View For Specific Group and restrict Create and Edit ?
product product.product product.template
Avatar
Avatar
1
Feb 25
2553
Customer Article Number
product product.product product_code
Avatar
Avatar
Avatar
Avatar
3
Mar 24
7023
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