콘텐츠로 건너뛰기
Odoo 메뉴
  • 로그인
  • 무료 체험하기
  • 앱
    재무 관리
    • 회계
    • 청구서 관리
    • 비용 관리
    • 스프레드시트 (BI)
    • 문서
    • 전자 서명
    판매
    • CRM
    • 판매
    • POS 스토어
    • POS 레스토랑
    • 구독
    • 렌탈
    웹사이트
    • 웹사이트 빌더
    • 이커머스
    • 블로그
    • 포럼
    • 실시간 채팅
    • 온라인 학습 관리
    공급망
    • 재고 관리
    • 제조 관리
    • 제품 수명주기 관리 (PLM)
    • 매입
    • 유지관리
    • 품질
    인적자원 관리
    • 직원
    • 채용
    • 휴가 관리
    • 인사 평가
    • 인재 추천
    • 차량 관리
    마케팅
    • 소셜 마케팅
    • 이메일 마케팅
    • SMS 마케팅
    • 행사
    • 마케팅 자동화
    • 설문 조사
    서비스
    • 프로젝트
    • 작업 기록
    • 현장 서비스
    • 헬프데스크
    • 일정 관리
    • 일정 예약
    생산성
    • 메일 및 채팅
    • 전자 결재
    • IoT
    • VoIP
    • 지식 센터
    • WhatsApp
    타사 앱 Odoo 스튜디오 Odoo 클라우드 플랫폼
  • 인더스트리
    리테일
    • 서점
    • 의류 매장
    • 가구점
    • 식료품점
    • 철물점
    • 장난감 가게
    식음료 & 숙박업
    • 바 & 펍
    • 레스토랑
    • 패스트푸드
    • 게스트 하우스
    • 음료 유통업체
    • 호텔
    부동산
    • 부동산 중개업체
    • 건축 회사
    • 건설
    • 부동산 관리
    • 가드닝
    • 부동산 소유자 협회
    컨설팅
    • 회계 법인
    • Odoo 파트너
    • 마케팅 대행사
    • 법률 사무소
    • 인재 영입
    • 감사 및 인증
    제조 관리
    • 텍스타일
    • 메탈
    • 가구
    • 푸드
    • 양조장
    • 기업용 선물
    건강 & 피트니스
    • 스포츠 클럽
    • 안경점
    • 피트니스 센터
    • 웰니스 전문가
    • 약국
    • 미용실
    사업
    • 핸디맨
    • IT 하드웨어 및 지원 서비스
    • 태양 에너지 시스템
    • 제화업체
    • 클리닝 서비스
    • HVAC 서비스
    기타
    • 비영리 단체
    • 환경 에이전시
    • 광고판 임대
    • 사진
    • 자전거 임대
    • 소프트웨어 리셀러
    전체 인더스트리 찾아보기
  • 커뮤니티
    학습
    • 튜토리얼
    • 문서
    • 인증
    • 훈련
    • 블로그
    • 팟캐스트
    교육 역량 강화
    • 교육 프로그램
    • Scale-Up! 경영관리 게임
    • Odoo에 방문해보세요
    소프트웨어 신청
    • 다운로드
    • 버전 살펴보기
    • 릴리즈 내역
    협업
    • Github
    • 포럼
    • 행사
    • 번역
    • 파트너 등록
    • 파트너 대상 서비스
    • 회계 법인 정보 등록
    서비스 신청
    • 파트너 검색
    • 회계사 검색
    • 전문 상담 예약
    • 구현 서비스
    • 고객 정보
    • 고객 지원
    • 업그레이드
    Github 유튜브 트위터 링크드인 인스타그램 페이스북 스포티파이
    +1 (650) 691-3277
    데모 예약하기
  • 요금제
  • 고객 지원

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

  • CRM
  • e-Commerce
  • 회계
  • 재고 관리
  • PoS
  • 프로젝트
  • MRP
All apps
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
모든 게시물 사용자 배지
태그 (모두 보기)
odoo accounting v14 pos v15
게시판 정보
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
모든 게시물 사용자 배지
태그 (모두 보기)
odoo accounting v14 pos v15
게시판 정보
도움말

raise ValidationError(_('Invalid view %s definition in %s') % (view_name, view.arch_fs))

구독

이 게시물에 활동이 있으면 알림 받기

신고된 질문입니다
Odoo13.0
1 회신
7843 화면
아바타
Ali elgarhi

