Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
11032 Lượt xem

I'm new in ODOO and i  write a new sample module and install it on ODOO but it doesn't show on menu can any one help me to solve the problem?

i use ODOO version 12


here is my code:


model.py:

from odoo import models, fields, api

class CustomerModel(models.Model):
_name = 'customer'

name = fields.Char(string="Name")
lastname = fields.Char(string="Last Name")
age = fields.Integer(string="Age")


customer.xml:

<?xml version="1.0" encoding="UTF-8" ?>

<odoo>

<record model="ir.actions.act_window" id="customers_list_action">
<field name="name">Customers</field>
<field name="res_model">customer</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_smiling_face">Create the first Customer
</p>
</field>
</record>


<menuitem id="main_customer_menu" name="Cutomers"/>

<menuitem id="customer_menu" name="Cutomers"
parent="main_customer_menu"/>

<menuitem id="customers_sub_menu" name="Cutomers" parent="customer_menu"
action="customers_list_action"/>


</odoo>




Ảnh đại diện
Huỷ bỏ

I haven't seen tree, form view

Câu trả lời hay nhất

Hi,

Give access rights for the model such a way that user can see it. Apart from v11 there is changes in odoo12. Once you write the rule you can see it

Thanks

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

How can i add rule?

Ảnh đại diện
Huỷ bỏ

The most significant area in Odoo/OpenERP is how to deal or manage users. Managing users and assigning groups or role is the key point in every business. In Odoo/OpenERP assigning role or group to the single user is made through Administrator. And its not a good practice to do so using login through admin and do some setting stuff like assigning groups to employee or users.

Reference: https://goo.gl/4jAhtH

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 7 25
2120
3
thg 5 25
3695
4
thg 5 24
7266
2
thg 6 25
4176
1
thg 7 23
2371