Skip to Content
Menu
This question has been flagged
7 Replies
3146 Views

Hi everybody,


I would like to know what is wrong with my customized Menu Items.

Through the application, I am able to create some customize Menu Items.

However, I would like to be able to create it inside the Code.


For exemple: I would like to have an Item that show only canceled Quotation:


I put this inside my sale_view.xml. However after a restart I can not see my new item.


----EDIT---

I restarted and updated the module ( with -u ).

-------------

<record id="view_quotation_cancel_tree" model="ir.ui.view">

<field name="name">sale.order.tree</field>

<field name="model">sale.order</field>

<field name="priority">5</field>

<field name="arch" type="xml">

<tree string="Quotation Canceled" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">

<field name="message_unread" invisible="1"/>

<field name="name" string="Quotation Number"/>

<field name="date_order"/>

<field name="partner_id"/>

<field name="user_id"/>

<field name="resume_quantity"/>

<field name="resume_order_line"/>

<field name="artwork"/>

<field name="amount_untaxed" sum="Total Tax Included"/>

<field name="state"/>

</tree>

</field>

</record>

---

     <record id="action_quotations_cancel" model="ir.actions.act_window">

<field name="name">Quotations Cancel</field>

<field name="type">ir.actions.act_window</field>

<field name="res_model">sale.order</field>

<field name="view_type">form</field>

<field name="view_id" ref="view_quotation_cancel_tree"/>

<field name="view_mode">tree,form,calendar,graph</field>

<field name="context">{}</field>

<field name="domain">[('state','in',('cancel'))]</field>

<field name="search_view_id" ref="view_sales_order_filter"/>

<field name="help" type="html">

<p class="oe_view_nocontent_create">

Click to create a quotation, the first step of a new sale.

</p><p>

OpenERP will help you handle efficiently the complete sale flow:

from the quotation to the sales order, the

delivery, the invoicing and the payment collection.

</p><p>

The social feature helps you organize discussions on each sales

order, and allow your customers to keep track of the evolution

of the sales order.

</p>

</field>

</record>

----

<menuitem id="menu_sale_quotations_cancel"

action="action_quotations_cancel" parent="base.menu_sales"

sequence="5"/>


Someone has some idea to help me on this point?


Many thanks,


Selverine

Avatar
Discard

please, post what is your error.

Author

Hi dom, I have no error but I can not see my new Item

Have you try with updating your module?

Author

Yes. I restarted OpenERP and updated my module

Have you add this file in __openerp__.py file ?

Best Answer

<menuitem name=" SALE QUOTATIONS CANCEL "

id="menu_sale_quotations_cancel"

parent="menu_sales"

sequence="5"

action="action_quotations_cancel"

/> 


Avatar
Discard
Best Answer

Hello Selverine,

1. If you created a customized module.

  1. Make sure you have added addons path and updated module list.

  2. Make sure you have added this file into __openerp__.py

  3. Install this module by terminal -d db_name -i module_name

  4. Updating module(if already installed) -d db_name -i module_name

2. If you have modified existing file in base module:

  1. Update module by -d db_name -u module_name

Avatar
Discard
Related Posts Replies Views Activity
0
Jan 17
3091
2
Aug 23
1234
1
Jul 23
1271
1
Jul 23
6436
3
Dec 21
5385