Bỏ qua để đến Nội dung
Odoo Menu
  • Đăng nhập
  • Dùng thử miễn phí
  • Ứng dụng
    Tài chính
    • Kế toán
    • Hóa đơn
    • Chi phí
    • Bảng tính (BI)
    • Tài liệu
    • Ký tên
    Bán hàng
    • CRM
    • Bán hàng
    • POS Cửa hàng
    • POS Nhà hàng
    • Đăng ký
    • Cho thuê
    Trang web
    • Trình tạo trang web
    • Thương mại điện tử
    • Blog
    • Diễn đàn
    • Trò chuyện trực tiếp
    • Học trực tuyến
    Chuỗi cung ứng
    • Tồn kho
    • Sản xuất
    • PLM
    • Mua hàng
    • Bảo dưỡng
    • Chất lượng
    Nhân sự
    • Nhân viên
    • Tuyển dụng
    • Ngày nghỉ
    • Đánh giá
    • Giới thiệu
    • Đội xe
    Marketing
    • Marketing trên MXH
    • Marketing qua email
    • Marketing qua SMS
    • Sự kiện
    • Tự động hóa Marketing
    • Khảo sát
    Dịch vụ
    • Dự án
    • Bảng chấm công
    • Dịch vụ hiện trường
    • Hỗ trợ
    • Kế hoạch
    • Lịch hẹn
    Năng suất
    • Thảo luận
    • Phê duyệt
    • IoT
    • VoIP
    • Kiến thức
    • WhatsApp
    Ứng dụng của bên thứ ba Studio Odoo Nền tảng Đám mây Odoo
  • Ngành
    Bán lẻ
    • Nhà sách
    • Cửa hàng quần áo
    • Cửa hàng nội thất
    • Cửa hàng tạp hóa
    • Cửa hàng đồ kim khí
    • Cửa hàng đồ chơi
    Ẩm thực & Dịch vụ lưu trú
    • Bar và quán rượu
    • Nhà hàng
    • Đồ ăn nhanh
    • Guest house
    • Nhà phân phối đồ uống
    • Khách sạn
    Bất động sản
    • Công ty môi giới bất động sản
    • Công ty kiến trúc
    • Xây dựng
    • Quản lý bất động sản
    • Làm vườn
    • Hiệp hội chủ sở hữu bất động sản
    Tư vấn
    • Công ty kế toán
    • Đối tác Odoo
    • Công ty marketing
    • Công ty luật
    • Tuyển dụng
    • Thanh tra & chứng nhận
    Sản xuất
    • Dệt may
    • Kim loại
    • Nội thất
    • Ẩm thực
    • Nhà máy bia
    • Quà tặng doanh nghiệp
    Sức khoẻ & fitness
    • CLB thể thao
    • Cửa hàng kính mắt
    • Trung tâm fitness
    • Chuyên gia chăm sóc sức khỏe
    • Hiệu thuốc
    • Tiệm làm tóc
    Thương mại
    • Dịch vụ sửa chữa
    • Phần cứng CNTT & Hỗ trợ
    • Hệ thống năng lượng mặt trời
    • Công ty sản xuất giày
    • Dịch vụ vệ sinh
    • Dịch vụ HVAC
    Khác
    • Tổ chức phi lợi nhuận
    • Cơ quan môi trường
    • Cho thuê biển quảng cáo
    • Nhiếp ảnh
    • Cho thuê xe đạp
    • Đại lý phần mềm
    Xem tất cả ngành
  • Cộng đồng
    Học tập
    • Khóa học
    • Tài liệu
    • Chứng chỉ
    • Đào tạo
    • Blog
    • Podcast
    Thúc đẩy đào tạo
    • Chương trình đào tạo
    • Trò chơi kinh doanh Scale Up!
    • Tham quan Odoo
    Nhận phần mềm
    • Tải xuống
    • So sánh các phiên bản
    • Phiên bản
    Hợp tác
    • Github
    • Diễn đàn
    • Sự kiện
    • Dịch thuật
    • Trở thành đối tác
    • Dịch vụ dành cho Đối tác
    • Đăng ký công ty kế toán của bạn
    Nhận dịch vụ
    • Tìm đối tác
    • Tìm kế toán
    • Gặp chuyên gia hỗ trợ
    • Dịch vụ Triển khai
    • Khách hàng tham khảo
    • Hỗ trợ
    • Nâng cấp
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Nhận một buổi demo
  • Bảng giá
  • Trợ giúp

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

  • CRM
  • e-Commerce
  • Kế toán
  • Tồn kho
  • PoS
  • Dự án
  • MRP
All apps
Bạn cần phải đăng ký để tương tác với cộng đồng.
Tất cả bài viết Người Huy hiệu
Thẻ (Xem tất cả)
odoo accounting v14 pos v15
Về diễn đàn này
Bạn cần phải đăng ký để tương tác với cộng đồng.
Tất cả bài viết Người Huy hiệu
Thẻ (Xem tất cả)
odoo accounting v14 pos v15
Về diễn đàn này
Hỗ trợ

Python Errors when Creating Warehouse

Đăng ký nhận tin

Nhận thông báo khi có hoạt động trên bài viết này

Câu hỏi này đã bị gắn cờ
warehouseswarehousemultiplebug
2 Trả lời
8922 Lượt xem
Ảnh đại diện
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
Ảnh đại diện
Huỷ bỏ
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
Tác giả

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
Tác giả

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.

Ảnh đại diện
Dharmesh Patel
Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ
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

Ảnh đại diện
Simplify it!
Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ
tim diamond
Tác giả

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.

Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!

Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!

Đăng ký
Bài viết liên quan Trả lời Lượt xem Hoạt động
How to setup a multi-company with multi-warehouse setup in v7?
warehouses warehouse multiple
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
2
thg 3 15
7657
POS in Odoo only allows selling products from a single warehouse
warehouses warehouse pos multiple inventories
Ảnh đại diện
Ảnh đại diện
1
thg 3 24
1731
How to transfer a Sales Order through multiple warehouses
sales warehouses warehouse multiple transfer
Ảnh đại diện
0
thg 11 16
5893
Multiple warehouses configuration
warehouse multiple
Ảnh đại diện
0
thg 3 15
4824
Odoo inventory valuation report
accounting warehouses warehouse
Ảnh đại diện
0
thg 1 25
1596
Cộng đồng
  • Khóa học
  • Tài liệu
  • Diễn đàn
Open source
  • Tải xuống
  • Github
  • Runbot
  • Dịch thuật
Dịch vụ
  • Lưu trữ Odoo.sh
  • Hỗ trợ
  • Nâng cấp
  • Phát triển tùy chỉnh
  • Đào tạo
  • Tìm kế toán
  • Tìm đối tác
  • Trở thành đối tác
Giới thiệu công ty
  • Công ty của chúng tôi
  • Tài sản thương hiệu
  • Liên hệ
  • Việc làm
  • Sự kiện
  • Podcast
  • Blog
  • Khách hàng
  • Pháp lý • Riêng tư
  • Bảo mật
الْعَرَبيّة 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 là bộ ứng dụng kinh doanh có open source đáp ứng tất cả các nhu cầu của công ty bạn: CRM, thương mại điện tử, kế toán, tồn kho, POS, quản lý dự án, v.v.

Định hướng giá trị riêng biệt của Odoo là tích hợp hoàn toàn và dễ dàng sử dụng.

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