Custom to do app not accessible from menu - odoo

I'm new at odoo. Reading "Odoo 12 Development Essential, 4th Edition". However, I've installed Odoo 15 in AWS EC2 Instance.
Followed the books steps to create To-Do app in odoo. But its not showing in menu and I can't use it. What have I don't wrong?
First created "To-Do Item" model and added some extra fields
Created "To-do User" group and added "User Types/Internal User" in
'Inherited' Tab. Also give read/write/delete/create access to "To-do
Item" Model in "Access Rights" Tab.
Then added admin user to "To-do User" group.
Now as per the books, admin should be able to create To-do Items and all from menu.
But this item isn't available in menu. What have I done wrongly?

maybe odoo didn`t update your module, because there were some issues.
I had the same problem before, do next:
Activate developer mode in settings.
Then go to settings → technical → security rules. Find and check your access rights and record rules, maybe odoo didnt update it.
if all is right, then go to technical → interface → menu items.
find your menu record and check, if there is your group.
if all is right, maybe app is not app, check that there is a
'installable': True,
'application': True,
parameters in manifest file.
and also for example menuitems from odoo 15 docs:
<menuitem id="estate_root" name="Нерухомість">
<menuitem id="estate_objects" name="Об'єкти нерухомості">
<menuitem id="menuitem_estate_property" action="estate_property_action"/>
</menuitem>
<menuitem id="estate_settings" name="Налаштування">
<menuitem id="menuitem_estate_property_type_id" action="estate_property_type_action"/>
<menuitem id="menuitem_estate_property_tag_id" action="estate_property_tag_action"/>
</menuitem>
</menuitem>
first item in this example is root item
*P.S. if your dont see your app in apps settings, you need to push button "Update apps list"
*P.S.2 check, if there is your file in manifest data:
'data': [
'security/ir.model.access.csv',
'views/estate_property_views.xml',
],

Related

How to Set App Icon as button On Dashboard in Odoo 14?

I want to set App icon on dashboard.
Then i click on sale App icon then redirect on sale Form.
You must to specify the icon file in your module menu definitios as:
<menuitem name="mymenuname" id="myid" web_icon="mymodulename,static/src/img/app_icon.png"/>
Or you can specify the icon file in the menu definition on Odoo.
Here you can generate icons: https://spilymp.github.io/ibo/

How make my custom module visible in app switcher odoo12 through code

I am new to the odoo and I developed a small custom module in odoo12. The problem is I am not able to see my custom module in the app switcher page after installing the module. (Below I gave the image link, where I am not able to see the module I have created after installing).
This is the link
The first step is you must define a menuitem, if you do not set a "parent" it will be a root menu and will therefore appear in the app drawer.
<menuitem
id="model_menu_root"
name="Module Menu"
web_icon="module_name,static/description/icon.png"
groups="base.group_user"
sequence="6"
/>
You will probably want to have submenus to access your models, they will use this menu as their parent.
<menuitem name="Model Name" id="menu_1_list" parent="model_menu_root"
action="action_window"/>
And the menu refers to the window action, which controls how your model is displayed.
<record model="ir.actions.act_window" id="action_window">
<field name="name">Model Name</field>
<field name="res_model">module_name.model_name</field>
<field name="view_mode">tree,form</field>
</record>
You will need to define some security rules, otherwise the menu will not appear. These are controlled in the ir.model.access.csv file which must be declared in the __manifest__.py file. In previous versions skipping this step would be fine for testing purposes as the admin user would be able to see all models but this seems to have changed in v12 and you will need to define security rules before the menu becomes visible. Security rules are explained in the odoo developer docs https://www.odoo.com/documentation/12.0/reference/security.html
By the way, for a problem like this, usually the first place I would look would be the Odoo source code on GitHub. You can see how they have implemented the root menu and security rules on each of their modules and emulate it for your module.

Odoo11 - Restrict user assignment to project team members

I downloaded the .exe file of the community edition of odoo 11, installed it on a windows server and configured rules, that projects can only be seen by users who are assigned to the project as team members.
That works fine!
Now, in a task I want to restrict the options in the "assigned to" dropdown of a task: In the dropdown I want to see only users, who are actually assigned to that project. At the moment I can see all existing users and can assign the task to any of them.
In the form view I tried to restrict the list as follows by adding the domain attribute:
<field name="user_id" class="o_task_user_field" domain="('user_id','in', [project.members])" />
This gives an error on save.
Field 'project' used in attributes must be present in view but is missing
Update: 2. approach:
I tried to update the field user_id in model project.task and set the domain as follows:
('project_id.members','in', [user.id])
But I got the error (translated from german): you cannot make changes in a basic field!
How can I limit the options in the dropdown (without making code changes as I don´t have the code forked from github)?
Any help appreciated!
Thanks
For this you just need to update one onchange and in that add domain. No need to add it from xml. There is by default onchange_projectmethod is there. In that you just inherit it and add one line..
result.update({'domain':{'user_id':[('project_ids','in',project_id)]}})

How to remove the Powered by Odoo #1 Open Source eCommerce footer from front end of Odoo 9?

I tried the Odoo8 trick it does not work .... There is no Powered by in
addons => web => views => webclient_templates.xml
and there is no Footer Copyright in user interface views.
Where can i find this line and possible remove it..
How to remove it permanently removing it from User Interface => Views => Footer Copyright removes it temporarily.
Active developer mode.(Login as admin select About on the user menu the click Activate Developer mode)
Enable technical features.
Go to Settings > Technical > User Interface > Views.
In the search box, next to "(filter icon) Active", type secondary, and hit enter to search.
Choose web.menu_secondary.Click to open it.
Now find this tag and put it comment like.
<div class="oe_footer">
Powered by
<a href="http://www.openerp.com" target="_blank">
<span>Odoo</span>
</a>
</div>
Hope this will solved your problem.
You can go to Settings -> User Interface -> Views
Select Login Layout
You will see the reference there.
The file is located
addons/web/view/webclient_templates.xml

Openerp change the action of top menu Human Resources

I need to change the action for the default Human resources menu.
when I am clicking on the "human Resources Menu" it is going to Employee menu on left side, but I need to go to leave requests directly. how can I do that?
some one suggested me change sequence number but I did not know how to do that, please help me to do this.
see the following picture to see in detail.
You need to change in two file and replace with below tag given.
addons / hr / hr_view.xml
<menuitem id="menu_hr_main" parent="menu_hr_root" name="Human Resources" sequence="20"/>
addons / hr_holidays / hr_holidays_view.xml
<menuitem name="Leaves" parent="hr.menu_hr_root" id="menu_open_ask_holidays" sequence="0"/>
Hope this will give you as your require output.
if you want to open leave request first, then you have to pur leave request as first positon in Human Resource menu, by default openerp first open the first menu
You need to change the menuitem sequence="1" number and later update the module.Here,
<menuitem id="menu_hr_main" parent="menu_hr_root" name="Human Resources" sequence="3"/>