Pular para o conteúdo
Odoo Menu
  • Entrar
  • Experimente grátis
  • Aplicativos
    Finanças
    • Financeiro
    • Faturamento
    • Despesas
    • Planilhas (BI)
    • Documentos
    • Assinar Documentos
    Vendas
    • CRM
    • Vendas
    • PDV Loja
    • PDV Restaurantes
    • Assinaturas
    • Locação
    Websites
    • Criador de Sites
    • e-Commerce
    • Blog
    • Fórum
    • Chat ao Vivo
    • e-Learning
    Cadeia de mantimentos
    • Inventário
    • Fabricação
    • PLM - Ciclo de Vida do Produto
    • Compras
    • Manutenção
    • Qualidade
    Recursos Humanos
    • Funcionários
    • Recrutamento
    • Folgas
    • Avaliações
    • Indicações
    • Frota
    Marketing
    • Redes Sociais
    • Marketing por E-mail
    • Marketing por SMS
    • Eventos
    • Automação de Marketing
    • Pesquisas
    Serviços
    • Projeto
    • Planilhas de Horas
    • Serviço de Campo
    • Central de Ajuda
    • Planejamento
    • Compromissos
    Produtividade
    • Mensagens
    • Aprovações
    • Internet das Coisas
    • VoIP
    • Conhecimento
    • WhatsApp
    Aplicativos de terceiros Odoo Studio Plataforma Odoo Cloud
  • Setores
    Varejo
    • Loja de livros
    • Loja de roupas
    • Loja de móveis
    • Mercearia
    • Loja de ferramentas
    • Loja de brinquedos
    Comida e hospitalidade
    • Bar e Pub
    • Restaurante
    • Fast Food
    • Hospedagem
    • Distribuidor de bebidas
    • Hotel
    Imóveis
    • Imobiliária
    • Escritório de arquitetura
    • Construção
    • Administração de propriedades
    • Jardinagem
    • Associação de proprietários de imóveis
    Consultoria
    • Escritório de Contabilidade
    • Parceiro Odoo
    • Agência de marketing
    • Escritório de advocacia
    • Aquisição de talentos
    • Auditoria e Certificação
    Fabricação
    • Têxtil
    • Metal
    • Móveis
    • Alimentação
    • Cervejaria
    • Presentes corporativos
    Saúde e Boa forma
    • Clube esportivo
    • Loja de óculos
    • Academia
    • Profissionais de bem-estar
    • Farmácia
    • Salão de cabeleireiro
    Comércio
    • Handyman
    • Hardware e Suporte de TI
    • Sistemas de energia solar
    • Sapataria
    • Serviços de limpeza
    • Serviços de climatização
    Outros
    • Organização sem fins lucrativos
    • Agência Ambiental
    • Aluguel de outdoors
    • Fotografia
    • Aluguel de bicicletas
    • Revendedor de software
    Navegar por todos os setores
  • Comunidade
    Aprenda
    • Tutoriais
    • Documentação
    • Certificações
    • Treinamento
    • Blog
    • Podcast
    Empodere a Educação
    • Programa de educação
    • Scale Up! Jogo de Negócios
    • Visite a Odoo
    Obtenha o Software
    • Baixar
    • Comparar edições
    • Releases
    Colaborar
    • Github
    • Fórum
    • Eventos
    • Traduções
    • Torne-se um parceiro
    • Serviços para parceiros
    • Cadastre seu escritório contábil
    Obtenha os serviços
    • Encontre um parceiro
    • Encontre um Contador
    • Conheça um consultor
    • Serviços de Implementação
    • Referências de Clientes
    • Suporte
    • Upgrades
    Github YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Faça uma demonstração
  • Preços
  • Ajuda

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

  • CRM
  • e-Commerce
  • Financeiro
  • Inventário
  • PoS
  • Projeto
  • MRP
All apps
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
Ajuda

Update order with received products that are not included in the order.

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
purchasestock_pickingorder
2 Respostas
2625 Visualizações
Avatar
Panos Anagnostakis

I have a purchase order that contains 100 units of product A. 