Error:
Odoo Server Error

Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 713, in parse
self._tag_root(de)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 675, in _tag_root
f(rec)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 578, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/opt/odoo13/odoo/odoo/models.py", line 4058, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/opt/odoo13/odoo/odoo/models.py", line 3972, in _load_records_create
return self.create(values)
File "<decorator-gen-31>", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 344, in _model_create_multi
return create(self, arg)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 473, in create
return super(View, self).create(vals_list)
File "<decorator-gen-3>", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 344, in _model_create_multi
return create(self, arg)
File "/opt/odoo13/odoo/odoo/models.py", line 3753, in create
fields[0].determine_inverse(batch_recs)
File "/opt/odoo13/odoo/odoo/fields.py", line 1084, in determine_inverse
getattr(records, self.inverse)()
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch
view.write(data)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 490, in write
return super(View, self).write(self._compute_defaults(vals))
File "/opt/odoo13/odoo/odoo/models.py", line 3542, in write
real_recs._validate_fields(set(vals) - set(inverse_fields))
File "/opt/odoo13/odoo/odoo/models.py", line 1159, in _validate_fields
check(self)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 404, in _check_xml
raise ValidationError(_('Invalid view %s definition in %s') % (view_name, view.arch_fs))
odoo.exceptions.ValidationError: ('Invalid view hotel_restaurant_reservation.tree definition in hotel_restaurant/views/hotel_restaurant_view.xml', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/http.py", line 619, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo13/odoo/odoo/http.py", line 309, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo13/odoo/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/opt/odoo13/odoo/odoo/http.py", line 664, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo13/odoo/odoo/http.py", line 345, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/service/model.py", line 93, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/http.py", line 338, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo13/odoo/odoo/http.py", line 909, in __call__
return self.method(*args, **kw)
File "/opt/odoo13/odoo/odoo/http.py", line 510, in response_wrap
response = f(*args, **kw)
File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1323, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1311, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo13/odoo/odoo/api.py", line 395, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo13/odoo/odoo/api.py", line 382, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-58>", line 2, in button_immediate_install
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
return method(self, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_module.py", line 463, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/opt/odoo13/odoo/odoo/modules/registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 420, in load_modules
loaded_modules, update_module, models_to_check)
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 312, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/opt/odoo13/odoo/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 737, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 804, in convert_xml_import
obj.parse(doc.getroot())
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 722, in parse
exc_info[2]
File "/opt/odoo13/odoo/odoo/tools/pycompat.py", line 13, in reraise
raise value.with_traceback(tb)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 713, in parse
self._tag_root(de)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 675, in _tag_root
f(rec)
File "/opt/odoo13/odoo/odoo/tools/convert.py", line 578, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/opt/odoo13/odoo/odoo/models.py", line 4058, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/opt/odoo13/odoo/odoo/models.py", line 3972, in _load_records_create
return self.create(values)
File "<decorator-gen-31>", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 344, in _model_create_multi
return create(self, arg)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 473, in create
return super(View, self).create(vals_list)
File "<decorator-gen-3>", line 2, in create
File "/opt/odoo13/odoo/odoo/api.py", line 344, in _model_create_multi
return create(self, arg)
File "/opt/odoo13/odoo/odoo/models.py", line 3753, in create
fields[0].determine_inverse(batch_recs)
File "/opt/odoo13/odoo/odoo/fields.py", line 1084, in determine_inverse
getattr(records, self.inverse)()
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch
view.write(data)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 490, in write
return super(View, self).write(self._compute_defaults(vals))
File "/opt/odoo13/odoo/odoo/models.py", line 3542, in write
real_recs._validate_fields(set(vals) - set(inverse_fields))
File "/opt/odoo13/odoo/odoo/models.py", line 1159, in _validate_fields
check(self)
File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 404, in _check_xml
raise ValidationError(_('Invalid view %s definition in %s') % (view_name, view.arch_fs))
odoo.tools.convert.ParseError: "Invalid view hotel_restaurant_reservation.tree definition in hotel_restaurant/views/hotel_restaurant_view.xml
None" while parsing /opt/odoo13/odoo-custom-addons/hotel_restaurant/views/hotel_restaurant_view.xml:1, near
<odoo>
<menuitem id="hotel_restaurant_menu" name="Restaurant" parent="hotel.hotel_management_menu" sequence="3"/>

<record id="view_hotelfolio1_form1_inherited" model="ir.ui.view">
<field name="name">hotel.folio1.form1.inherited</field>
<field name="model">hotel.folio</field>
<field name="inherit_id" ref="hotel.view_hotel_folio_form"/>
<field name="arch" type="xml">
<xpath expr="//form/sheet/notebook/page[3]" position="after">
<page name="hotel_restaurant" string="Hotel Restaurant">
<separator string="Restaurant Order Reservation Details" colspan="4"/>
<field name="hotel_reservation_order_ids" colspan="4" nolabel="1" readonly="1">
<tree string="Order" colors="blue:state == 'draft';green:state == 'order'" toolbar="1">
<field name="order_number"/>
<field name="order_date"/>
<field name="waitername"/>
<field name="table_no"/>
<field name="state"/>
<field name="amount_total" sum="Order Total"/>
</tree>
</field>
<separator string="Restaurant Orders Details" colspan="4"/>
<field name="hotel_restaurant_order_ids" colspan="4" nolabel="1" readonly="1">
<tree string="Order" colors="blue:state == 'draft';green:state == 'order';black:state == 'done';" toolbar="1">
<field name="order_no"/>
<field name="o_date"/>
<field name="waiter_name"/>
<field name="table_no"/>
<field name="state"/>
<field name="amount_total" sum="Table Order Total"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>

<!-- ======= Table Master ======= -->
<!-- Form view of hotel restaurant tables -->
<record id="view_hotel_restaurant_tables_form" model="ir.ui.view">
<field name="name">hotel_restaurant_tables.form</field>
<field name="model">hotel.restaurant.tables</field>
<field name="arch" type="xml">
<form string="Tables Detail">
<sheet>
<group>
<field name="name" colspan="1"/>
<newline/>
<field name="capacity"/>
</group>
</sheet>
</form>
</field>
</record>

<!-- Tree view of hotel restaurant tables -->
<record id="view_hotel_restaurant_tables_tree" model="ir.ui.view">
<field name="name">hotel_restaurant_tables.tree</field>
<field name="model">hotel.restaurant.tables</field>
<field name="arch" type="xml">
<tree string="Tables Detail">
<field name="name"/>
<field name="capacity"/>
</tree>
</field>
</record>

<!-- Search view of hotel restaurant tables -->
<record id="view_hotel_restaurant_tables_search" model="ir.ui.view">
<field name="name">hotel_restaurant_tables.search</field>
<field name="model">hotel.restaurant.tables</field>
<field name="arch" type="xml">
<search string="Tables Detail">
<field name="name"/>
<field name="capacity"/>
<newline/>
<group expand="0" string="Group By">
<filter name="capacity" string="Capacity" icon="terp-stock_symbol-selection" context="{'group_by':'capacity'}"/>
</group>
</search>
</field>
</record>

<!-- Action of hotel restaurant tables -->
<record id="open_view_hotel_restaurant_tables_form_tree" model="ir.actions.act_window">
<field name="name">Tables</field>
<field name="res_model">hotel.restaurant.tables</field>

<field name="view_mode">tree,form</field>
</record>

<menuitem name="Tables" id="menu_open_view_hotel_restaurant_tables_form_tree" action="open_view_hotel_restaurant_tables_form_tree" parent="hotel.hotel_configuration_menu"/>

<!-- ======= Table Reservation ======= -->
<!-- Form view of hotel restaurant reservation -->
<record id="view_hotel_restaurant_reservation_form" model="ir.ui.view">
<field name="name">hotel_restaurant_reservation.form</field>
<field name="model">hotel.restaurant.reservation</field>
<field name="arch" type="xml">
<form string="Table Reservation">
<header>
<button string="Confirm" name="table_reserved" states="draft" type="object" icon="fa-check" class="oe_highlight"/>
<button string="Done" name="table_done" states="confirm" type="object" icon="fa-check-square-o" class="oe_highlight"/>
<button string="Cancel" name="table_cancel" states="confirm" type="object" icon="fa-close" class="oe_highlight"/>
<button string="Set to Draft" name="action_set_to_draft" states="cancel" type="object" icon="fa-files-o" class="oe_highlight"/>
<button string="Create Order" name="create_order" type="object" states="done" icon="fa-file-text-o" class="oe_highlight"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,done"/>
</header>
<sheet>
<h1>
<label for="table_booking" string="Table Booking" colspan="4"/>
<field name="reservation_id" colspan="4"/>
</h1>
<group>
<group colspan="2" col="4">
<field name="is_folio"/>
<newline/>
<field name="folio_id" attrs="{'invisible':[('is_folio','=',False)], 'required':[('is_folio','=',True)]}"/>
<field name="room_no" attrs="{'invisible':[('is_folio','=',False)] ,'required':[('is_folio','=',True)]}"/>
</group>
<newline/>
<group colspan="4" col="4">
<field name="cname"/>
<field name="partner_address_id"/>
<field name="start_date"/>
<field name="end_date"/>
</group>
<group colspan="4">
<separator colspan="4" string="Table List"/>
<field name="tableno" colspan="4" nolabel="1"/>
</group>
</group>
</sheet>
</form>
</field>
</record>

<!-- Tree view of hotel restaurant reservation -->
<record id="view_hotel_restaurant_reservation_tree" model="ir.ui.view">
<field name="name">hotel_restaurant_reservation.tree</field>
<field name="model">hotel.restaurant.reservation</field>
<field name="arch" type="xml">
<tree string="Table Reservation" colors="blue:state == 'draft';red:state == 'cancel';grey:state == 'done';black:state == 'order';green:state == 'confirm'" toolbar="1">
<field name="reservation_id"/>
<field name="folio_id"/>
<field name="room_no"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="cname"/>
<field name="partner_address_id"/>
<field name="tableno"/>
<field name="state"/>
</tree>
</field>
</record>

<!-- Search view of hotel restaurant reservation -->
<record id="view_hotel_restaurant_reservation_search" model="ir.ui.view">
<field name="name">hotel.restaurant.reservation.search</field>
<field name="model">hotel.restaurant.reservation</field>
<field name="arch" type="xml">
<search string="Restaurant Reservation">
<filter domain="[('state','in',('confirm','done','order')),('start_date','<=',datetime.datetime.now()),('end_date','>',datetime.datetime.now())]" string="Current Booking" name="current_booking"/>
<separator/>
<filter name="today" domain="[('start_date','>=',datetime.datetime.now().replace(hour=0, minute=0, second=0)),('end_date','<=',datetime.datetime.now().replace(hour=23, minute=59, second=59))]" string="Today's Booking"/>
<separator/>
<group string="States">
<filter icon="terp-check" domain="[('state','=','draft')]" string="Draft" name="draft"/>
<filter domain="[('state','=','confirm')]" string="Confirm" name="confirm"/>
<filter domain="[('state','=','cancel')]" string="Cancel" name="cancel"/>
<filter domain="[('state','=','done')]" string="Done" name="done"/>
</group>
<field name="room_no"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="cname"/>
<newline/>
<group expand="0" string="Group By">
<filter name="room_no" string="Room Number" icon="terp-personal" domain="[]" context="{'group_by':'room_no'}"/>
<filter name="cname" string="Customer Name" domain="[]" context="{'group_by':'cname'}"/>
</group>
</search>
</field>
</record>

<!-- Action of hotel restaurant reservation -->
<record id="open_view_hotel_restaurant_reservation_form_tree" model="ir.actions.act_window">
<field name="name">Table Booking</field>
<field name="res_model">hotel.restaurant.reservation</field>

<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_hotel_restaurant_reservation_tree"/>
</record>

<menuitem name="Table Booking" id="menu_open_view_hotel_restaurant_reservation_form_tree" action="open_view_hotel_restaurant_reservation_form_tree" parent="hotel_restaurant_menu"/>

<!-- ======= Orders for Reservation ======= -->
<!-- Form view of hotel reservation order -->
<record id="view_hotel_reservation_order_form" model="ir.ui.view">
<field name="name">hotel_reservation_order.form</field>
<field name="model">hotel.reservation.order</field>
<field name="arch" type="xml">
<form string="Order">
<header>
<button string="Generate KOT" name="reservation_generate_kot" type="object" states="draft" icon="fa-arrow-right" class="oe_highlight"/>
<button string="Generate KOT" name="reservation_update_kot" type="object" states="order" icon="fa-arrow-right" class="oe_highlight"/>
<button string="Done" name="done_kot" type="object" states="order" icon="fa-check" class="oe_highlight"/>
<button name="%(report_hotel_reservation_order_bill)d" attrs="{'invisible' : ['|', ('folio_id','!=',False), ('state','in',('draft','order'))]}" type="action" string="Generate Bill" class="oe_highlight"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<h1>
<label for="order" string="Order" colspan="4"/>
<field name="order_number" colspan="4"/>
</h1>
<group>
<group colspan="4" col="4">
<field name="is_folio"/>
<newline/>
<field name="reservationno"/>
<field name="folio_id" attrs="{'invisible': [('is_folio','=',False)]}"/>
</group>
<group colspan="4" col="4">
<field name="order_date"/>
<field name="waitername"/>
<field name="kitchen_id" invisible="1"/>
<field name="rest_id" widget="many2many_tags" invisible="1"/>
</group>
<newline/>
<separator colspan="4" string="Table List"/>
<field name="table_no" colspan="4" nolabel="1"/>
<newline/>
<separator colspan="4" string="Order List"/>
<field name="order_list" colspan="4" nolabel="1">
<form string="Order List">
<group>
<field name="name"/>
<field name="item_qty"/>
<field name="item_rate"/>
<field name="price_subtotal" invisible="1"/>
</group>
</form>
<tree string="Order List">
<field name="name"/>
<field name="item_qty"/>
<field name="item_rate"/>
<field name="price_subtotal"/>
</tree>
</field>
<newline/>
<group colspan="2" class="oe_subtotal_footer oe_right">
<field name="amount_subtotal" widget="monetary"/>
<field name="tax" widget="monetary"/>
<div class="oe_subtotal_footer_separator oe_inline">
<label for="amount_total"/>
</div>
<field name="amount_total" nolabel="1" widget="monetary"/>
</group>
</group>
</sheet>
</form>
</field>
</record>

<!-- Tree view of hotel reservation order -->
<record id="view_hotel_reservation_order_tree" model="ir.ui.view">
<field name="name">hotel_reservation_order.tree</field>
<field name="model">hotel.reservation.order</field>
<field name="arch" type="xml">
<tree string="Order" colors="blue:state == 'draft';green:state == 'order';grey:state == 'done';" toolbar="1">
<field name="order_number"/>
<field name="reservationno"/>
<field name="order_date"/>
<field name="waitername"/>
<field name="table_no"/>
<field name="state"/>
<field name="amount_total" sum="Order Total"/>
</tree>
</field>
</record>

<!-- Search view of hotel reservation order -->
<record id="view_hotel_reservation_order_search" model="ir.ui.view">
<field name="name">hotel.reservation.order.search</field>
<field name="model">hotel.reservation.order</field>
<field name="arch" type="xml">
<search string="Reservation Order">
<filter name="today" domain="[('order_date','>=',datetime.datetime.now().replace(hour=0, minute=0, second=0)),('order_date','<=',datetime.datetime.now().replace(hour=23, minute=59, second=59))]" string="Today's Orders"/>
<field name="reservationno"/>
<group expand="0" string="Group By">
<filter name="waitername" string="Waiter Name" icon="terp-personal" domain="[]" context="{'group_by':'waitername'}"/>
<filter name="order_date" string="Date" domain="[]" context="{'group_by':'order_date'}"/>
</group>
</search>
</field>
</record>

<!-- Action of hotel reservation order -->
<record id="open_view_hotel_reservation_order_form_tree" model="ir.actions.act_window">
<field name="name">Order</field>
<field name="res_model">hotel.reservation.order</field>

<field name="view_mode">tree,form</field>
</record>

<menuitem id="menu_open_view_hotel_reservation_order_form_tree" name="Orders" action="open_view_hotel_reservation_order_form_tree" parent="hotel_restaurant_menu"/>

<!-- ======= Table Order ======= -->
<!-- Form view of hotel restaurant order -->
<record id="view_hotel_restaurant_order_form" model="ir.ui.view">
<field name="name">hotel_restaurant_order.form</field>
<field name="model">hotel.restaurant.order</field>
<field name="arch" type="xml">
<form string="Order">
<header>
<button string="Generate KOT" name="generate_kot" type="object" states="draft" icon="fa-arrow-right" class="oe_highlight"/>
<button string="Generate KOT" name="generate_kot_update" type="object" states="order" icon="fa-arrow-right" class="oe_highlight"/>
<button string="Done" name="done_order_kot" type="object" states="order" icon="fa-check" class="oe_highlight"/>
<button string="Cancel" name="done_cancel" states="draft,order" type="object" icon="fa-close" class="oe_highlight"/>
<button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="fa-file-o" class="oe_highlight"/>
<button name="%(report_hotel_res_order_bill)d" attrs="{'invisible' : ['|', ('folio_id','!=',False), ('state','in',('draft','order','cancel'))]}" type="action" string="Generate Bill" class="oe_highlight"/>
<field name="state" widget="statusbar" statusbar_visible="draft,done,cancel"/>
</header>
<sheet>
<h1>
<label for="table_order" string="Table Order" colspan="4"/>
<field name="order_no" colspan="4"/>
</h1>
<group>
<group colspan="2" col="2">
<field name="o_date"/>
<field name="is_folio"/>
</group>
<group colspan="2" col="4">
<field name="folio_id" attrs="{'invisible':[('is_folio','=',False)], 'required':[('is_folio','=',True)]}"/>
<field name="room_no" attrs="{'invisible':[('is_folio','=',False)], 'required':[('is_folio','=',True)]}"/>
</group>
<group colspan="2" col="4">
<field name="cname"/>
<field name="waiter_name"/>
<field name="kitchen_id" invisible="1"/>
<field name="rest_item_id" widget="many2many_tags" invisible="1"/>
</group>
<newline/>
<separator colspan="4" string="Table List"/>
<field name="table_no" colspan="4" nolabel="1"/>
<newline/>
<separator colspan="4" string="Order List"/>
<field name="order_list" colspan="4" nolabel="1">
<form string="Order List">
<group>
<field name="name"/>
<field name="item_qty"/>
<field name="item_rate"/>
<field name="price_subtotal" invisible="1"/>
</group>
</form>
<tree string="Order List">
<field name="name"/>
<field name="item_qty"/>
<field name="item_rate"/>
<field name="price_subtotal"/>
</tree>
</field>
<newline/>
<group colspan="2" class="oe_subtotal_footer oe_right">
<field name="amount_subtotal" widget="monetary"/>
<field name="tax" widget="monetary"/>
<div class="oe_subtotal_footer_separator oe_inline">
<label for="amount_total"/>
</div>
<field name="amount_total" nolabel="1" widget="monetary"/>
</group>
</group>
</sheet>
</form>
</field>
</record>

<!-- Tree view of hotel restaurant order -->
<record id="view_hotel_restaurant_order_tree" model="ir.ui.view">
<field name="name">hotel_restaurant_order.tree</field>
<field name="model">hotel.restaurant.order</field>
<field name="arch" type="xml">
<tree string="Order" colors="blue:state == 'draft';green:state == 'order';grey:state == 'done';" toolbar="1">
<field name="order_no"/>
<field name="o_date"/>
<field name="table_no"/>
<field name="room_no"/>
<field name="waiter_name"/>
<field name="state"/>
<field name="amount_total" sum="Table Order Total"/>
</tree>
</field>
</record>

<!-- Search view of hotel restaurant order -->
<record id="view_hotel_restaurant_order_search" model="ir.ui.view">
<field name="name">hotel.restaurant.order.search</field>
<field name="model">hotel.restaurant.order</field>
<field name="arch" type="xml">
<search string="Restaurant Order">
<filter name="today" domain="[('o_date','>=',datetime.datetime.now().replace(hour=0, minute=0, second=0)),('o_date','<=',datetime.datetime.now().replace(hour=23, minute=59, second=59))]" string="Today's Orders"/>
<field name="order_no"/>
<group expand="0" string="Group By">
<filter name="waiter_name" string="waiter name" icon="terp-personal" domain="[]" context="{'group_by':'waiter_name'}"/>
<filter name="o_date" string="date" domain="[]" context="{'group_by':'o_date'}"/>
</group>
</search>
</field>
</record>

<!-- Action of hotel restaurant order -->
<record id="open_view_hotel_restaurant_order_form_tree" model="ir.actions.act_window">
<field name="name">Table Order</field>
<field name="res_model">hotel.restaurant.order</field>

<field name="view_mode">tree,form</field>
</record>

<menuitem id="menu_open_view_hotel_restaurant_order_form_tree" name="Table Order" action="open_view_hotel_restaurant_order_form_tree" sequence="11" parent="hotel_restaurant_menu"/>


<!-- ======= Kitchen Order List ======= -->
<!-- Form view of hotel restaurant kitchen order tickets -->
<record id="view_hotel_restaurant_kitchen_order_tickets_form" model="ir.ui.view">
<field name="name">hotel_restaurant_kitchen_order_tickets.form</field>
<field name="model">hotel.restaurant.kitchen.order.tickets</field>
<field name="arch" type="xml">
<form string="KOT List" create="0" edit="0">
<sheet>
<group>
<group colspan="4">
<field name="orderno"/>
<field name="resno"/>
</group>
<group>
<field name="kot_date"/>
</group>
<group colspan="4" col="4">
<field name="room_no"/>
<field name="w_name"/>
</group>
<newline/>
<separator colspan="4" string="Table List"/>
<field name="tableno" colspan="4" nolabel="1"/>
<newline/>
<separator colspan="4" string="Order List"/>
<field name="kot_list" colspan="4" nolabel="1">
<form string="Order List">
<group>
<field name="name"/>
<field name="item_qty"/>
<field name="item_rate"/>
</group>
</form>
<tree string="Order List">
<field name="name"/>
<field name="item_qty"/>
</tree>
</field>
</group>
</sheet>
</form>
</field>
</record>

<!-- Tree view of hotel restaurant kitchen order tickets -->
<record id="view_hotel_restaurant_kitchen_order_tickets_tree" model="ir.ui.view">
<field name="name">hotel_restaurant_kitchen_order_tickets.tree</field>
<field name="model">hotel.restaurant.kitchen.order.tickets</field>
<field name="arch" type="xml">
<tree string="KOT List" create="0">
<field name="orderno"/>
<field name="resno"/>
<field name="kot_date"/>
<field name="room_no"/>
<field name="w_name"/>
<field name="tableno"/>
<field name="kot_list"/>
</tree>
</field>
</record>

<!-- Search view of hotel restaurant kitchen order tickets -->
<record id="view_hotel_restaurant_kitchen_order_search" model="ir.ui.view">
<field name="name">hotel.restaurant.kitchen.order.tickets.search
</field>
<field name="model">hotel.restaurant.kitchen.order.tickets</field>
<field name="arch" type="xml">
<search string="Restaurant kitchen Order">
<filter name="today" domain="[('kot_date','>=',datetime.datetime.now().replace(hour=0, minute=0, second=0)),('kot_date','<=',datetime.datetime.now().replace(hour=23, minute=59, second=59))]" string="Today's Orders"/>
<field name="orderno"/>
<group expand="0" string="Group By">
<filter name="w_name" string="Waiter Name" icon="terp-personal" domain="[]" context="{'group_by':'w_name'}"/>
<filter name="kot_date" string="Date" domain="[]" context="{'group_by':'kot_date'}"/>
</group>
</search>
</field>
</record>

<!-- Action of hotel restaurant kitchen order tickets -->
<record id="open_view_hotel_restaurant_kitchen_order_tickets_form_tree" model="ir.actions.act_window">
<field name="name">Kitchen Order Tickets</field>
<field name="res_model">hotel.restaurant.kitchen.order.tickets</field>

<field name="view_mode">tree,form</field>
</record>

<menuitem name="Kitchen Order Ticket" id="menu_open_view_hotel_restaurant_kitchen_order_tickets_form_tree" action="open_view_hotel_restaurant_kitchen_order_tickets_form_tree" sequence="12" parent="hotel_restaurant_menu"/>

<!-- ======= Food Item Category ======= -->
<!-- Form view of hotel menu card type -->
<record id="view_hotel_menucard_type_form" model="ir.ui.view">
<field name="name">hotel_menucard_type_form</field>
<field name="model">hotel.menucard.type</field>
<field name="arch" type="xml">
<form string="Hotel Food Items Type">
<sheet>
<group>
<field name="name" string="Food Item Name"/>
<field name="menu_id" string="Food Item Type"/>
<field name="child_ids" invisible="1"/>
</group>
</sheet>
</form>
</field>
</record>

<!-- Tree view of hotel menu card type -->
<record id="view_hotel_menucard_type_list" model="ir.ui.view">
<field name="name">hotel_menucard_type_list</field>
<field name="model">hotel.menucard.type</field>
<field name="arch" type="xml">
<tree string="Hotel Food Items Type">
<field name="name"/>
</tree>
</field>
</record>

<!-- Action of hotel menu card type -->
<record id="action_hotel_menucard_type_view_form" model="ir.actions.act_window">
<field name="name">Food Item Type</field>
<field name="res_model">hotel.menucard.type</field>

<field name="view_mode">tree,form</field>
</record>

<menuitem id="menu_hotel_food_item" name="Food Item" parent="hotel.hotel_configuration_menu" sequence="2"/>
<menuitem id="menu_action_hotel_menucard_type_view_form" name="Food Item Types" action="action_hotel_menucard_type_view_form" parent="menu_hotel_food_item" sequence="12"/>

<!-- Form view of hotel menu card -->
<record model="ir.ui.view" id="view_hotel_menucard_form">
<field name="name">hotel.menucard.form</field>
<field name="model">hotel.menucard</field>
<field name="arch" type="xml">
<form string="Hotel Menucard">
<sheet>
<field name="image" widget="image" class="oe_avatar oe_left"/>
<div class="oe_title">
<div class="oe_edit_only">
<label for="name" string="Food Item Name"/>
</div>
<h1>
<field name="name"/>
</h1>
</div>
<notebook>
<page name="information" string="Information">
<group colspan="4" col="2">
<group colspan="4" col="4">
<field name="type" select="2" string="Food Type"/>
<field name="categ_id" string="Food Item Type"/>
<field name="product_manager" select="2" string="Food Manager"/>
<field name="uom_id"/>
<field name="uom_po_id"/>
</group>
</group>
<newline/>
<separator string="Supplier Taxes" colspan="4"/>
<field name="supplier_taxes_id" colspan="4" help="List of supplier taxes applied on the perticular Food Item. "/>
<newline/>
<separator string="Customer Taxes" colspan="4"/>
<field name="taxes_id" colspan="4" help="List of customer taxes applied on the perticular Food Item."/>
</page>
<page name="procurement" string="Procurement">
<group colspan="4" col="4">
<field name="cost_method"/>
<field name="active" select="2"/>
<field name="list_price"/>
<field name="sale_ok" select="2"/>
<field name="standard_price"/>
<field name="rental" select="2"/>
<field name="price_extra"/>
<separator string="Suppliers" colspan="4"/>
<field name="seller_ids" colspan="4" nolabel="1" widget="one2many_list"/>
</group>
</page>
<page name="description" string="Descriptions">
<separator string="Description"/>
<field name="description" colspan="4" nolabel="1"/>
<separator string="Sale Description"/>
<field name="description_sale" colspan="4" nolabel="1"/>
<separator string="Purchase Description"/>
<field name="description_purchase" colspan="4" nolabel="1"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

<!-- Tree view of hotel menu card -->
<record id="view_hotel_menucard_tree" model="ir.ui.view">
<field name="name">hotel.menucard.tree</field>
<field name="model">hotel.menucard</field>
<field name="arch" type="xml">
<tree string="Hotel Menucard">
<field name="name"/>
<field name="categ_id" string="Food Item Type"/>
<field name="list_price" string="Food Item Rate"/>
</tree>
</field>
</record>

<!-- Search view of hotel menu card -->
<record id="view_hotel_menucard_search_new" model="ir.ui.view">
<field name="name">hotel.menucard.search</field>
<field name="model">hotel.menucard</field>
<field name="arch" type="xml">
<search string="Hotel Menucard">
<field name="name"/>
<field name="categ_id" string="Food Item Type"/>
<field name="list_price"/>
<separator/>
<group expand="0" string="Group By">
<filter name="category" string="Categoty" domain="[]" context="{'group_by':'categ_id'}"/>
</group>
</search>
</field>
</record>

<!-- Kanban view of hotel menu card -->
<record id="hotel_manucard_kanban_view" model="ir.ui.view">
<field name="name">Menucard Kanban</field>
<field name="model">hotel.menucard</field>
<field name="arch" type="xml">
<kanban>
<field name="id"/>
<field name="image_small"/>
<field name="lst_price"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<div class="o_kanban_image">
<img alt="" t-att-src="kanban_image('hotel.menucard', 'image_small', record.id.raw_value)"/>
</div>
<div class="oe_kanban_details">
<h4>
<a type="open">
<t t-if="record.code.raw_value">
[
<field name="code"/>
]
</t>
<field name="name"/>
</a>
</h4>
<div name="tags"/>
<ul>
<li>
Price:
<field name="lst_price"/>
</li>
<li>
Category:
<field name="categ_id"/>
</li>
</ul>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>

<!-- Action of hotel menu card -->
<record id="action_hotel_menucard_form" model="ir.actions.act_window">
<field name="name">Food Item</field>
<field name="res_model">hotel.menucard</field>

<field name="view_mode">kanban,tree,form</field>
<field name="context">{'default_available_in_pos':0}
</field>
<field name="search_view_id" ref="view_hotel_menucard_search_new"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to Add Food Items
</p>
<p>
No Food Items
</p>
</field>
</record>

<menuitem name="Food Items" id="menu_open_hotel_menucard_form" action="action_hotel_menucard_form" parent="menu_hotel_food_item"/>

</odoo>

0
아바타
취소
아바타
Niyas Raphy (Walnut Software Solutions)
베스트 답변

Hi,

Update the tree view like this,

<record id="view_hotel_restaurant_reservation_tree" model="ir.ui.view" >
<field name="name">hotel_restaurant_reservation.tree</field>
<field name="model">hotel.restaurant.reservation</field>
<field name="arch" type="xml">
<tree string="Table Reservation">
<field name="reservation_id"/>
<field name="folio_id"/>
<field name="room_no"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="cname"/>
<field name="partner_address_id"/>
<field name="tableno"/>
<field name="state"/>
</tree>
</field>
</record>

Remove colors="blue:state == 'draft';green:state == 'order';grey:state == 'done';" toolbar="1" . 

Rather than posting the entire code please try to post the necessary lines, in the error message itself, it is specified issue is in tree view, so you better post the code of tree view only. Also while posting the code, try to keep indendations.

Thanks

3
아바타
취소
토론이 재미있으신가요? 직접 참여해보세요!

지금 바로 가입하여 독점 서비스를 이용해보고 특별한 커뮤니티와 소통하세요!

가입
관련 게시물 답글 화면 활동
Odoo 13. Don't close a wizard when Click a button 해결 완료
Odoo13.0
아바타
아바타
아바타
아바타
4
5월 24
14389
Permission error while user printing excel sheet report in odoo 13 해결 완료
Odoo13.0
아바타
아바타
1
4월 24
4530
One2many field edited from Transient Model cannot be made empty.
Odoo13.0
아바타
0
11월 23
3202
Blank White Page After log in to Odoo13 해결 완료
Odoo13.0
아바타
1
9월 23
3303
How can I translate Options in Selection.field? 해결 완료
Odoo13.0
아바타
아바타
2
8월 23
6152
커뮤니티
  • 튜토리얼
  • 문서
  • 포럼
오픈 소스
  • 다운로드
  • Github
  • Runbot
  • 번역
서비스
  • Odoo.sh 호스팅
  • 고객 지원
  • 업그레이드
  • 맞춤 개발
  • 학습
  • 회계사 검색
  • 파트너 검색
  • 파트너 등록
회사 소개
  • 회사 소개
  • 브랜드 자산
  • 상담 문의
  • 인재 채용
  • 행사
  • 팟캐스트
  • 블로그
  • 고객 사례
  • 법적고지 • 개인정보
  • 보안
الْعَرَبيّة 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는 CRM, 이커머스, 회계, 재고, POS, 프로젝트 관리 등 기업의 모든 요구 사항을 충족하도록 설계된 오픈 소스 기반의 통합 비즈니스 앱 제품군입니다.

Odoo의 간편한 UI와 완벽하게 통합된 기능을 직접 확인해 보세요.

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