Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
1300 Tampilan

Hi All,


i'm using odoo online, please kindly help for Purchase Menu, here is example :


i have create RFQ with 4 products.

1. Books 

2. Pencil

3. Eraser

4. Pen


total PO is 50.000 and my supplier give us discount for all is 10,000 not disc for each item.


How i can input 10.000 disc in PO ?

Avatar
Buang
Jawaban Terbai

Hi,

1. Create the Purchase Order:

    - Go to the Purchase module and create a new Purchase Order.

    - Add your supplier and products (Books, Pencil, Eraser, Pen).


2. Add the Discount:

    - Add a new order line with a product named "Discount" (or create it as a service product if it doesn't exist).

    - Enter the discount amount as -10,000 in the "Price" field.


3. Verify and Save:

    - Check the total amount to ensure the discount is applied correctly.

    - Save and confirm the Purchase Order.


This will apply the total discount to your PO.


Hope it helps

Avatar
Buang
Jawaban Terbai

Hello azlam


Hope you are doing well.


For 'Purchase Discount for All Items'.


- I put one custom field 'discount' integer.


- So, Whenever we will add any amount in purchase order's 'discount' fields, It will update amount_untaxed, amount_tax and amount_total accordingly.


Code : 


class PurchaseOrder(models.Model):

    _inherit = 'purchase.order'


    discount_total = fields.Float(string='Discount Value')


    @api.depends('discount_value', 'discount_type', 'discount_total', 'order_line.price_total')

    def _amount_all(self):

        super(PurchaseOrder, self)._amount_all()

        for order in self:

            discount_total = 0.0

            order.update({

                'discount_total': discount_total,

                'amount_untaxed': order.amount_untaxed - discount_total,

                'amount_tax': ((order.amount_untaxed - discount_total) * order.order_line.taxes_id.amount / 100),

                'amount_total' : (order.amount_untaxed - discount_total) + ((order.amount_untaxed - discount_total) * order.order_line.taxes_id.amount / 100),

            })  


Also, We can also change calculations according to our need.


Please reach out to us if any queries.

I Hope this information proves helpful to you.

Thanks & Regards,

Email:   odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari 

Avatar
Buang
Penulis Jawaban Terbai

Thank you for your answer and solution.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Nov 21
3218
1
Mar 25
2043
2
Mar 15
4340
0
Apr 24
11
1
Jul 25
540