[REF] replace sale price precision by price unit precision

bzr revid: benoit.guillot@akretion.com.br-20120710123400-w634cm3p75v8gcxm
This commit is contained in:
Benoit Guillot 2012-07-10 14:34:00 +02:00
parent 05cb32962c
commit 0c82624467
6 changed files with 12 additions and 12 deletions

View File

@ -72,7 +72,7 @@ class report_account_analytic_line_to_invoice(osv.osv):
'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
'product_uom_id':fields.many2one('product.uom', 'Unit of Measure', readonly=True),
'unit_amount': fields.float('Units', readonly=True),
'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Sale Price')),
'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Price Unit')),
'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Account')),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),

View File

@ -120,7 +120,7 @@ Normal - the campaign runs normally and automatically sends all emails and repor
'Status',),
'activity_ids': fields.one2many('marketing.campaign.activity',
'campaign_id', 'Activities'),
'fixed_cost': fields.float('Fixed Cost', help="Fixed cost for running this campaign. You may also specify variable cost and revenue on each campaign activity. Cost and Revenue statistics are included in Campaign Reporting.", digits_compute=dp.get_precision('Purchase Price')),
'fixed_cost': fields.float('Fixed Cost', help="Fixed cost for running this campaign. You may also specify variable cost and revenue on each campaign activity. Cost and Revenue statistics are included in Campaign Reporting.", digits_compute=dp.get_precision('Price Unit')),
}
_defaults = {
@ -435,8 +435,8 @@ class marketing_campaign_activity(osv.osv):
'from_ids': fields.one2many('marketing.campaign.transition',
'activity_to_id',
'Previous Activities'),
'variable_cost': fields.float('Variable Cost', help="Set a variable cost if you consider that every campaign item that has reached this point has entailed a certain cost. You can get cost statistics in the Reporting section", digits_compute=dp.get_precision('Purchase Price')),
'revenue': fields.float('Revenue', help="Set an expected revenue if you consider that every campaign item that has reached this point has generated a certain revenue. You can get revenue statistics in the Reporting section", digits_compute=dp.get_precision('Sale Price')),
'variable_cost': fields.float('Variable Cost', help="Set a variable cost if you consider that every campaign item that has reached this point has entailed a certain cost. You can get cost statistics in the Reporting section", digits_compute=dp.get_precision('Price Unit')),
'revenue': fields.float('Revenue', help="Set an expected revenue if you consider that every campaign item that has reached this point has generated a certain revenue. You can get revenue statistics in the Reporting section", digits_compute=dp.get_precision('Account')),
'signal': fields.char('Signal', size=128,
help='An activity with a signal can be called programmatically. Be careful, the workitem is always created when a signal is sent'),
'keep_if_condition_not_met': fields.boolean("Don't Delete Workitems",

View File

@ -63,8 +63,8 @@ class campaign_analysis(osv.osv):
'country_id': fields.related('partner_id', 'country_id',
type='many2one', relation='res.country',string='Country'),
'total_cost' : fields.function(_total_cost, string='Cost',
type="float", digits_compute=dp.get_precision('Purchase Price')),
'revenue': fields.float('Revenue', readonly=True, digits_compute=dp.get_precision('Sale Price')),
type="float", digits_compute=dp.get_precision('Account')),
'revenue': fields.float('Revenue', readonly=True, digits_compute=dp.get_precision('Account')),
'count' : fields.integer('# of Actions', readonly=True),
'state': fields.selection([('todo', 'To Do'),
('exception', 'Exception'), ('done', 'Done'),

View File

@ -146,7 +146,7 @@ class membership_line(osv.osv):
'date_to': fields.date('To', readonly=True),
'date_cancel': fields.date('Cancel date'),
'date': fields.date('Join Date', help="Date on which member has joined the membership"),
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Sale Price'), required=True, help='Amount for the membership'),
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Price Unit'), required=True, help='Amount for the membership'),
'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True),
'account_invoice_id': fields.related('account_invoice_line', 'invoice_id', type='many2one', relation='account.invoice', string='Invoice', readonly=True),
'state': fields.function(_state,
@ -447,7 +447,7 @@ Partner()
class product_template(osv.osv):
_inherit = 'product.template'
_columns = {
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Sale Price')),
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Price Unit')),
}
product_template()

View File

@ -29,7 +29,7 @@ class membership_invoice(osv.osv_memory):
_description = "Membership Invoice"
_columns = {
'product_id': fields.many2one('product.product','Membership', required=True),
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Sale Price'), required=True),
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Price Unit'), required=True),
}
def onchange_product(self, cr, uid, ids, product_id=False):
"""This function returns value of product's member price based on product id.

View File

@ -640,8 +640,8 @@ class mrp_repair_line(osv.osv, ProductChangeMixin):
'to_invoice': fields.boolean('To Invoice'),
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok','=',True)], required=True),
'invoiced': fields.boolean('Invoiced',readonly=True),
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price')),
'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Sale Price')),
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price Unit')),
'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),
'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),
'product_uom_qty': fields.float('Quantity (Unit of Measure)', digits=(16,2), required=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
@ -735,7 +735,7 @@ class mrp_repair_fee(osv.osv, ProductChangeMixin):
'product_uom_qty': fields.float('Quantity', digits=(16,2), required=True),
'price_unit': fields.float('Unit Price', required=True),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Sale Price')),
'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),
'tax_id': fields.many2many('account.tax', 'repair_fee_line_tax', 'repair_fee_line_id', 'tax_id', 'Taxes'),
'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
'to_invoice': fields.boolean('To Invoice'),