Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Consulting
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

Python Errors when Creating Warehouse

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
warehouseswarehousemultiplebug
2 Replies
8921 Rodiniai
Portretas
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
Portretas
Atmesti
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
Autorius

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
Autorius

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.

Portretas
Dharmesh Patel
Best Answer

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
Portretas
Atmesti
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

Portretas
Simplify it!
Best Answer

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
Portretas
Atmesti
tim diamond
Autorius

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!

Registracija
Related Posts Replies Rodiniai Veikla
How to setup a multi-company with multi-warehouse setup in v7?
warehouses warehouse multiple
Portretas
Portretas
Portretas
2
kov. 15
7654
POS in Odoo only allows selling products from a single warehouse
warehouses warehouse pos multiple inventories
Portretas
Portretas
1
kov. 24
1729
How to transfer a Sales Order through multiple warehouses
sales warehouses warehouse multiple transfer
Portretas
0
lapkr. 16
5892
Multiple warehouses configuration
warehouse multiple
Portretas
0
kov. 15
4821
Odoo inventory valuation report
accounting warehouses warehouse
Portretas
0
saus. 25
1593
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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