[IMP] product: Price list report
bzr revid: hmo@tinyerp.com-20100723141946-2ntcii3ujjhohu7c
This commit is contained in:
parent
e9db4d2e59
commit
e70989905f
|
@ -72,7 +72,6 @@
|
|||
'wizard/mrp_change_standard_price_view.xml',
|
||||
# 'wizard/mrp_track_prod_view.xml',
|
||||
'mrp_view.xml',
|
||||
'mrp_wizard.xml',
|
||||
'mrp_report.xml',
|
||||
'company_view.xml',
|
||||
'process/stockable_product_process.xml',
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -18,7 +18,7 @@
|
|||
<button icon='gtk-close' special="cancel"
|
||||
string="Close" />
|
||||
<button name="print_report" string="Print"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
colspan="1" type="object" icon="gtk-print" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -23,7 +23,7 @@ import time
|
|||
from report import report_sxw
|
||||
from osv import osv
|
||||
import pooler
|
||||
|
||||
from tools.translate import _
|
||||
class product_pricelist(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
super(product_pricelist, self).__init__(cr, uid, name, context=context)
|
||||
|
|
|
@ -44,18 +44,14 @@ class product_price_list(osv.osv_memory):
|
|||
}
|
||||
|
||||
def print_report(self, cr, uid, ids, context=None):
|
||||
|
||||
"""
|
||||
To get the date and print the report
|
||||
@param self: The object pointer.
|
||||
@param cr: A database cursor
|
||||
@param uid: ID of the user currently logged in
|
||||
@param context: A standard dictionary
|
||||
@return : return report
|
||||
To get the date and print the report
|
||||
@return : return report
|
||||
"""
|
||||
datas = {'ids': context.get('active_ids', [])}
|
||||
res = self.read(cr, uid, ids, ['price_list','qty1', 'qty2','qty3','qty4','qty5'], context)
|
||||
res = res and res[0] or {}
|
||||
price_dict = self.pool.get('product.pricelist').price_get(cr, uid, [res['price_list']], 1, 1.0)
|
||||
datas['form'] = res
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
|
|
|
@ -5,11 +5,12 @@
|
|||
<!-- Product Price List -->
|
||||
|
||||
<record id="view_product_price_list" model="ir.ui.view">
|
||||
<field name="name">Price List</field>
|
||||
<field name="name">Price per unit</field>
|
||||
<field name="model">product.price_list</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Price list">
|
||||
<form string="Price per Unit">
|
||||
<separator colspan="4" string="Calculate Product Price per unit base on pricelist version."/>
|
||||
<field name="price_list" widget="selection"/>
|
||||
<field name="qty1" colspan="2" />
|
||||
<field name="qty2" colspan="2" />
|
||||
|
@ -19,15 +20,17 @@
|
|||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon="gtk-cancel" special="cancel" string="Close"/>
|
||||
<button name="print_report" string="Print Report" type="object" icon="gtk-print"/>
|
||||
<button name="print_report" string="Print" type="object" icon="gtk-print"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window id="action_product_price_list"
|
||||
key2="client_action_multi" name="Price List"
|
||||
res_model="product.price_list" src_model="product.product"
|
||||
key2="client_print_multi"
|
||||
name="Price Per Unit"
|
||||
res_model="product.price_list"
|
||||
src_model="product.product"
|
||||
view_mode="form" target="new" view_type="form" />
|
||||
|
||||
</data>
|
||||
|
|
Loading…
Reference in New Issue