Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

Variable production in odoo 11 [SOLVED]

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
productionbom
2 Antworten
8196 Ansichten
Avatar
Nicolas Plennevaux

I'm developing a solution for a small company which is dedicated to produce aromatic plats for cooking. The producction process is as follows: We plant a fixed cantity of a plant, the plant is feeded for a time, after is recolected and dryed an finally is packed on 5g package. The problem is that for a fixed quantity of plants we will never get the same wheight of dryed product. I think that it's a common issue because this variable produccion is related with all produccion process for natural products, as milk, honey, vegetables, meat, etc...

Is there any way to affort that problem?


0
Avatar
Verwerfen
Avatar
Nicolas Plennevaux
Autor Beste Antwort

I get a possible solution making qty_done field as editable with a custom module. It seems to work properly, updating stock quantity without changing consumed materials. But still having an issue, i get two stock move lines, the orignal one with planned quantity of finished goods and other with increased quantity. Is there any way to avoid this constraints?, it makes really poor user friendly reports to final user.


[SOLVED]

After a little research i found a solution that works, i have'nt tested in production stage but i could'nt find errors on tests. If you use the solution and find some issues, please, post it here.

I made a custom module that overrides write and _compute_consumed_less_than_planed  to be able to save products produced independent of raw materials.

1. Set qty_done editable

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="mrp_production" model="ir.ui.view">
<field name="name">mrp.production.form</field>
<field name="model">mrp.production</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="view_type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='finished_move_line_ids']" position="attributes">
<attribute name="attrs">{'readonly': False}</attribute>
</xpath>
</field>
</record>
</odoo>

2. Override mrp_production methods

class mrp_production(models.Model):

_inherit = 'mrp.production'
        
    # Override write method to set equal quantity of product
    # on stock_move and stock_move_line relation
@api.multi
def write (self, vals):
if "finished_move_line_ids" in vals.keys():

id_move = self["move_finished_ids"]["id"]
qty = vals["finished_move_line_ids"][0][2]["qty_done"]
dominio = [('id', '=', id_move)]

move = self.env["stock.move"].search(dominio)
move.write({'ordered_qty': qty, 'product_uom_qty': qty})

res = super(mrp_production, self).write(vals)

return res


    #Avoid warning on consumed less than planned after increase product quantity
@api.multi
@api.depends
('move_raw_ids.quantity_done', 'move_raw_ids.product_uom_qty')
def _compute_consumed_less_than_planned(self):

for order in self:
order.consumed_less_than_planned = False
0
Avatar
Verwerfen
Avatar
Waldemar Tapia
Beste Antwort

Try this alternative solution.


Create an indicator for lists of materials with variable production

You must put the components of the BOM by default 1.

Make the production fill the consumption and result.
By marking as a fact, the respective consumption and planned result is assigned
class MrpBom(models.Model):
_inherit = 'mrp.bom'
variable_result = fields.Boolean('Resultado Variable'
, default=False,
help="Si es verdadero, la cantidad de productos resultantes son variables y no dependen del consumo.")


class MrpProduction(models.Model):
_inherit = 'mrp.production'


@api.multi
def button_mark_done(self):
if self.bom_id.variable_result:
for move_raw in self.move_raw_ids:
qty = move_raw.quantity_done
move_raw.write({'product_uom_qty': qty}) #'ordered_qty': qty,

for move_line in self.finished_move_line_ids:
qty = move_line.qty_done
dominio = [('id', '=', move_line.move_id.id)]
move = self.env["stock.move"].search(dominio)
move.update({'ordered_qty': qty, 'product_uom_qty': qty})

# move_line.write({'product_uom_qty': qty}) #'ordered_qty': qty,

return super(MrpProduction, self).button_mark_done()


0
Avatar
Verwerfen
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
MRP for unitary production
production bom
Avatar
Avatar
2
Feb. 19
4017
How to manage a component whose quantity does not depend on the production quantity of the product
manufacturing production bom
Avatar
0
Juni 25
2195
Products with optional upgrades
production bom variants
Avatar
0
Juni 21
2917
How to put the whole BOM into requests for quotation before starting a new production
purchase production bom
Avatar
2
Okt. 17
4215
Bill of Materials costing
production bom costing
Avatar
Avatar
3
Sept. 16
7767
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Bildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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