Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
1278 Widoki

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 ?

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

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 

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Thank you for your answer and solution.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lis 21
3214
1
mar 25
2043
2
mar 15
4331
0
kwi 24
11
1
lip 25
528