File tree Expand file tree Collapse file tree 4 files changed +25
-27
lines changed
account_reporting_product_template Expand file tree Collapse file tree 4 files changed +25
-27
lines changed Original file line number Diff line number Diff line change 33
44{
55 "name" : "Product template in the invoices analysis view" ,
6- "version" : "16 .0.1.0.0" ,
6+ "version" : "18 .0.1.0.0" ,
77 "category" : "Account" ,
88 "license" : "AGPL-3" ,
99 "author" : "AvanzOSC" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
33
44from odoo import api , fields , models
5+ from odoo .tools import SQL
56
67
78class AccountInvoiceReport (models .Model ):
@@ -14,14 +15,10 @@ class AccountInvoiceReport(models.Model):
1415
1516 @api .model
1617 def _select (self ):
17- select_str = super ()._select ()
18- select_str += """
19- , template.id as product_tmpl_id
18+ return SQL (
2019 """
21- return select_str
22-
23- @api .model
24- def _group_by (self ):
25- group_by_str = super ()._group_by ()
26- group_by_str += ", template.id"
27- return group_by_str
20+ %s,
21+ product.product_tmpl_id AS product_tmpl_id
22+ """ ,
23+ super ()._select (),
24+ )
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<odoo >
3- <record id =" account_invoice_report_view_search" model =" ir.ui.view" >
4- <field name =" inherit_id" ref =" account.view_account_invoice_report_search" />
5- <field name =" model" >account.invoice.report</field >
6- <field name =" arch" type =" xml" >
7- <field name =" product_id" position =" before" >
8- <field name =" product_tmpl_id" />
9- </field >
10- <filter name =" category_product" position =" after" >
11- <filter
3+ <record id =" account_invoice_report_view_search" model =" ir.ui.view" >
4+ <field name =" inherit_id" ref =" account.view_account_invoice_report_search" />
5+ <field name =" model" >account.invoice.report</field >
6+ <field name =" arch" type =" xml" >
7+ <field name =" product_id" position =" before" >
8+ <field name =" product_tmpl_id" />
9+ </field >
10+ <filter name =" category_product" position =" after" >
11+ <filter
1212 string =" Product Template"
1313 name =" product_template"
1414 context =" {'group_by':'product_tmpl_id'}"
1515 />
16- <filter string =" Product" name =" product" context =" {'group_by':'product_id'}" />
17- </filter >
18- </field >
19- </record >
16+ <filter
17+ string =" Product"
18+ name =" product"
19+ context =" {'group_by':'product_id'}"
20+ />
21+ </filter >
22+ </field >
23+ </record >
2024</odoo >
You can’t perform that action at this time.
0 commit comments