The supplier executes the order, but sends 100 units of product B that has the same properties with product A (it's just from another firm, but otherwise has the same properties with product A).


When I receive the products in the order's corresponding stock picking I add another stock move to receive 100 units of product B and 0 units of product A.


What I would like is when I validate the stock picking to automatically update the order and add an extra line in order lines that includes the product B with ordered qty=0 and received qty=100.


In short, I want the order to be updated with the extra lines I add in the corresponding stock picking.

0
Avatar
Cancelar
Avatar
Panos Anagnostakis
Autor Melhor resposta

I managed to achieve the result by overriding the validate_button script when validating the stock picking: 

def button_validate(self):
        for picking in self:
            if picking.purchase_id:
                picking.purchase_id.state="draft"
                for move in picking.move_ids_without_package:
                    if move.quantity_done > 0:
                    ​po_line = picking.purchase_id.order_line.filtered(lambda l: l.product_id == move.product_id)                                                ​ ​ ​ ​if not po_line:
                      ​ ​order_line_id =picking.purchase_id.order_line.create({
​                ​ ​ ​'order_id': move.purchase_line_id=order_line_id.id, ​ ​ ​ ​ ​ ​ ​'product_id': move.product_id.id,                        ​ ​ ​ ​ ​ ​'name': move.product_id.display_name,                                ​ ​ ​ 'product_qty_uom': move.quantity_done,                                ​ ​ ​ ​'product_qty':move.quantity_done,                                'product_uom': move.product_uom.id,                                'date_planned': picking.scheduled_date,})
​ ​ ​               picking.purchase_id.state="purchase"        
       
​ ​res=super(StockPickingInherit,self).button_validate()
​​return res

before validation I modify the state of the purchase order to draft, I then add purchase order lines with the extra products that are in the stock picking but not in the order and finally I revert the state to purchase. It is important to link the stock picking line with the purchase order line through the stock.move.purchase_line_id field.



0
Avatar
Cancelar
Franck Herzog

Are you still using this solution . V17 or v18 ? i have the same issu with some delivery that have to be modified from PO

Avatar
Lars Aam
Melhor resposta

Odoo allows to receive products without any purchase order. In many business cases this is necessary. You would need to update the purchase order before the goods receipt if you want to have it in your purchase order.

If not in you purchase order, you would need to post the vendor invoice without reference to a purchase order.

But if product B have the same properties as product A, why don't you manage them as the same product on your end?  If you need traceability, set up lot number in the Inventory.

0
Avatar
Cancelar
Panos Anagnostakis
Autor

Product B has a different barcode, price and other minor differences which are not of importance. I consider it a variant, but nevertheless it is a different product.

Lars Aam

General recommendation for internal logistics is to relabel everything at goods reciept with your own labels. With using Variants or manage as two different producst, you must know at the point where you register sales order to choose the correct. As long as customer can receive either or. Seems to me tricky to manage efficient.

Está gostando da discussão? Não fique apenas lendo, participe!

Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!

Inscreva-se
Publicações relacionadas Respostas Visualizações Atividade
purchase order report Resolvido
purchase order
Avatar
Avatar
Avatar
3
set. 18
10221
Customer on Purchase Order Resolvido
purchase customer order
Avatar
Avatar
1
dez. 24
2727
Updating a receipt Resolvido
purchase receipt order
Avatar
Avatar
2
ago. 22
4839
Registering incoming productw with the Purchase Unit of Measure
purchase stock_picking units
Avatar
0
set. 20
2892
block the account move creation when purchase order receipt is confirmed. Resolvido
purchase stock stock_picking
Avatar
Avatar
Avatar
2
mar. 19
5175
Comunidade
  • Tutoriais
  • Documentação
  • Fórum
Open Source
  • Baixar
  • Github
  • Runbot
  • Traduções
Serviços
  • Odoo.sh Hosting
  • Suporte
  • Upgrade
  • Desenvolvimentos personalizados
  • Educação
  • Encontre um Contador
  • Encontre um parceiro
  • Torne-se um parceiro
Sobre nós
  • Nossa empresa
  • Ativos da marca
  • Contato
  • Empregos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidade
  • Segurança
الْعَرَبيّة 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 é um conjunto de aplicativos de negócios em código aberto que cobre todas as necessidades de sua empresa: CRM, comércio eletrônico, contabilidade, estoque, ponto de venda, gerenciamento de projetos, etc.

A proposta de valor exclusiva Odoo é ser, ao mesmo tempo, muito fácil de usar e totalmente integrado.

Site feito com

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