Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

Python Errors when Creating Warehouse

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
warehouseswarehousemultiplebug
2 Besvarelser
8911 Visninger
Avatar
tim diamond

Hi Community,

I recently believe I may have found a bug in the warehouse system, wondering if anyone can help me confirm.

I recently installed a fresh copy of OpenERP 7 on Ubuntu server, and everything has been working great. However, today, I went into my warehouse settings, and clicked the option to manage multiple warehouses. Now, when I go to warehouses ---> configuration ---> warehouses, when I click on create warehouse I receive the following error popup:

OpenERP Server Error Client Traceback (most recent call last): File "/opt/openerp/v7/web/addons/web/http.py", line 204, in dispatch response["result"] = method(self, *self.params) File "/opt/openerp/v7/web/addons/web/controllers/main.py", line 1128, in call_kw return self._call_kw(req, model, method, args, kwargs) File "/opt/openerp/v7/web/addons/web/controllers/main.py", line 1120, in _call_kw return getattr(req.session.model(model), method)(args, **kwargs) File "/opt/openerp/v7/web/addons/web/session.py", line 42, in proxy result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw) File "/opt/openerp/v7/web/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/opt/openerp/v7/web/addons/web/session.py", line 103, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last): File "/opt/openerp/v7/web/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/opt/openerp/v7/server/openerp/netsvc.py", line 292, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/opt/openerp/v7/server/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, params) File "/opt/openerp/v7/server/openerp/osv/osv.py", line 188, in execute_kw return self.execute(db, uid, obj, method, *args, *kw or {}) File "/opt/openerp/v7/server/openerp/osv/osv.py", line 131, in wrapper return f(self, dbname, args, *kwargs) File "/opt/openerp/v7/server/openerp/osv/osv.py", line 197, in execute res = self.execute_cr(cr, uid, obj, method, args, *kw) File "/opt/openerp/v7/server/openerp/osv/osv.py", line 185, in execute_cr return getattr(object, method)(cr, uid, args, *kw) File "/opt/openerp/v7/server/openerp/osv/orm.py", line 1583, in default_get defaults[f] = self._defaultsf File "/opt/openerp/v7/server/openerp/addons/stock/stock.py", line 2963, in _default_lot_output_id return lot_output_id UnboundLocalError: local variable 'lot_output_id' referenced before assignment

I have made no module changes, and this is why this error is so surprising to me. Everything else has been working great. Can anyone else confirm this bug?

Thank you in advance for any help.

Sincerely,

Tim

0
Avatar
Kassér
Ray Carnes

When did you install? The build from today is broken - trunk addons is downloaded when you try to download 7.0 addons.

tim diamond
Forfatter

I updated through bzr today. It looks like my server refuses to download the new version of the warehouse software. Its stuck in an old version it looks like... What should I do?

Whats the difference between trunk addons and 7.0 addons?

Ray Carnes

You need to wait until OpenERP fixes it. The bzr revisions it SHOULD be letting you download are shown at http//runbot.openerp.com - trunk is the version AFTER version 7.0 (ie: a alpha/beta release of 7.1 or 8.0 or whatever they call the next version).

tim diamond
Forfatter

Is something like this an urgent issue for the team? My current software is now unusable... Also, is this effecting all modules, or only the warehouse module?

Ray Carnes

Anything is an urgent issue for customers with an OpenERP Warranty (aka OpenERP Enterprise Pricing). If you have such a warranty or contract, contact OpenERP.

Ray Carnes

Try again today, there have been two new builds since the one that didn't work.

Avatar
Dharmesh Patel
Bedste svar

That is because, buggy code is committed for stock module to get default Output Location:

def _default_lot_output_id(self, cr, uid, context=None):
        try:
            lot_input_stock_model, lot_input_stock_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_output')
            self.pool.get('stock.location').check_access_rule(cr, uid, [lot_input_stock_id], 'read', context=context)
        except (ValueError, orm.except_orm):
            # the user does not have read access on the location or it does not exists
            lot_output_id = False
        return lot_output_id

It should be like this:

def _default_lot_output_id(self, cr, uid, context=None):
        try:
            lot_output_stock_model, lot_output_stock_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_output')
            self.pool.get('stock.location').check_access_rule(cr, uid, [lot_output_stock_id], 'read', context=context)
        except (ValueError, orm.except_orm):
            # the user does not have read access on the location or it does not exists
            lot_output_stock_id = False
        return lot_output_stock_id
3
Avatar
Kassér
Stefan Rijnhart

I'm updating this with the bug that Tim filed: https://bugs.launchpad.net/ocb-addons/+bug/1217146. We arrived at the same solution as Dharmesh Patel

Avatar
Simplify it!
Bedste svar

Hello Tim,

That's not a bug, it's just that the system can't find the default location data.

As you can see on Addons>Stock>stock_data.xml

There are two records that are going to be inserted on the db:

<record id="stock_location_output" model="stock.location">
        <field name="name">Output</field>
        <field name="location_id" ref="stock_location_company"/>
        <field name="usage">internal</field>
        <field name="chained_location_type">customer</field>
        <field name="chained_auto_packing">transparent</field>
        <field name="chained_picking_type">out</field>
        <field name="chained_journal_id" ref="journal_delivery"/>
    </record>
    <record id="stock_location_stock" model="stock.location">
        <field name="name">Stock</field>
        <field name="location_id" ref="stock_location_company"/>
    </record>

And the error that is showing up to you it's because this function can't find it.

def _default_lot_input_stock_id(self, cr, uid, context=None):
    lot_input_stock = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock')
    return lot_input_stock.id

def _default_lot_output_id(self, cr, uid, context=None):
    lot_output = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_output')
    return lot_output.id

_defaults = {
    'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.inventory', context=c),
    'lot_input_id': _default_lot_input_stock_id,
    'lot_stock_id': _default_lot_input_stock_id,
    'lot_output_id': _default_lot_output_id,
}

So my advice is: go to Configuration>Installed Modules and look for stock module... Update it and it's going to work. If that doesn't work maybe there is a problem with stock module and you have to download it again.

0
Avatar
Kassér
tim diamond
Forfatter

Thank you for the advice. However, as noted in a comment above by Ray Carnes, this is an issue with openERP. For anyone else looking at the post, the issue is not fixed by the above answer.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
How to setup a multi-company with multi-warehouse setup in v7?
warehouses warehouse multiple
Avatar
Avatar
Avatar
2
mar. 15
7646
POS in Odoo only allows selling products from a single warehouse
warehouses warehouse pos multiple inventories
Avatar
Avatar
1
mar. 24
1724
How to transfer a Sales Order through multiple warehouses
sales warehouses warehouse multiple transfer
Avatar
0
nov. 16
5888
Multiple warehouses configuration
warehouse multiple
Avatar
0
mar. 15
4812
Odoo inventory valuation report
accounting warehouses warehouse
Avatar
0
jan. 25
1590
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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