Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
1201 Weergaven

I have some products which made in batches means their manufacturing order run manually. and some products a run automatic manufacturing order for those i have set reordering for them  and  i have automated action this with  domain state = confirm

  1. Automated Actions
    record.write({
  2.     'qty_producing': record.product_qty,
  3. })
  4. move_lines = record.move_raw_ids
  5. for move in move_lines:
  6.     move.write({
  7.         'quantity_done': move.product_uom_qty,
  8.     })
  9. record.button_mark_done()

    this is on To order > 0
    2.Automated Actions
    record.action_replenish()

    now the problem is the products i made in batches run the replenishment report by the system and make automatic MO which i dont want.
    anything i am missing or doing wrong.


Avatar
Annuleer
Beste antwoord

Odoo have a default Schedule action: "Procurement: run scheduler": model.run_scheduler(True)

In the reordering rule you can set reordering to manual, and then they are not managed by the run scheduler action.

Hope this solve your issue.

Avatar
Annuleer
Auteur

@Lars Aam the product which we run in batches manually not have any reordering rule (auto/manual) not at all yet they are creating the MO by the replenishment report.

'model.run_scheduler(True)' is not doing the same as your 'record.action_replenish'. Try using the standard from Odoo. It should skip all that do not have a reordering rule. Only process where reordering rule is set to Auto.

Auteur

i get that what are you saying but we want to automate our products that sell on POS to automatically create MO for the product which have reordering rule .
Means for example
when the order punch at POS it goes in replenishment and when the run scheduler run it create MO in normal odoo but with this we were able to create the MO automatically
Apply domain To order > 0
2.Automated Actions
record.action_replenish()

we dont have to run run scheduler at the day end.
do i need to restrict it more on which product it can run?

Gerelateerde posts Antwoorden Weergaven Activiteit
0
mrt. 25
995
1
dec. 24
1815
0
jul. 23
1995
1
jun. 24
1572
1
mei 25
2220