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
1631 Widoki

How can we set back, after an upgrade in Purchase app. Before the update of the app. When there is a Purchase Orders, and a department needs to validate it, so the demand and quantity is default to 0. And this department is the one who will set the quantity delivered.

We have a 20+ and more items purchase orders in one vendor, and they deliver the items partially. 

Now, the new update of Purchase app. The demand and quantity, is automatically same value to every items purchase orders. So we need to change the other items that haven't delivered yet to 0. This gives us a hassle and confusing to the datas. 

Awatar
Odrzuć

Did you fix the issue?

Najlepsza odpowiedź

Theerayut Attajak,

It's a new behavior to go faster form the 17.0.

If you want to avoid that into that your workers can check the quantity you need to create a little custom code which is already given here.


Awatar
Odrzuć
Najlepsza odpowiedź

Hi Cybrosys

Do you know why odoo automate quantity to the same as demand?
As previous version like odoo 15 they not automate set quantity like this.


Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

Please refer to the code below:


from odoo import models


class PurchaseOrder(models.Model):

    _inherit = 'purchase.order'


    def button_confirm(self):

        res = super().button_confirm()

        for order in self:

            for picking in order.picking_ids:

                for move in picking.move_ids_without_package:

                    move.quantity = 0.0

        return res


Hope it helps.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
lip 25
2439
1
cze 25
3456
2
cze 25
2386
1
maj 25
1484
1
lut 25
39