Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Guest House
    • Distributeur de boissons
    • Hotel
    Real Estate
    • Real Estate Agency
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consulting
    • Accounting Firm
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Solar Energy Systems
    • Cordonnier
    • Services de nettoyage
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Change quantity = 0 in PO Odoo 8

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
stockstock_pickingstock_move
3988 Vues
Avatar
Fadhel J Muhammad

In PO if product quantity = 3 and change quantity = 1 then received 1 quantity and 2 quantity is cancel. My question is if quantity = 3 and change quantity = 0 then received 0 and 3 quantity is cancel. In case, if quantity change become 0 then PO create backorder. I don't want if change quantity = 0 and create backorder.

I've already change code in arround addons stock/stock.py:

@api.cr_uid_ids_context
def do_transfer(self, cr, uid, picking_ids, context=None):
    """
        If no pack operation, we do simple action_done of the picking
        Otherwise, do the pack operations
    """
    if not context:
        context = {}
    stock_move_obj = self.pool.get('stock.move')
    for picking in self.browse(cr, uid, picking_ids, context=context):
        if not picking.pack_operation_ids:
            self.action_done(cr, uid, [picking.id], context=context)
            continue
        else:
            need_rereserve, all_op_processed = self.picking_recompute_remaining_quantities(cr, uid, picking, context=context)
            #create extra moves in the picking (unexpected product moves coming from pack operations)
            todo_move_ids = []
            if not all_op_processed:
                todo_move_ids += self._create_extra_moves(cr, uid, picking, context=context)

            #split move lines if needed
            toassign_move_ids = []
            for move in picking.move_lines:
                remaining_qty = move.remaining_qty
                if move.state in ('done', 'cancel'):
                    #ignore stock moves cancelled or already done
                    continue
                elif move.state == 'draft':
                    toassign_move_ids.append(move.id)
                if float_compare(remaining_qty, 0,  precision_rounding = move.product_id.uom_id.rounding) == 0:
                    if move.state in ('draft', 'assigned', 'confirmed'):
                        todo_move_ids.append(move.id)
                elif float_compare(remaining_qty,0, precision_rounding = move.product_id.uom_id.rounding) > 0 and \
                            float_compare(remaining_qty, move.product_qty, precision_rounding = move.product_id.uom_id.rounding) < 0:
                    new_move = stock_move_obj.split(cr, uid, move, remaining_qty, context=context)
                    todo_move_ids.append(move.id)
                    #Assign move as it was assigned before
                    toassign_move_ids.append(new_move)
            if need_rereserve or not all_op_processed: 
                if not picking.location_id.usage in ("supplier", "production", "inventory"):
                    self.rereserve_quants(cr, uid, picking, move_ids=todo_move_ids, context=context)
                self.do_recompute_remaining_quantities(cr, uid, [picking.id], context=context)
            if todo_move_ids and not context.get('do_only_split'):
                self.pool.get('stock.move').action_done_only(cr, uid, todo_move_ids, context=context)
            elif context.get('do_only_split'):
                context = dict(context, split=todo_move_ids)
        self._create_backorder(cr, uid, picking, context=context)
        if toassign_move_ids:
            stock_move_obj.action_assign(cr, uid, toassign_move_ids, context=context)
    return True
0
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
odoo 10 : slowness at level of view render when performing stock picking
stock stock_picking
Avatar
0
mai 24
2180
Difference Between move_line_ids and move_line_nosuggest_ids
stock_picking stock_move
Avatar
Avatar
1
août 21
8326
How to get individual fields of a t-call template? Résolu
stock stock_move
Avatar
Avatar
Avatar
2
mars 21
5440
Why am I getting "Extra Move" on picking transfers?
stock_picking stock_move
Avatar
0
févr. 17
6729
How to confirm a delivery order from sale order screen ?
stock stock_picking
Avatar
1
mars 15
5976
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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