콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

I use the command line to create a custom app

"c:\Program Files (x86)\Odoo 11.0\python\python.exe" "c:\Program Files (x86)\Odoo 11.0\server\odoo-bin" scaffold custom5 "C:\Users\user1\Downloads\1"

In odoo.conf , I had append the directory to addons_path.

addons_path = C:\Program Files (x86)\Odoo 11.0\server\odoo\addons,C:\Users\user1\Downloads\1

When I click custom5/Menu2/Server to list, Odoo display the Odoo Server Error as below:

ValueError: <class 'NameError'>: "name 'self' is not defined" while evaluating
'action = {\n          "type": "ir.actions.act_window",\n          "view_mode": "tree,form",\n          "res_model": self._name,\n        }'

I modified the self._name with "custom5.custom5", and then compile and run successfully.

I click the Menu2/Server to list, there is no any error message. But the name above "Create" and "Import" buttons is showed as "Unnamed". The name should be "custom5 server".

Does someone meet the same problem? How do I solve this problem?

    <!-- server action to the one above -->
  <record model="ir.actions.server" id="custom5.action_server">
  <field name="name">custom5 server</field>
  <field name="model_id" ref="model_custom5_custom5"/>
  <field name="state">code</field>
  <field name="code">
  action = {
  "type": "ir.actions.act_window",
  "view_mode": "tree,form",
  "res_model": "custom5.custom5",
  }
  </field>
  </record>


아바타
취소
관련 게시물 답글 화면 활동
2
3월 18
8546
0
3월 18
3751
3
1월 18
4113
4
4월 20
27175
4
10월 20
8138