跳至内容
菜单
此问题已终结
4 回复
23149 查看

Hello,

does anybody tell me how can i create a customise dash board .I am not familiar with it.  Basically my problem is that i want to create a sub menu under the Manufacturing and its should perform some view like graph,list,line..etc.I search lot to find how it can be done, but i couldn't get it. How could we make sub menu in dash board like (in sales -> Sales analysis ) .Give me a proper direction to find the solution for that.Please give any clues ,how to create or something.. please


thanking you,

Logicious

形象
丢弃
编写者

@Pawan: Thanks Pawan , can i ask you something , when we are installing the sale , its automatically comes over there. How its possible?

Do you want to create Dashboards and get packed in a module? I mean define the dashboard like a view using xml when you are develop or customizing a module?

编写者

developing a module with dash board... thats it

最佳答案

if you want to customize any dash board or create a new dashboard of existing module , just inhertis the view of that module you just only needed the xml file itself. i will given you an example... of what i did intomrp


<openerp>

<data>

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

<field name="name">mrp.production.workcenter.line.graph</field>

<field name="model">mrp.production.workcenter.line</field>

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

<graph string="Manufacturing Analysis" type="pivot" stacked="True">

<field name="name"/>

<field name="production_id"/>

</graph>

</field>

</record>

<record id="filter_by_state_workcenter_id" model="ir.filters">

<field name="name"> By Work Center </field>

<field name="model_id">mrp.production.workcenter.line</field>

<field name="user_id" eval="False"/>

<field name="context">{'group_by':['workcenter_id']}</field>

</record>

<record id="filter_by_state_work_order" model="ir.filters">

<field name="name"> By WorkOrder State </field>

<field name="model_id">mrp.production.workcenter.line</field>

<field name="user_id" eval="False"/>

<field name="context">{'group_by':['state']}</field>

</record>

<record id="filter_by_scheduled_date_work_order" model="ir.filters">

<field name="name"> By Scheduled Date </field>

<field name="model_id">mrp.production.workcenter.line</field>

<field name="user_id" eval="False"/>

<field name="context">{'group_by':['date_planned']}</field>

</record>

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

<field name="name">Work Order Analysis</field>

<field name="res_model">mrp.production.workcenter.line</field>

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

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

<!-- <field name="search_view_id" ref="view_order_product_search"/>-->

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

<!-- <field name="context">{'search_default_Sales':1, 'group_by_no_leaf':1,'group_by':[]}</field>-->

<field name="help">This report performs analysis on your quotations and sales orders. Analysis check your sales revenues and sort it by different group criteria (salesman, partner, product, etc.) Use this report to perform analysis on sales not having invoiced yet. If you want to analyse your turnover, you should use the Invoice Analysis report in the Accounting application.</field>

</record>

<menuitem action="action_work_order_report_all" id="work_order_analysis" parent="manufacture_parent_report_menu" sequence="4"/>

</data>

</openerp>

形象
丢弃
最佳答案

If I understood your request, the idea is to use the board.board model

Here is an example I created that installs a dashboard automatically with my module

        <record id="board_purchase_form_pm" model="ir.ui.view">
<field name="name">board.purchase.form</field>
<field name="model">board.board</field>
<field name="arch" type="xml">
<form string="Purchase Dashboard" version="7.0">
<board style="1-1">
<column>
<action name="%(purchase_pm_po_need_approval)d" string="PM : Purchases Orders need approval"/>
</column>
<column>
<action name="%(purchase_pm_po_need_receive)d" string="PM : Purchases Orders need Receive"/>
</column>
</board>
</form>
</field>
</record>

Here is one of the actions:

        <record id="purchase_pm_po_need_approval" model="ir.actions.act_window">
<field name="name">Purchase Orders</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">purchase.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','in',['depheadapr'])]</field>
<field name="context">{'quotation_only': True}</field>
</record>

I hope this would help




形象
丢弃
最佳答案

Logicious, You can navigate to Reporting -> Configuration -> My DashBoards and create a new dashboard(Menu), by selecting "Sales" as a parent menu you can create a new menu under it..

形象
丢弃
编写者 最佳答案

@tarek : thanks buddy, finally you got the idea what needed. i will try it.

形象
丢弃
编写者

@tarek: i got one error like this buddy-ParseError: "External ID not found in the system: room_availability.action_room_booking" while parsing /opt/odoo/odoo/addons/room_availability/room_view.xml:94, near

You have to define a action named action_room_booking in you xml like what was suggested above by @Tarek for action purchase_pm_po_need_approval.

编写者

@pawan:- thank you pawan.

编写者

@prasanth: yes this is what i exactly needed. thank you

相关帖文 回复 查看 活动
0
9月 15
4127
0
8月 24
2125
2
8月 24
2732
1
8月 21
3604
0
3月 21
2683