Pragmatic Techsoft Pvt Ltd. (http://www.pragtech.co.in) has put forward a list of technical changes which need to be taken care while migrating modules from OpenERP 5 to OpenERP 6. This list is no way comprehensive and comments and feedback are welcome.
Wizard
OpenERP V51. Both normal and memory wizards are used.
2. Normal Wizard created by single .py file, which is created in wizard folder of our module.
3. To call normal wizard we need following code in .xml file which is outside the wizard folder.
<wizardid="wizard_student"
model="student.student"
name="student.student.wizard"
string="Student Detail"/>
4. To call memory wizard we need following code in .xml file which is outside the wizard folder. If we call wizard on button.
<button name="%(act_student_memory_wizard)d" string="Memory Wizard" type="action"/>OpenERP V6
1. Only memory wizards are used.
2. Wizard in V6 is similar to memory wizard in V5.
3. To call wizard we need following code in .xml file which is outside the wizard folder. If we call wizard on button.
<button name="%(student.act_student_memory_wizard)d" string="Memory Wizard" type="action"/>4. if we call the wizard through Action menu then we need following code to call given wizard
<act_window name="Student Detail"res_model="student.detail.bymarks"
src_model="student.student"
key2="client_action_multi"
multi="True"
view_mode="form"
view_type="form"
target="new"
id="action_student_onmarks"/>
Search views
OpenERP V5:1. The only facility of search is there in list view(treeview).
OpenERP V6:
1. Improves over built-in search features in v5
2. Always associated with other view: list, calendar, ...
New view type: <search>












No need of select=”1” or select=”2”,just need select=”True”
<record id="view_sales_order_filter" model="ir.ui.view"><field name="name">sale.order.list.select</field>
<field name="model">sale.order</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Sales Order">
<filter icon="terp-document-new" string="Quotations" domain="[('state','=','draft')]" help="Sales Order that haven't yet been confirmed"/>
<filter icon="terp-check" string="Sales" domain="[('state','in',('manual','progress'))]"/>
<separator orientation="vertical"/>
<filter icon="terp-dolar_ok!" string="To Invoice" domain="[('state','=','manual')]" help="Sales Order ready to be invoiced"/>
<separator orientation="vertical"/>
<field name="name" select="1"/>
<field name="date_order" select="1" string="Order date" />
<field name="partner_id" select="1"/>
<field name="user_id" select="1">
<filter domain="[('user_id','=',uid)]" help="My Sale Orders" icon="terp-personal"/>
</field>
<newline/>
<group expand="0" string="Group By..." colspan="11" col="11" groups="base.group_extended">
<filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
</group>
</search>
</field>
</record> <record id="action_order_form" model="ir.actions.act_window">
<field name="name">Sales Orders</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_mode">tree,form,calendar,graph</field>
<field name="search_view_id" ref="view_sales_order_filter"/>
<field name="help">Sales Orders helps you manage quotations and orders done with your customers. OpenERP suggests that you to start by creating a quotation. Once the order is confirmed, the quotation is converted into a Sale Order. OpenERP can handle several types of products so that a sales order can trigger tasks, delivery orders, manufacturing orders, purchases and so on. Based on the configuration of the sale order, a draft invoice will be generated so that you just have to confirm it when you want to bill your customer.</field>
</record>
<menuitem action="action_order_form" id="menu_sale_order" parent="base.menu_sales" sequence="3" groups="base.group_sale_salesman,base.group_sale_manager"/>
<fields> with embedded <filters>















<field name="search_view_id" ref="view_sales_order_filter"/>context attribute of elements can toggle aggregation of associated list views
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>Multiple group-by levels are supported












Tree Views
Openerp V5:
1. Normal Tree view is there.
2. We can edit data in columns in tree view, but no buttons are theire to process on selected row.
Openerp V6:
1. List views can now display buttons











Diagram views
OpenERP V5:1. No diagram view is theire.
2. But we can see similar to it in customized workflow
OpenERP V6:
New <diagram> view type
Constructed with
















Objects must form a coherent graph
<node> model must have a many2one to its container
<record id="view_marketing_campaign_diagram" model="ir.ui.view"><field name="name">marketing.campaign.diagram</field>
<field name="model">marketing.campaign</field>
<field name="type">diagram</field>
<field name="arch" type="xml">
<diagram string="Campaign Editor">
<node object="marketing.campaign.activity" shape="rectangle:type=='subcampaign'" bgcolor="gray:start==True">
<field name="name"/>
<field name="type"/>
<field name="start" invisible="1"/>
<field name="condition" widget="char"/>
</node>
<arrow object="marketing.campaign.transition" source="activity_from_id" destination="activity_to_id" label="['name']">
<field name="activity_from_id"/>
<field name="activity_to_id"/>
<field name="interval_nbr"/>
<field name="interval_type"/>
</arrow>
</diagram>
</field>
</record>
Testing framework: YAML
OpenERP V5:1. No such Testing framework(.YAML) file used in it.
OpenERP V6:
1. New YAML data serialization supported in v6
2. Data-oriented syntax “YAML Ain't a Markup Language”
3. Whitespace delimiters, Python-like









4. When added to the test section of the module descriptor, tests are rolled back by default











In order to test Account Journal Select wizard I open journal entries using this wizard -!record {model: account.journal.select, id: account_journal_select_0}:
{} -
I clicked on Open Journal Button to open the entries -
!python {model: account.journal.select}: |
self.action_open_window(cr, uid, [ref("account_journal_select_0")], {"lang":
'en_US', "active_model": "account.journal.period", "active_ids": [ref("account.a_recv")],
"tz": False, "active_id": ref("account.a_recv"), }) -
I check that the entries open successfully
Other Improvements
OpenERP V5:
1.Simpler __terp__ structure: data, demo
2. Security:








3. class for res.partner.function object is present.
OpenERP V6:
1. Simpler __openerp__ structure: data, demo, test
2. API:




3. Security:













4. Reporting engine more modular (e.g report_webkit)
5. Performance improvements in RML reports


6. Actions have new properties:


7. Simpler XML declaration for wizards actions

8. base_report_designer includes OOo plugin
9. 'View logs' shows XML ID now

10. class for res.partner.function object is not not V6 replace by char field.
Action Help
Openerp V5:1. There is no facility of help regarding action
Openerp V6:
1. you can specify help of action by following way
<record id="action_tax_code_tree" model="ir.actions.act_window"><field name="name">Chart of Taxes</field>
<field name="res_model">account.tax.code</field>
<field name="domain">[('parent_id','=',False)]</field>
<field name="view_type">tree</field>
<field name="view_id" ref="view_tax_code_tree"/>
<field name="help">The chart of taxes is used to generate your periodic tax statement. You will see here the taxes with codes related to your legal statement according to your country.</field>
</record>
No comments:
Post a Comment