Openerp 6.1 put product category in sale order line -


I want to show the product category in the sales category. order. I wrote. This button shows the category button under the group by clicking on the button, I get the following error and I do not know how to solve the bug: specified by group and group_def._classic_allon, "group by group" Should be in the field with regular database-based areas (no functions or related fields), or store = True "AsserttionError: Field field in 'Grouped' regular database -Cyome field (a function or associated field) or store with field should be function = true

This is my code: OSV import field From, OSV & lt; Code & gt; Class sales_order_line_category (osv.osv): _name = 'sale.order.line' _inherit = 'sale.order.line' _columns = {'categ_id': fields.related ('product_id', 'categ_id', type = 'many2one' , My relationship:

  ` 

version =" 1.0 "encoding =" UTF-8 "? & Gt;

  & lt; record id = "view_sale_orderline category" model = "ir.ui.view" & gt; & lt; field name = "Name" & gt; sale.order.line.categoryinherit & lt; / field & gt; & lt; field name = "model" & gt; sales.order.line & lt; / field & gt; & lt; Field name = "type" & gt; tree & lt; / field & gt; field name = "inherit_id" ref = "sale.view_order_line_tree" / & Field Name = "Arch" type = "xml" & gt; Field Name = "Name" Status = "After" & gt; Field Name = "categ_id" string = "Category" /> & Lt; / region & gt; & lt; / region & gt; & lt; / record & gt; & lt; record id = "view_sale_orderlinecategory2" model = "ir.ui.view" & gt; Lt; Field Name = "Name" & gt; Sales.redline.content center2 & lt; / Field & gt; & Lt; Field name = "model" & gt; Sale.order.line & lt; / Field & gt; & Lt; Area name = "type" & gt; Search & lt; / Field & gt; & Lt; Field name = "beercid" riff = "sale.view_sales_order_uninvoiced_line_filter" /> & Lt; Field name = "arch" type = "xml" & gt; & Lt; Group expansion = "0" string = "by group ..." & gt; & Lt; Filter string = "product category" icon = "terp-stock_symbol-select" name = "category" reference = "{'group_by': 'categ_id'}" /> & Lt; / Groups & gt; & Lt; / Region & gt; & Lt; / Record & gt; & Lt; Record id = "view_sale_orderlinecategory3" model = "ir.ui.view"> & Lt; Field name = "name" & gt; Sale.order.line.categoryinherit3 & lt; / Field & gt; & Lt; Area name = "model" & gt; Sales Order, line & lt; / Field & gt; & Lt; Area name = "type" & gt; Search & lt; / Field & gt; & Lt; Field name = "beercid" riff = "sale.view_sales_order_uninvoiced_line_filter" /> & Lt; Field name = "arch" type = "xml" & gt; & Lt; Field name = "name" status = "before" & gt; & Lt; Field name = "categ_id" string = "range" /> & Lt; / Region & gt; & Lt; / Region & gt; & Lt; / Record & gt; & Lt; / Data & gt;   

`

Do you try to change the following code Are you

  'categ_id': fields.related ('product_id', 'categ_id', type = 'many2one', relation = 'product.category', store = true),   

Check that your field should appear in the tree view of categ_id sale.order.line where you try to group by categ_id

Hope this help

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -