Skip to content

Instantly share code, notes, and snippets.

View sambatlim's full-sized avatar
🧮
CODING

Sambat Lim sambatlim

🧮
CODING
View GitHub Profile
Error message:
None
Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo 12.0\server\odoo\api.py", line 1039, in get
value = self._data[key][field][record._ids[0]]
KeyError: 2
During handling of the above exception, another exception occurred:
@sambatlim
sambatlim / Command to create module of odoo12 for window10.txt
Last active October 10, 2019 02:14
Command to create module of odoo12 for window10
Run your CMD as administration and copy and paste the command below and hit enter.
"C:\Program Files (x86)\Odoo 12.0\python\python.exe" "C:\Program Files (x86)\Odoo 12.0\server\odoo-bin" scaffold manageasset "C:\Users\User\Desktop\custom_addons"
<*==============================================*>
Command explanation:
"C:\Program Files (x86)\Odoo 12.0\python\python.exe" "C:\Program Files (x86)\Odoo 12.0\server\odoo-bin": this command is the respository of your odoo12 instalation -It used to be odoo-bin.
"scaffold": will create the module.
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="student_menu_action" model="ir.actions.act_window">
<field name="name">Students</field>
<field name="res_model">student.student</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="help" type="html">
# -*- coding: utf-8 -*-
{
"name": "assettracking",
"summary": """
Asset tracking includes the functionality of inventory module""",
"description": """
Asset tracking system was used in in-house production for NECTEC project
""",
"author": "NECTEC",
"website": "https://www.nectec.or.th/en/",
@sambatlim
sambatlim / student_view.xml
Created September 17, 2019 02:55
My student_view.xml file
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="student_menu_action" model="ir.actions.act_window">
<field name="name">Students</field>
<field name="res_model">student.student</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
<field name="help" type="html">