Merge lp:~openerp-dev/openobject-addons/trunk-decimal-rounding-fix into lp:openobject-addons

Proposed by Yogesh Parekh(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-decimal-rounding-fix
Merge into: lp:openobject-addons
Diff against target: 2715 lines (+445/-463)
90 files modified
account/account.py (+20/-20)
account/account_analytic_line.py (+1/-1)
account/account_bank_statement.py (+3/-3)
account/account_cash_statement.py (+4/-4)
account/account_invoice.py (+26/-26)
account/account_move_line.py (+5/-5)
account/data/account_data.xml (+0/-5)
account/report/account_entries_report.py (+1/-1)
account/report/account_general_ledger.rml (+31/-31)
account/report/account_general_ledger_landscape.rml (+31/-31)
account/report/account_invoice_report.py (+3/-3)
account/report/account_print_invoice.rml (+7/-7)
account/report/account_treasury_report.py (+2/-2)
account/res_config.py (+2/-2)
account/test/price_accuracy00.yml (+2/-2)
account/wizard/account_reconcile.py (+3/-3)
account/wizard/pos_box.py (+1/-1)
account_analytic_analysis/account_analytic_analysis.py (+12/-12)
account_asset/account_asset.py (+6/-6)
account_bank_statement_extensions/account_bank_statement.py (+1/-1)
account_budget/account_budget.py (+3/-3)
account_budget/report/budget_report.rml (+14/-14)
account_budget/report/crossovered_budget_report.rml (+14/-14)
account_followup/account_followup.py (+1/-1)
account_followup/wizard/account_followup_print.py (+3/-1)
account_payment/account_payment.py (+4/-2)
account_voucher/account_voucher.py (+8/-8)
analytic/analytic.py (+4/-4)
analytic_contract_hr_expense/analytic_contract_hr_expense.py (+1/-1)
analytic_user_function/analytic_user_function.py (+1/-1)
decimal_precision/__openerp__.py (+1/-0)
decimal_precision/decimal_precision_data.xml (+12/-0)
delivery/delivery.py (+2/-2)
delivery/stock.py (+8/-8)
hr_contract/hr_contract.py (+2/-1)
hr_expense/hr_expense.py (+4/-4)
hr_expense/report/hr_expense_report.py (+2/-2)
hr_payroll/hr_payroll.py (+8/-8)
hr_payroll/hr_payroll_data.xml (+0/-13)
hr_recruitment/report/hr_recruitment_report.py (+4/-4)
hr_timesheet_invoice/report/report_analytic.py (+2/-2)
hr_timesheet_sheet/report/hr_timesheet_report.py (+1/-1)
l10n_be_hr_payroll/l10n_be_hr_payroll.py (+10/-10)
l10n_br/account.py (+1/-1)
l10n_fr_hr_payroll/l10n_fr_hr_payroll.py (+2/-2)
l10n_in_hr_payroll/l10n_in_hr_payroll.py (+6/-6)
lunch/lunch.py (+1/-1)
marketing_campaign/marketing_campaign.py (+3/-3)
marketing_campaign/report/campaign_analysis.py (+2/-2)
membership/membership.py (+1/-1)
membership/report/report_membership.py (+2/-2)
membership/wizard/membership_invoice.py (+1/-1)
mrp/mrp.py (+6/-6)
mrp/report/price.py (+1/-1)
mrp/wizard/change_production_qty.py (+1/-1)
mrp/wizard/mrp_product_produce.py (+1/-1)
mrp_byproduct/mrp_byproduct.py (+1/-1)
mrp_operations/report/mrp_workorder_analysis.py (+1/-1)
mrp_repair/mrp_repair.py (+17/-17)
mrp_repair/report/order.rml (+1/-1)
point_of_sale/point_of_sale.py (+10/-10)
point_of_sale/report/account_statement.rml (+4/-4)
point_of_sale/report/pos_details.rml (+1/-1)
portal/acquirer.py (+1/-1)
procurement/procurement.py (+4/-4)
product/pricelist.py (+5/-5)
product/product.py (+19/-23)
product/product_data.xml (+12/-20)
product/report/product_pricelist.py (+1/-1)
purchase/purchase.py (+6/-6)
purchase/report/order.rml (+5/-5)
purchase_requisition/purchase_requisition.py (+1/-1)
report_intrastat/report/invoice.rml (+2/-2)
report_intrastat/report_intrastat.py (+1/-1)
sale/report/sale_order.rml (+10/-10)
sale/sale.py (+10/-10)
sale/wizard/sale_make_invoice_advance.py (+1/-1)
stock/product.py (+4/-4)
stock/report/lot_overview.rml (+4/-4)
stock/report/lot_overview_all.rml (+4/-4)
stock/report/report_stock_move.py (+5/-5)
stock/res_config.py (+2/-2)
stock/stock.py (+7/-7)
stock/stock_data.xml (+0/-6)
stock/wizard/stock_change_product_qty.py (+1/-1)
stock/wizard/stock_change_standard_price.py (+1/-1)
stock/wizard/stock_move.py (+3/-3)
stock/wizard/stock_partial_picking.py (+1/-1)
stock/wizard/stock_return_picking.py (+1/-1)
stock/wizard/stock_splitinto.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-decimal-rounding-fix
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+187727@code.launchpad.net

Description of the change

Hello,

    Rename some Decimal Precision and Remove unused Decimal Precision .
    now have this decimal precision list:
                  Price
                  Quantity
                  Weight
                  Percentage
                  Amount

 -> Rename Precision
        Product Price ==> Price
        Product Unit of Measure ==> Quantity
        Product UOS ==> Quantity
        Stock Weight ==> Weight
        Account => for accounting, credit debit amount in journal items

 -> Remove Precision
       Account ==> Amount
       Discount ==> Price
       Payment Term ==> Price
       Payroll ==> Price
       Payroll Rate ==> Percentage.

    Add the new Decimal Precision in required field in the modules.

Thanks,
Yogesh Parekh.

To post a comment you must log in.
8873. By Atul Patel(OpenERP)

[MERGE]: Merged with addons

Unmerged revisions

8873. By Atul Patel(OpenERP)

[MERGE]: Merged with addons

8872. By Atul Patel(OpenERP)

[MERGE]: Merged with trunk

8871. By Atul Patel(OpenERP)

[MERGE]: Merged with addons

8870. By Atul Patel(OpenERP)

[ADD]: Add decimal precision in pos amount_total field

8869. By Pariket Trivedi(OpenERP)

[IMP] : Decimal precision Remove Shipping Delay.

8868. By Yogesh Parekh(OpenERP)

[IMP] Create a new Data File in decimal_precision module

8867. By Yogesh Parekh(OpenERP)

[IMP] Improvement in Decimal Precision

8866. By Yogesh Parekh(OpenERP)

[IMP] Change the Decimal Precision in lunch module

8865. By Yogesh Parekh(OpenERP)

[IMP] Change the Decimal Precision in rml report and account module

8864. By Yogesh Parekh(OpenERP)

[IMP] Change the Decimal Precision in rml report

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account.py'
2--- account/account.py 2013-10-09 18:03:37 +0000
3+++ account/account.py 2013-10-29 13:27:40 +0000
4@@ -76,7 +76,7 @@
5 amount = value
6 result = []
7 obj_precision = self.pool.get('decimal.precision')
8- prec = obj_precision.precision_get(cr, uid, 'Account')
9+ prec = obj_precision.precision_get(cr, uid, 'Amount')
10 for line in pt.line_ids:
11 if line.value == 'fixed':
12 amt = round(line.value_amount, prec)
13@@ -109,7 +109,7 @@
14 ('fixed', 'Fixed Amount')], 'Computation',
15 required=True, help="""Select here the kind of valuation related to this payment term line. Note that you should have your last line with the type 'Balance' to ensure that the whole amount will be treated."""),
16
17- 'value_amount': fields.float('Amount To Pay', digits_compute=dp.get_precision('Payment Term'), help="For percent enter a ratio between 0-1."),
18+ 'value_amount': fields.float('Amount To Pay', digits_compute=dp.get_precision('Price'), help="For percent enter a ratio between 0-1."),
19 'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \
20 "If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."),
21 'days2': fields.integer('Day of the Month', required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."),
22@@ -467,14 +467,14 @@
23 'child_parent_ids': fields.one2many('account.account','parent_id','Children'),
24 'child_consol_ids': fields.many2many('account.account', 'account_account_consol_rel', 'child_id', 'parent_id', 'Consolidated Children'),
25 'child_id': fields.function(_get_child_ids, type='many2many', relation="account.account", string="Child Accounts"),
26- 'balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Balance', multi='balance'),
27- 'credit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Account'), string='Credit', multi='balance'),
28- 'debit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Account'), string='Debit', multi='balance'),
29- 'foreign_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Foreign Balance', multi='balance',
30+ 'balance': fields.function(__compute, digits_compute=dp.get_precision('Amount'), string='Balance', multi='balance'),
31+ 'credit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Amount'), string='Credit', multi='balance'),
32+ 'debit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Amount'), string='Debit', multi='balance'),
33+ 'foreign_balance': fields.function(__compute, digits_compute=dp.get_precision('Amount'), string='Foreign Balance', multi='balance',
34 help="Total amount (in Secondary currency) for transactions held in secondary currency for this account."),
35- 'adjusted_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Adjusted Balance', multi='balance',
36+ 'adjusted_balance': fields.function(__compute, digits_compute=dp.get_precision('Amount'), string='Adjusted Balance', multi='balance',
37 help="Total amount (in Company currency) for transactions held in secondary currency for this account."),
38- 'unrealized_gain_loss': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Unrealized Gain or Loss', multi='balance',
39+ 'unrealized_gain_loss': fields.function(__compute, digits_compute=dp.get_precision('Amount'), string='Unrealized Gain or Loss', multi='balance',
40 help="Value of Loss or Gain due to changes in exchange rate when doing multi-currency transactions."),
41 'reconcile': fields.boolean('Allow Reconciliation', help="Check this box if this account allows reconciliation of journal items."),
42 'exchange_rate': fields.related('currency_id', 'rate', type='float', string='Exchange Rate', digits=(12,6)),
43@@ -1280,11 +1280,11 @@
44 _name: (lambda self, cr,uid,ids,c: ids, ['line_id'], 10),
45 'account.move.line': (_get_move_from_lines, ['partner_id'],10)
46 }),
47- 'amount': fields.function(_amount_compute, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount),
48+ 'amount': fields.function(_amount_compute, string='Amount', digits_compute=dp.get_precision('Amount'), type='float', fnct_search=_search_amount),
49 'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True),
50 'narration':fields.text('Internal Note'),
51 'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
52- 'balance': fields.float('balance', digits_compute=dp.get_precision('Account'), help="This is a field only used for internal purpose and shouldn't be displayed"),
53+ 'balance': fields.float('balance', digits_compute=dp.get_precision('Amount'), help="This is a field only used for internal purpose and shouldn't be displayed"),
54 }
55
56 _defaults = {
57@@ -1778,7 +1778,7 @@
58 for rec in record.child_ids:
59 amount += _rec_get(rec) * rec.sign
60 return amount
61- res2[record.id] = round(_rec_get(record), obj_precision.precision_get(cr, uid, 'Account'))
62+ res2[record.id] = round(_rec_get(record), obj_precision.precision_get(cr, uid, 'Amount'))
63 return res2
64
65 def _sum_year(self, cr, uid, ids, name, args, context=None):
66@@ -1883,7 +1883,7 @@
67
68 def get_precision_tax():
69 def change_digit_tax(cr):
70- res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
71+ res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Amount')
72 return (16, res+3)
73 return change_digit_tax
74
75@@ -2129,15 +2129,15 @@
76 """
77
78 # By default, for each tax, tax amount will first be computed
79- # and rounded at the 'Account' decimal precision for each
80+ # and rounded at the 'Amount' decimal precision for each
81 # PO/SO/invoice line and then these rounded amounts will be
82 # summed, leading to the total amount for that tax. But, if the
83 # company has tax_calculation_rounding_method = round_globally,
84 # we still follow the same method, but we use a much larger
85 # precision when we round the tax amount for each line (we use
86- # the 'Account' decimal precision + 5), and that way it's like
87+ # the 'Amount' decimal precision + 5), and that way it's like
88 # rounding after the sum of the tax amounts of each line
89- precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
90+ precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
91 tax_compute_precision = precision
92 if taxes and taxes[0].company_id.tax_calculation_rounding_method == 'round_globally':
93 tax_compute_precision += 5
94@@ -2180,7 +2180,7 @@
95 one tax for each tax id in IDS and their children
96 """
97 if not precision:
98- precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
99+ precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
100 res = self._unit_compute(cr, uid, taxes, price_unit, product, partner, quantity)
101 total = 0.0
102 for r in res:
103@@ -2276,7 +2276,7 @@
104 one tax for each tax id in IDS and their children
105 """
106 if not precision:
107- precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
108+ precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
109 res = self._unit_compute_inv(cr, uid, taxes, price_unit, product, partner=None)
110 total = 0.0
111 for r in res:
112@@ -2405,9 +2405,9 @@
113 _columns = {
114 'name': fields.char('Name', size=64, required=True),
115 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the resources from lower sequences to higher ones."),
116- 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Account'), help="The optional quantity on entries."),
117- 'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),
118- 'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),
119+ 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), help="The optional quantity on entries."),
120+ 'debit': fields.float('Debit', digits_compute=dp.get_precision('Amount')),
121+ 'credit': fields.float('Credit', digits_compute=dp.get_precision('Amount')),
122 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade"),
123 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', ondelete="cascade"),
124 'model_id': fields.many2one('account.model', 'Model', required=True, ondelete="cascade", select=True),
125
126=== modified file 'account/account_analytic_line.py'
127--- account/account_analytic_line.py 2013-04-15 10:23:49 +0000
128+++ account/account_analytic_line.py 2013-10-29 13:27:40 +0000
129@@ -119,7 +119,7 @@
130 # to return a default price for those units
131 ctx['uom'] = unit
132 amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id]
133- prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
134+ prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
135 amount = amount_unit * quantity or 0.0
136 result = round(amount, prec)
137 if not flag:
138
139=== modified file 'account/account_bank_statement.py'
140--- account/account_bank_statement.py 2013-06-14 09:19:24 +0000
141+++ account/account_bank_statement.py 2013-10-29 13:27:40 +0000
142@@ -103,9 +103,9 @@
143 readonly=True, states={'draft':[('readonly',False)]}),
144 'period_id': fields.many2one('account.period', 'Period', required=True,
145 states={'confirm':[('readonly', True)]}),
146- 'balance_start': fields.float('Starting Balance', digits_compute=dp.get_precision('Account'),
147+ 'balance_start': fields.float('Starting Balance', digits_compute=dp.get_precision('Amount'),
148 states={'confirm':[('readonly',True)]}),
149- 'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Account'),
150+ 'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Amount'),
151 states={'confirm': [('readonly', True)]}),
152 'balance_end': fields.function(_end_balance,
153 store = {
154@@ -548,7 +548,7 @@
155 _columns = {
156 'name': fields.char('OBI', required=True, help="Originator to Beneficiary Information"),
157 'date': fields.date('Date', required=True),
158- 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
159+ 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
160 'type': fields.selection([
161 ('supplier','Supplier'),
162 ('customer','Customer'),
163
164=== modified file 'account/account_cash_statement.py'
165--- account/account_cash_statement.py 2013-06-14 09:19:24 +0000
166+++ account/account_cash_statement.py 2013-10-29 13:27:40 +0000
167@@ -58,11 +58,11 @@
168 return {'value' : {'subtotal_closing' : (pieces * number) or 0.0 }}
169
170 _columns = {
171- 'pieces': fields.float('Unit of Currency', digits_compute=dp.get_precision('Account')),
172+ 'pieces': fields.float('Unit of Currency', digits_compute=dp.get_precision('Amount')),
173 'number_opening' : fields.integer('Number of Units', help='Opening Unit Numbers'),
174 'number_closing' : fields.integer('Number of Units', help='Closing Unit Numbers'),
175- 'subtotal_opening': fields.function(_sub_total, string='Opening Subtotal', type='float', digits_compute=dp.get_precision('Account'), multi='subtotal'),
176- 'subtotal_closing': fields.function(_sub_total, string='Closing Subtotal', type='float', digits_compute=dp.get_precision('Account'), multi='subtotal'),
177+ 'subtotal_opening': fields.function(_sub_total, string='Opening Subtotal', type='float', digits_compute=dp.get_precision('Amount'), multi='subtotal'),
178+ 'subtotal_closing': fields.function(_sub_total, string='Closing Subtotal', type='float', digits_compute=dp.get_precision('Amount'), multi='subtotal'),
179 'bank_statement_id' : fields.many2one('account.bank.statement', ondelete='cascade'),
180 }
181
182@@ -339,7 +339,7 @@
183 _name = 'account.journal.cashbox.line'
184 _rec_name = 'pieces'
185 _columns = {
186- 'pieces': fields.float('Values', digits_compute=dp.get_precision('Account')),
187+ 'pieces': fields.float('Values', digits_compute=dp.get_precision('Amount')),
188 'journal_id' : fields.many2one('account.journal', 'Journal', required=True, select=1, ondelete="cascade"),
189 }
190
191
192=== modified file 'account/account_invoice.py'
193--- account/account_invoice.py 2013-09-23 17:13:10 +0000
194+++ account/account_invoice.py 2013-10-29 13:27:40 +0000
195@@ -273,21 +273,21 @@
196 'tax_line': fields.one2many('account.invoice.tax', 'invoice_id', 'Tax Lines', readonly=True, states={'draft':[('readonly',False)]}),
197
198 'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, select=1, ondelete='restrict', help="Link to the automatically generated Journal Items."),
199- 'amount_untaxed': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Subtotal', track_visibility='always',
200- store={
201- 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
202- 'account.invoice.tax': (_get_invoice_tax, None, 20),
203- 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
204- },
205- multi='all'),
206- 'amount_tax': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Tax',
207- store={
208- 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
209- 'account.invoice.tax': (_get_invoice_tax, None, 20),
210- 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
211- },
212- multi='all'),
213- 'amount_total': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Total',
214+ 'amount_untaxed': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Subtotal', track_visibility='always',
215+ store={
216+ 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
217+ 'account.invoice.tax': (_get_invoice_tax, None, 20),
218+ 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
219+ },
220+ multi='all'),
221+ 'amount_tax': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Tax',
222+ store={
223+ 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
224+ 'account.invoice.tax': (_get_invoice_tax, None, 20),
225+ 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
226+ },
227+ multi='all'),
228+ 'amount_total': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Total',
229 store={
230 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
231 'account.invoice.tax': (_get_invoice_tax, None, 20),
232@@ -297,7 +297,7 @@
233 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}, track_visibility='always'),
234 'journal_id': fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
235 'company_id': fields.many2one('res.company', 'Company', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),
236- 'check_total': fields.float('Verification Total', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),
237+ 'check_total': fields.float('Verification Total', digits_compute=dp.get_precision('Amount'), readonly=True, states={'draft':[('readonly',False)]}),
238 'reconciled': fields.function(_reconciled, string='Paid/Reconciled', type='boolean',
239 store={
240 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, None, 50), # Check if we can remove ?
241@@ -307,7 +307,7 @@
242 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',
243 help='Bank Account Number to which the invoice will be paid. A Company bank account if this is a Customer Invoice or Supplier Refund, otherwise a Partner bank account number.', readonly=True, states={'draft':[('readonly',False)]}),
244 'move_lines':fields.function(_get_lines, type='many2many', relation='account.move.line', string='Entry Lines'),
245- 'residual': fields.function(_amount_residual, digits_compute=dp.get_precision('Account'), string='Balance',
246+ 'residual': fields.function(_amount_residual, digits_compute=dp.get_precision('Amount'), string='Balance',
247 store={
248 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line','move_id'], 50),
249 'account.invoice.tax': (_get_invoice_tax, None, 50),
250@@ -1381,7 +1381,7 @@
251 total += (l.debit or 0.0) - (l.credit or 0.0)
252
253 inv_id, name = self.name_get(cr, uid, [invoice.id], context=context)[0]
254- if (not round(total,self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))) or writeoff_acc_id:
255+ if (not round(total,self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount'))) or writeoff_acc_id:
256 self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context)
257 else:
258 code = invoice.currency_id.symbol
259@@ -1440,11 +1440,11 @@
260 'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null', select=True),
261 'product_id': fields.many2one('product.product', 'Product', ondelete='set null', select=True),
262 'account_id': fields.many2one('account.account', 'Account', required=True, domain=[('type','<>','view'), ('type', '<>', 'closed')], help="The income or expense account related to the selected product."),
263- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
264+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
265 'price_subtotal': fields.function(_amount_line, string='Amount', type="float",
266- digits_compute= dp.get_precision('Account'), store=True),
267- 'quantity': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),
268- 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount')),
269+ digits_compute= dp.get_precision('Amount'), store=True),
270+ 'quantity': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True),
271+ 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price')),
272 'invoice_line_tax_id': fields.many2many('account.tax', 'account_invoice_line_tax', 'invoice_line_id', 'tax_id', 'Taxes', domain=[('parent_id','=',False)]),
273 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
274 'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
275@@ -1682,14 +1682,14 @@
276 'name': fields.char('Tax Description', size=64, required=True),
277 'account_id': fields.many2one('account.account', 'Tax Account', required=True, domain=[('type','<>','view'),('type','<>','income'), ('type', '<>', 'closed')]),
278 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'),
279- 'base': fields.float('Base', digits_compute=dp.get_precision('Account')),
280- 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
281+ 'base': fields.float('Base', digits_compute=dp.get_precision('Amount')),
282+ 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
283 'manual': fields.boolean('Manual'),
284 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of invoice tax."),
285 'base_code_id': fields.many2one('account.tax.code', 'Base Code', help="The account basis of the tax declaration."),
286- 'base_amount': fields.float('Base Code Amount', digits_compute=dp.get_precision('Account')),
287+ 'base_amount': fields.float('Base Code Amount', digits_compute=dp.get_precision('Amount')),
288 'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),
289- 'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Account')),
290+ 'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Amount')),
291 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
292 'factor_base': fields.function(_count_factor, string='Multipication factor for Base code', type='float', multi="all"),
293 'factor_tax': fields.function(_count_factor, string='Multipication factor Tax code', type='float', multi="all")
294
295=== modified file 'account/account_move_line.py'
296--- account/account_move_line.py 2013-09-23 17:13:10 +0000
297+++ account/account_move_line.py 2013-10-29 13:27:40 +0000
298@@ -431,11 +431,11 @@
299
300 _columns = {
301 'name': fields.char('Name', size=64, required=True),
302- 'quantity': fields.float('Quantity', digits=(16,2), help="The optional quantity expressed by this line, eg: number of product sold. The quantity is not a legal requirement but is very useful for some reports."),
303+ 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), help="The optional quantity expressed by this line, eg: number of product sold. The quantity is not a legal requirement but is very useful for some reports."),
304 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
305 'product_id': fields.many2one('product.product', 'Product'),
306- 'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),
307- 'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),
308+ 'debit': fields.float('Debit', digits_compute=dp.get_precision('Amount')),
309+ 'credit': fields.float('Credit', digits_compute=dp.get_precision('Amount')),
310 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2),
311 'move_id': fields.many2one('account.move', 'Journal Entry', ondelete="cascade", help="The move of this entry line.", select=2, required=True),
312 'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Internal Note'),
313@@ -444,7 +444,7 @@
314 'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2),
315 'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),
316 'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref'),
317- 'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Account')),
318+ 'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Amount')),
319 'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount in Currency', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
320 'amount_residual': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."),
321 'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),
322@@ -469,7 +469,7 @@
323 'balance': fields.function(_balance, fnct_search=_balance_search, string='Balance'),
324 'state': fields.selection([('draft','Unbalanced'), ('valid','Balanced')], 'Status', readonly=True),
325 'tax_code_id': fields.many2one('account.tax.code', 'Tax Account', help="The Account can either be a base tax code or a tax code account."),
326- 'tax_amount': fields.float('Tax/Base Amount', digits_compute=dp.get_precision('Account'), select=True, help="If the Tax account is a tax code account, this field will contain the taxed amount.If the tax account is base tax code, "\
327+ 'tax_amount': fields.float('Tax/Base Amount', digits_compute=dp.get_precision('Amount'), select=True, help="If the Tax account is a tax code account, this field will contain the taxed amount.If the tax account is base tax code, "\
328 "this field will contain the basic amount(without tax)."),
329 'invoice': fields.function(_invoice, string='Invoice',
330 type='many2one', relation='account.invoice', fnct_search=_invoice_search),
331
332=== modified file 'account/data/account_data.xml'
333--- account/data/account_data.xml 2013-03-14 14:53:37 +0000
334+++ account/data/account_data.xml 2013-10-29 13:27:40 +0000
335@@ -36,11 +36,6 @@
336 <field eval="account_payment_term_15days" name="payment_id"/>
337 </record>
338
339- <record forcecreate="True" id="decimal_payment" model="decimal.precision">
340- <field name="name">Payment Term</field>
341- <field name="digits">6</field>
342- </record>
343-
344 <record id="account_payment_term_net" model="account.payment.term">
345 <field name="name">30 Net Days</field>
346 <field name="note">30 Net Days</field>
347
348=== modified file 'account/report/account_entries_report.py'
349--- account/report/account_entries_report.py 2013-04-18 10:39:07 +0000
350+++ account/report/account_entries_report.py 2013-10-29 13:27:40 +0000
351@@ -41,7 +41,7 @@
352 'year': fields.char('Year', size=4, readonly=True),
353 'date': fields.date('Date', size=128, readonly=True),
354 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
355- 'amount_currency': fields.float('Amount Currency', digits_compute=dp.get_precision('Account'), readonly=True),
356+ 'amount_currency': fields.float('Amount Currency', digits_compute=dp.get_precision('Amount'), readonly=True),
357 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
358 ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
359 ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
360
361=== modified file 'account/report/account_general_ledger.rml'
362--- account/report/account_general_ledger.rml 2012-06-13 09:06:00 +0000
363+++ account/report/account_general_ledger.rml 2013-10-29 13:27:40 +0000
364@@ -470,16 +470,16 @@
365 <para style="terp_default_Bold_9"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
366 </td>
367 <td>
368- <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>
369- </td>
370- <td>
371- <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
372- </td>
373- <td>
374- <para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]]</para>
375- </td>
376- <td>
377- <para style="terp_default_Bold_9_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account'),currency_obj=o.currency_id) or '' ]]</para>
378+ <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Amount')) ]]</para>
379+ </td>
380+ <td>
381+ <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Amount')) ]]</para>
382+ </td>
383+ <td>
384+ <para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Amount'),currency_obj=company.currency_id) ]]</para>
385+ </td>
386+ <td>
387+ <para style="terp_default_Bold_9_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Amount'),currency_obj=o.currency_id) or '' ]]</para>
388 </td>
389 </tr>
390 </blockTable>
391@@ -509,13 +509,13 @@
392 <para style="terp_default_Centre_8">[[ strip_name(line['line_corresp'].replace(', ',','),10) ]]</para>
393 </td>
394 <td>
395- <para style="terp_default_Right_8">[[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]]</para>
396- </td>
397- <td>
398- <para style="terp_default_Right_8">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>
399- </td>
400- <td>
401- <para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]] </para>
402+ <para style="terp_default_Right_8">[[ formatLang(line['debit'], digits=get_digits(dp='Amount')) ]]</para>
403+ </td>
404+ <td>
405+ <para style="terp_default_Right_8">[[ formatLang(line['credit'], digits=get_digits(dp='Amount')) ]]</para>
406+ </td>
407+ <td>
408+ <para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Amount'),currency_obj=company.currency_id) ]] </para>
409 </td>
410 <td>
411 <para style="terp_default_Right_8"><font>[[ (line.has_key('currency_id') and line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'])]] [[ line['currency_code'] or '']]</font></para>
412@@ -566,13 +566,13 @@
413 <para style="terp_default_Bold_9"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
414 </td>
415 <td>
416- <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>
417- </td>
418- <td>
419- <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
420- </td>
421- <td>
422- <para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]]</para>
423+ <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Amount')) ]]</para>
424+ </td>
425+ <td>
426+ <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Amount')) ]]</para>
427+ </td>
428+ <td>
429+ <para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Amount'),currency_obj=company.currency_id) ]]</para>
430 </td>
431 </tr>
432 </blockTable>
433@@ -602,13 +602,13 @@
434 <para style="terp_default_Centre_8">[[ strip_name(line['line_corresp'].replace(', ',','),20) ]]</para>
435 </td>
436 <td>
437- <para style="terp_default_Right_8">[[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]]</para>
438- </td>
439- <td>
440- <para style="terp_default_Right_8">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>
441- </td>
442- <td>
443- <para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]]</para>
444+ <para style="terp_default_Right_8">[[ formatLang(line['debit'], digits=get_digits(dp='Amount')) ]]</para>
445+ </td>
446+ <td>
447+ <para style="terp_default_Right_8">[[ formatLang(line['credit'], digits=get_digits(dp='Amount')) ]]</para>
448+ </td>
449+ <td>
450+ <para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Amount'),currency_obj=company.currency_id) ]]</para>
451 </td>
452 </tr>
453 </blockTable>
454
455=== modified file 'account/report/account_general_ledger_landscape.rml'
456--- account/report/account_general_ledger_landscape.rml 2013-06-14 21:36:02 +0000
457+++ account/report/account_general_ledger_landscape.rml 2013-10-29 13:27:40 +0000
458@@ -500,16 +500,16 @@
459 <para style="terp_default_Bold_7"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
460 </td>
461 <td>
462- <para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>
463- </td>
464- <td>
465- <para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
466- </td>
467- <td>
468- <para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'), currency_obj= company.currency_id) ]]</para>
469- </td>
470- <td>
471- <para style="terp_default_Bold_7_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account'),currency_obj=o.currency_id) or '' ]]</para>
472+ <para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Amount')) ]]</para>
473+ </td>
474+ <td>
475+ <para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Amount')) ]]</para>
476+ </td>
477+ <td>
478+ <para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Amount'), currency_obj= company.currency_id) ]]</para>
479+ </td>
480+ <td>
481+ <para style="terp_default_Bold_7_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Amount'),currency_obj=o.currency_id) or '' ]]</para>
482 </td>
483 </tr>
484 </blockTable>
485@@ -542,13 +542,13 @@
486 <para style="terp_default_7">[[ strip_name(line['line_corresp'],18) ]]</para>
487 </td>
488 <td>
489- <para style="terp_default_Right_7">[[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]]</para>
490- </td>
491- <td>
492- <para style="terp_default_Right_7">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>
493- </td>
494- <td>
495- <para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
496+ <para style="terp_default_Right_7">[[ formatLang(line['debit'], digits=get_digits(dp='Amount')) ]]</para>
497+ </td>
498+ <td>
499+ <para style="terp_default_Right_7">[[ formatLang(line['credit'], digits=get_digits(dp='Amount')) ]]</para>
500+ </td>
501+ <td>
502+ <para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
503 </td>
504 <td>
505 <para style="terp_default_Right_7">[[ (line.has_key('currency_id') and line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'])]] [[ line['currency_code'] or '']]</para>
506@@ -602,13 +602,13 @@
507 <para style="terp_default_Bold_7"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
508 </td>
509 <td>
510- <para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>
511- </td>
512- <td>
513- <para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>
514- </td>
515- <td>
516- <para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
517+ <para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Amount')) ]]</para>
518+ </td>
519+ <td>
520+ <para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Amount')) ]]</para>
521+ </td>
522+ <td>
523+ <para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
524 </td>
525 </tr>
526 </blockTable>
527@@ -641,13 +641,13 @@
528 <para style="terp_default_7">[[ strip_name(line['line_corresp'],23) ]]</para>
529 </td>
530 <td>
531- <para style="terp_default_Right_7">[[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]]</para>
532- </td>
533- <td>
534- <para style="terp_default_Right_7">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>
535- </td>
536- <td>
537- <para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]] </para>
538+ <para style="terp_default_Right_7">[[ formatLang(line['debit'], digits=get_digits(dp='Amount')) ]]</para>
539+ </td>
540+ <td>
541+ <para style="terp_default_Right_7">[[ formatLang(line['credit'], digits=get_digits(dp='Amount')) ]]</para>
542+ </td>
543+ <td>
544+ <para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Amount'),currency_obj=company.currency_id) ]] </para>
545 </td>
546 </tr>
547 </blockTable>
548
549=== modified file 'account/report/account_invoice_report.py'
550--- account/report/account_invoice_report.py 2013-05-14 12:05:18 +0000
551+++ account/report/account_invoice_report.py 2013-10-29 13:27:40 +0000
552@@ -74,9 +74,9 @@
553 'company_id': fields.many2one('res.company', 'Company', readonly=True),
554 'user_id': fields.many2one('res.users', 'Salesperson', readonly=True),
555 'price_total': fields.float('Total Without Tax', readonly=True),
556- 'user_currency_price_total': fields.function(_compute_amounts_in_user_currency, string="Total Without Tax", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
557+ 'user_currency_price_total': fields.function(_compute_amounts_in_user_currency, string="Total Without Tax", type='float', digits_compute=dp.get_precision('Amount'), multi="_compute_amounts"),
558 'price_average': fields.float('Average Price', readonly=True, group_operator="avg"),
559- 'user_currency_price_average': fields.function(_compute_amounts_in_user_currency, string="Average Price", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
560+ 'user_currency_price_average': fields.function(_compute_amounts_in_user_currency, string="Average Price", type='float', digits_compute=dp.get_precision('Amount'), multi="_compute_amounts"),
561 'currency_rate': fields.float('Currency Rate', readonly=True),
562 'nbr':fields.integer('# of Lines', readonly=True),
563 'type': fields.selection([
564@@ -98,7 +98,7 @@
565 'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True),
566 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
567 'residual': fields.float('Total Residual', readonly=True),
568- 'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
569+ 'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Amount'), multi="_compute_amounts"),
570 'country_id': fields.many2one('res.country', 'Country of the Partner Company'),
571 }
572 _order = 'date desc'
573
574=== modified file 'account/report/account_print_invoice.rml'
575--- account/report/account_print_invoice.rml 2013-05-27 16:30:46 +0000
576+++ account/report/account_print_invoice.rml 2013-10-29 13:27:40 +0000
577@@ -253,10 +253,10 @@
578 <para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para>
579 </td>
580 <td>
581- <para style="terp_default_Centre_9">[[ formatLang(l.discount, dp='Account') ]] </para>
582+ <para style="terp_default_Centre_9">[[ formatLang(l.discount, dp='Amount') ]] </para>
583 </td>
584 <td>
585- <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, dp='Account', currency_obj=o.currency_id) ]]</para>
586+ <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, dp='Amount', currency_obj=o.currency_id) ]]</para>
587 </td>
588 </tr>
589 </blockTable>
590@@ -272,7 +272,7 @@
591 <para style="terp_default_9">Net Total:</para>
592 </td>
593 <td>
594- <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
595+ <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Amount'), currency_obj=o.currency_id) ]]</para>
596 </td>
597 </tr>
598 <tr>
599@@ -285,7 +285,7 @@
600 <para style="terp_default_9">Taxes:</para>
601 </td>
602 <td>
603- <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.currency_id) ]]</para>
604+ <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Amount', currency_obj=o.currency_id) ]]</para>
605 </td>
606 </tr>
607 <tr>
608@@ -298,7 +298,7 @@
609 <para style="terp_tblheader_Details"><b>Total:</b></para>
610 </td>
611 <td>
612- <para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</b></para>
613+ <para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Amount'), currency_obj=o.currency_id) ]]</b></para>
614 </td>
615 </tr>
616 </blockTable>
617@@ -331,10 +331,10 @@
618 <para style="terp_default_8">[[ t.name ]]</para>
619 </td>
620 <td>
621- <para style="terp_default_Right_8">[[ formatLang(t.base, dp='Account', currency_obj=o.currency_id) ]]</para>
622+ <para style="terp_default_Right_8">[[ formatLang(t.base, dp='Amount', currency_obj=o.currency_id) ]]</para>
623 </td>
624 <td>
625- <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
626+ <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Amount'), currency_obj=o.currency_id) ]]</para>
627 </td>
628 <td>
629 <para style="terp_default_8">
630
631=== modified file 'account/report/account_treasury_report.py'
632--- account/report/account_treasury_report.py 2013-04-15 10:23:49 +0000
633+++ account/report/account_treasury_report.py 2013-10-29 13:27:40 +0000
634@@ -47,8 +47,8 @@
635 'credit': fields.float('Credit', readonly=True),
636 'balance': fields.float('Balance', readonly=True),
637 'date': fields.date('Beginning of Period Date', readonly=True),
638- 'starting_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Account'), string='Starting Balance', multi='balance'),
639- 'ending_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Account'), string='Ending Balance', multi='balance'),
640+ 'starting_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Amount'), string='Starting Balance', multi='balance'),
641+ 'ending_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Amount'), string='Ending Balance', multi='balance'),
642 'company_id': fields.many2one('res.company', 'Company', readonly=True),
643 }
644
645
646=== modified file 'account/res_config.py'
647--- account/res_config.py 2013-09-17 12:38:14 +0000
648+++ account/res_config.py 2013-10-29 13:27:40 +0000
649@@ -330,12 +330,12 @@
650 fiscalyear.create_period3(cr, uid, [fiscalyear_id])
651
652 def get_default_dp(self, cr, uid, fields, context=None):
653- dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
654+ dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_amount')
655 return {'decimal_precision': dp.digits}
656
657 def set_default_dp(self, cr, uid, ids, context=None):
658 config = self.browse(cr, uid, ids[0], context)
659- dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
660+ dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_amount')
661 dp.write({'digits': config.decimal_precision})
662
663 def onchange_analytic_accounting(self, cr, uid, ids, analytic_accounting, context=None):
664
665=== modified file 'account/test/price_accuracy00.yml'
666--- account/test/price_accuracy00.yml 2012-11-29 22:26:45 +0000
667+++ account/test/price_accuracy00.yml 2013-10-29 13:27:40 +0000
668@@ -6,7 +6,7 @@
669 Given the price accuracy for the account module is configured with two
670 digits
671 -
672- !record {model: decimal.precision, id: product.decimal_account}:
673+ !record {model: decimal.precision, id: product.decimal_amount}:
674 digits: 2
675 -
676 And we have a tax defined
677@@ -61,7 +61,7 @@
678 -
679 Then, I change the precision of numbers to 3 digits.
680 -
681- !record {model: decimal.precision, id: product.decimal_account}:
682+ !record {model: decimal.precision, id: product.decimal_amount}:
683 digits: 3
684 -
685 And I create another invoice with the same content.
686
687=== modified file 'account/wizard/account_reconcile.py'
688--- account/wizard/account_reconcile.py 2013-04-18 10:39:07 +0000
689+++ account/wizard/account_reconcile.py 2013-10-29 13:27:40 +0000
690@@ -33,9 +33,9 @@
691 _description = 'Account move line reconcile'
692 _columns = {
693 'trans_nbr': fields.integer('# of Transaction', readonly=True),
694- 'credit': fields.float('Credit amount', readonly=True, digits_compute=dp.get_precision('Account')),
695- 'debit': fields.float('Debit amount', readonly=True, digits_compute=dp.get_precision('Account')),
696- 'writeoff': fields.float('Write-Off amount', readonly=True, digits_compute=dp.get_precision('Account')),
697+ 'credit': fields.float('Credit amount', readonly=True, digits_compute=dp.get_precision('Amount')),
698+ 'debit': fields.float('Debit amount', readonly=True, digits_compute=dp.get_precision('Amount')),
699+ 'writeoff': fields.float('Write-Off amount', readonly=True, digits_compute=dp.get_precision('Amount')),
700 }
701
702 def default_get(self, cr, uid, fields, context=None):
703
704=== modified file 'account/wizard/pos_box.py'
705--- account/wizard/pos_box.py 2013-06-03 12:18:52 +0000
706+++ account/wizard/pos_box.py 2013-10-29 13:27:40 +0000
707@@ -9,7 +9,7 @@
708 # Attention, we don't set a domain, because there is a journal_type key
709 # in the context of the action
710 'amount' : fields.float('Amount',
711- digits_compute = dp.get_precision('Account'),
712+ digits_compute = dp.get_precision('Amount'),
713 required=True),
714 }
715
716
717=== modified file 'account_analytic_analysis/account_analytic_analysis.py'
718--- account_analytic_analysis/account_analytic_analysis.py 2013-10-03 11:12:22 +0000
719+++ account_analytic_analysis/account_analytic_analysis.py 2013-10-29 13:27:40 +0000
720@@ -48,10 +48,10 @@
721 'product_id': fields.many2one('product.product','Product',required=True),
722 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
723 'name': fields.text('Description', required=True),
724- 'quantity': fields.float('Quantity', required=True),
725+ 'quantity': fields.float('Quantity', required=True, digits_compute=dp.get_precision('Quantity')),
726 'uom_id': fields.many2one('product.uom', 'Unit of Measure',required=True),
727- 'price_unit': fields.float('Unit Price', required=True),
728- 'price_subtotal': fields.function(_amount_line, string='Sub Total', type="float",digits_compute= dp.get_precision('Account')),
729+ 'price_unit': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Price')),
730+ 'price_subtotal': fields.function(_amount_line, string='Sub Total', type="float",digits_compute= dp.get_precision('Amount')),
731 }
732 _defaults = {
733 'quantity' : 1,
734@@ -453,16 +453,16 @@
735 }),
736 'ca_invoiced': fields.function(_ca_invoiced_calc, type='float', string='Invoiced Amount',
737 help="Total customer invoiced amount for this account.",
738- digits_compute=dp.get_precision('Account')),
739+ digits_compute=dp.get_precision('Amount')),
740 'total_cost': fields.function(_total_cost_calc, type='float', string='Total Costs',
741 help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets.",
742- digits_compute=dp.get_precision('Account')),
743+ digits_compute=dp.get_precision('Amount')),
744 'ca_to_invoice': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Uninvoiced Amount',
745 help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs.",
746- digits_compute=dp.get_precision('Account')),
747+ digits_compute=dp.get_precision('Amount')),
748 'ca_theorical': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Theoretical Revenue',
749 help="Based on the costs you had on the project, what would have been the revenue if all these costs have been invoiced at the normal sale price provided by the pricelist.",
750- digits_compute=dp.get_precision('Account')),
751+ digits_compute=dp.get_precision('Amount')),
752 'hours_quantity': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Total Worked Time',
753 help="Number of time you spent on the analytic account (from timesheet). It computes quantities on all journal of type 'general'."),
754 'last_invoice_date': fields.function(_analysis_all, multi='analytic_analysis', type='date', string='Last Invoice Date',
755@@ -485,19 +485,19 @@
756 help="Sum of timesheet lines invoiced for this contract."),
757 'remaining_ca': fields.function(_remaining_ca_calc, type='float', string='Remaining Revenue',
758 help="Computed using the formula: Max Invoice Price - Invoiced Amount.",
759- digits_compute=dp.get_precision('Account')),
760+ digits_compute=dp.get_precision('Amount')),
761 'revenue_per_hour': fields.function(_revenue_per_hour_calc, type='float', string='Revenue per Time (real)',
762 help="Computed using the formula: Invoiced Amount / Total Time",
763- digits_compute=dp.get_precision('Account')),
764+ digits_compute=dp.get_precision('Amount')),
765 'real_margin': fields.function(_real_margin_calc, type='float', string='Real Margin',
766 help="Computed using the formula: Invoiced Amount - Total Costs.",
767- digits_compute=dp.get_precision('Account')),
768+ digits_compute=dp.get_precision('Amount')),
769 'theorical_margin': fields.function(_theorical_margin_calc, type='float', string='Theoretical Margin',
770 help="Computed using the formula: Theoretical Revenue - Total Costs",
771- digits_compute=dp.get_precision('Account')),
772+ digits_compute=dp.get_precision('Amount')),
773 'real_margin_rate': fields.function(_real_margin_rate_calc, type='float', string='Real Margin Rate (%)',
774 help="Computes using the formula: (Real Margin / Total Costs) * 100.",
775- digits_compute=dp.get_precision('Account')),
776+ digits_compute=dp.get_precision('Amount')),
777 'fix_price_invoices' : fields.boolean('Fixed Price'),
778 'invoice_on_timesheets' : fields.boolean("On Timesheets"),
779 'month_ids': fields.function(_analysis_all, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'),
780
781=== modified file 'account_asset/account_asset.py'
782--- account_asset/account_asset.py 2013-04-18 10:39:07 +0000
783+++ account_asset/account_asset.py 2013-10-29 13:27:40 +0000
784@@ -242,7 +242,7 @@
785 'account_move_line_ids': fields.one2many('account.move.line', 'asset_id', 'Entries', readonly=True, states={'draft':[('readonly',False)]}),
786 'name': fields.char('Asset Name', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),
787 'code': fields.char('Reference', size=32, readonly=True, states={'draft':[('readonly',False)]}),
788- 'purchase_value': fields.float('Gross Value', required=True, readonly=True, states={'draft':[('readonly',False)]}),
789+ 'purchase_value': fields.float('Gross Value', required=True, digits_compute=dp.get_precision('Amount'), readonly=True, states={'draft':[('readonly',False)]}),
790 'currency_id': fields.many2one('res.currency','Currency',required=True, readonly=True, states={'draft':[('readonly',False)]}),
791 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
792 'note': fields.text('Note'),
793@@ -263,7 +263,7 @@
794 'method_period': fields.integer('Number of Months in a Period', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="The amount of time between two depreciations, in months"),
795 'method_end': fields.date('Ending Date', readonly=True, states={'draft':[('readonly',False)]}),
796 'method_progress_factor': fields.float('Degressive Factor', readonly=True, states={'draft':[('readonly',False)]}),
797- 'value_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual Value'),
798+ 'value_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Amount'), string='Residual Value'),
799 'method_time': fields.selection([('number','Number of Depreciations'),('end','Ending Date')], 'Time Method', required=True, readonly=True, states={'draft':[('readonly',False)]},
800 help="Choose the method to use to compute the dates and number of depreciation lines.\n"\
801 " * Number of Depreciations: Fix the number of depreciation lines and the time between 2 depreciations.\n" \
802@@ -271,7 +271,7 @@
803 'prorata':fields.boolean('Prorata Temporis', readonly=True, states={'draft':[('readonly',False)]}, help='Indicates that the first depreciation entry for this asset have to be done from the purchase date instead of the first January'),
804 'history_ids': fields.one2many('account.asset.history', 'asset_id', 'History', readonly=True),
805 'depreciation_line_ids': fields.one2many('account.asset.depreciation.line', 'asset_id', 'Depreciation Lines', readonly=True, states={'draft':[('readonly',False)],'open':[('readonly',False)]}),
806- 'salvage_value': fields.float('Salvage Value', digits_compute=dp.get_precision('Account'), help="It is the amount you plan to have that you cannot depreciate.", readonly=True, states={'draft':[('readonly',False)]}),
807+ 'salvage_value': fields.float('Salvage Value', digits_compute=dp.get_precision('Amount'), help="It is the amount you plan to have that you cannot depreciate.", readonly=True, states={'draft':[('readonly',False)]}),
808 }
809 _defaults = {
810 'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'account.asset.code'),
811@@ -376,9 +376,9 @@
812 'sequence': fields.integer('Sequence', required=True),
813 'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True, ondelete='cascade'),
814 'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),
815- 'amount': fields.float('Current Depreciation', digits_compute=dp.get_precision('Account'), required=True),
816- 'remaining_value': fields.float('Next Period Depreciation', digits_compute=dp.get_precision('Account'),required=True),
817- 'depreciated_value': fields.float('Amount Already Depreciated', required=True),
818+ 'amount': fields.float('Current Depreciation', digits_compute=dp.get_precision('Amount'), required=True),
819+ 'remaining_value': fields.float('Next Period Depreciation', digits_compute=dp.get_precision('Amount'),required=True),
820+ 'depreciated_value': fields.float('Amount Already Depreciated', digits_compute=dp.get_precision('Amount'), required=True),
821 'depreciation_date': fields.date('Depreciation Date', select=1),
822 'move_id': fields.many2one('account.move', 'Depreciation Entry'),
823 'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True)
824
825=== modified file 'account_bank_statement_extensions/account_bank_statement.py'
826--- account_bank_statement_extensions/account_bank_statement.py 2013-04-15 10:23:49 +0000
827+++ account_bank_statement_extensions/account_bank_statement.py 2013-10-29 13:27:40 +0000
828@@ -71,7 +71,7 @@
829 ('coda', 'CODA'),
830 ('manual', 'Manual'),
831 ], 'Type', required=True),
832- 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
833+ 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
834 'bank_statement_line_ids': fields.one2many('account.bank.statement.line', 'globalisation_id', 'Bank Statement Lines'),
835 }
836 _rec_name = 'code'
837
838=== modified file 'account_budget/account_budget.py'
839--- account_budget/account_budget.py 2013-04-15 10:23:49 +0000
840+++ account_budget/account_budget.py 2013-10-29 13:27:40 +0000
841@@ -193,9 +193,9 @@
842 'date_from': fields.date('Start Date', required=True),
843 'date_to': fields.date('End Date', required=True),
844 'paid_date': fields.date('Paid Date'),
845- 'planned_amount':fields.float('Planned Amount', required=True, digits_compute=dp.get_precision('Account')),
846- 'practical_amount':fields.function(_prac, string='Practical Amount', type='float', digits_compute=dp.get_precision('Account')),
847- 'theoritical_amount':fields.function(_theo, string='Theoretical Amount', type='float', digits_compute=dp.get_precision('Account')),
848+ 'planned_amount':fields.float('Planned Amount', required=True, digits_compute=dp.get_precision('Amount')),
849+ 'practical_amount':fields.function(_prac, string='Practical Amount', type='float', digits_compute=dp.get_precision('Amount')),
850+ 'theoritical_amount':fields.function(_theo, string='Theoretical Amount', type='float', digits_compute=dp.get_precision('Amount')),
851 'percentage':fields.function(_perc, string='Percentage', type='float'),
852 'company_id': fields.related('crossovered_budget_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
853 }
854
855=== modified file 'account_budget/report/budget_report.rml'
856--- account_budget/report/budget_report.rml 2011-12-21 09:08:11 +0000
857+++ account_budget/report/budget_report.rml 2013-10-29 13:27:40 +0000
858@@ -148,13 +148,13 @@
859 <para style="terp_default_9"><font color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ a['name'] ]]</para>
860 </td>
861 <td>
862- <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
863- </td>
864- <td>
865- <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
866- </td>
867- <td>
868- <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
869+ <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
870+ </td>
871+ <td>
872+ <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['pln'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
873+ </td>
874+ <td>
875+ <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['prac'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
876 </td>
877 <td>
878 <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['perc'], digits=2) ]]%</para>
879@@ -168,13 +168,13 @@
880 <para style="terp_default_Bold_9"><font face="Helvetica">[[ repeatIn(funct_total(data['form']),'b') ]]</font>Total:</para>
881 </td>
882 <td>
883- <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] </para>
884- </td>
885- <td>
886- <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
887- </td>
888- <td>
889- <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
890+ <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]] </para>
891+ </td>
892+ <td>
893+ <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
894+ </td>
895+ <td>
896+ <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
897 </td>
898 <td>
899 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_perc'], digits=2) ]]%</para>
900
901=== modified file 'account_budget/report/crossovered_budget_report.rml'
902--- account_budget/report/crossovered_budget_report.rml 2011-12-21 09:08:11 +0000
903+++ account_budget/report/crossovered_budget_report.rml 2013-10-29 13:27:40 +0000
904@@ -163,13 +163,13 @@
905 <para style="terp_default_9"><font face="Helvetica" size="10.0" color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica" size="8.0">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ a['name'] ]]</para>
906 </td>
907 <td>
908- <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], dp='Account', currency_obj=company.currency_id) ]]</para>
909- </td>
910- <td>
911- <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln'], dp='Account', currency_obj=company.currency_id) ]]</para>
912- </td>
913- <td>
914- <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac'], dp='Account', currency_obj=company.currency_id) ]]</para>
915+ <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], dp='Amount', currency_obj=company.currency_id) ]]</para>
916+ </td>
917+ <td>
918+ <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln'], dp='Amount', currency_obj=company.currency_id) ]]</para>
919+ </td>
920+ <td>
921+ <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac'], dp='Amount', currency_obj=company.currency_id) ]]</para>
922 </td>
923 <td>
924 <para style="terp_default_Centre_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['perc'],digits=2) ]]%</para>
925@@ -183,13 +183,13 @@
926 <para style="terp_tblheader_Details">[[ repeatIn(funct_total(data['form']),'b') ]] Total :</para>
927 </td>
928 <td>
929- <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], dp='Account', currency_obj=company.currency_id) ]]</para>
930- </td>
931- <td>
932- <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], dp='Account', currency_obj=company.currency_id) ]]</para>
933- </td>
934- <td>
935- <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], dp='Account', currency_obj=company.currency_id) ]]</para>
936+ <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], dp='Amount', currency_obj=company.currency_id) ]]</para>
937+ </td>
938+ <td>
939+ <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], dp='Amount', currency_obj=company.currency_id) ]]</para>
940+ </td>
941+ <td>
942+ <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], dp='Amount', currency_obj=company.currency_id) ]]</para>
943 </td>
944 <td>
945 <para style="terp_tblheader_Details_Centre">[[ formatLang(b['tot_perc'],digits=2) ]]%</para>
946
947=== modified file 'account_followup/account_followup.py'
948--- account_followup/account_followup.py 2013-10-08 17:07:14 +0000
949+++ account_followup/account_followup.py 2013-10-29 13:27:40 +0000
950@@ -274,7 +274,7 @@
951 strbegin = "<TD><B>"
952 strend = "</B></TD>"
953 followup_table +="<TR>" + strbegin + str(aml['date']) + strend + strbegin + aml['name'] + strend + strbegin + aml['ref'] + strend + strbegin + str(date) + strend + strbegin + str(aml['balance']) + strend + strbegin + block + strend + "</TR>"
954- total = rml_parse.formatLang(total, dp='Account', currency_obj=currency)
955+ total = rml_parse.formatLang(total, dp='Amount', currency_obj=currency)
956 followup_table += '''<tr> </tr>
957 </table>
958 <center>''' + _("Amount due") + ''' : %s </center>''' % (total)
959
960=== modified file 'account_followup/wizard/account_followup_print.py'
961--- account_followup/wizard/account_followup_print.py 2013-10-08 17:23:19 +0000
962+++ account_followup/wizard/account_followup_print.py 2013-10-29 13:27:40 +0000
963@@ -25,6 +25,8 @@
964 from openerp import tools
965 from openerp.osv import fields, osv
966 from openerp.tools.translate import _
967+import openerp.addons.decimal_precision as dp
968+
969
970 class account_followup_stat_by_partner(osv.osv):
971 _name = "account_followup.stat.by.partner"
972@@ -38,7 +40,7 @@
973 'date_followup':fields.date('Latest follow-up', readonly=True),
974 'max_followup_id': fields.many2one('account_followup.followup.line',
975 'Max Follow Up Level', readonly=True, ondelete="cascade"),
976- 'balance':fields.float('Balance', readonly=True),
977+ 'balance':fields.float('Balance', readonly=True, digits_compute=dp.get_precision('Amount')),
978 'company_id': fields.many2one('res.company', 'Company', readonly=True),
979 }
980
981
982=== modified file 'account_payment/account_payment.py'
983--- account_payment/account_payment.py 2013-04-15 10:23:49 +0000
984+++ account_payment/account_payment.py 2013-10-29 13:27:40 +0000
985@@ -23,6 +23,8 @@
986 import time
987
988 from openerp.osv import fields, osv
989+from openerp.addons.decimal_precision import decimal_precision as dp
990+
991
992 _logger = logging.getLogger(__name__)
993
994@@ -96,7 +98,7 @@
995 ('done', 'Done')], 'Status', select=True,
996 help='When an order is placed the status is \'Draft\'.\n Once the bank is confirmed the status is set to \'Confirmed\'.\n Then the order is paid the status is \'Done\'.'),
997 'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),
998- 'total': fields.function(_total, string="Total", type='float'),
999+ 'total': fields.function(_total, string="Total", type='float', digits_compute= dp.get_precision('Amount')),
1000 'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done': [('readonly', True)]}),
1001 'date_prefered': fields.selection([
1002 ('now', 'Directly'),
1003@@ -307,7 +309,7 @@
1004 'communication': fields.char('Communication', size=64, required=True, help="Used as the message between ordering customer and current company. Depicts 'What do you want to say to the recipient about this order ?'"),
1005 'communication2': fields.char('Communication 2', size=64, help='The successor message of Communication.'),
1006 'move_line_id': fields.many2one('account.move.line', 'Entry line', domain=[('reconcile_id', '=', False), ('account_id.type', '=', 'payable')], help='This Entry Line will be referred for the information of the ordering customer.'),
1007- 'amount_currency': fields.float('Amount in Partner Currency', digits=(16, 2),
1008+ 'amount_currency': fields.float('Amount in Partner Currency', digits_compute= dp.get_precision('Amount'),
1009 required=True, help='Payment amount in the partner currency'),
1010 'currency': fields.many2one('res.currency','Partner Currency', required=True),
1011 'company_currency': fields.many2one('res.currency', 'Company Currency', readonly=True),
1012
1013=== modified file 'account_voucher/account_voucher.py'
1014--- account_voucher/account_voucher.py 2013-08-23 15:46:55 +0000
1015+++ account_voucher/account_voucher.py 2013-10-29 13:27:40 +0000
1016@@ -357,8 +357,8 @@
1017 \n* The \'Pro-forma\' when voucher is in Pro-forma status,voucher does not have an voucher number. \
1018 \n* The \'Posted\' status is used when user create voucher,a voucher number is generated and voucher entries are created in account \
1019 \n* The \'Cancelled\' status is used when user cancel voucher.'),
1020- 'amount': fields.float('Total', digits_compute=dp.get_precision('Account'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
1021- 'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),
1022+ 'amount': fields.float('Total', digits_compute=dp.get_precision('Amount'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
1023+ 'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Amount'), readonly=True, states={'draft':[('readonly',False)]}),
1024 'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),
1025 'number': fields.char('Number', size=32, readonly=True,),
1026 'move_id':fields.many2one('account.move', 'Account Entry'),
1027@@ -380,7 +380,7 @@
1028 'writeoff_acc_id': fields.many2one('account.account', 'Counterpart Account', readonly=True, states={'draft': [('readonly', False)]}),
1029 'comment': fields.char('Counterpart Comment', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}),
1030 'analytic_id': fields.many2one('account.analytic.account','Write-Off Analytic Account', readonly=True, states={'draft': [('readonly', False)]}),
1031- 'writeoff_amount': fields.function(_get_writeoff_amount, string='Difference Amount', type='float', readonly=True, help="Computed as the difference between the amount stated in the voucher and the sum of allocation on the voucher lines."),
1032+ 'writeoff_amount': fields.function(_get_writeoff_amount, string='Difference Amount', type='float', readonly=True, digits_compute=dp.get_precision('Amount'), help="Computed as the difference between the amount stated in the voucher and the sum of allocation on the voucher lines."),
1033 'payment_rate_currency_id': fields.many2one('res.currency', 'Payment Rate Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
1034 'payment_rate': fields.float('Exchange Rate', digits=(12,6), required=True, readonly=True, states={'draft': [('readonly', False)]},
1035 help='The specific rate that will be used, in this voucher, between the selected currency (in \'Payment Rate Currency\' field) and the voucher currency.'),
1036@@ -1182,7 +1182,7 @@
1037 ctx.update({
1038 'voucher_special_currency_rate': voucher_currency.rate * voucher.payment_rate ,
1039 'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False,})
1040- prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
1041+ prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
1042 for line in voucher.line_ids:
1043 #create one move line per voucher line where amount is not 0.0
1044 # AND (second part of the clause) only if the original move line was not having debit = credit = 0 (which is a legal value)
1045@@ -1481,16 +1481,16 @@
1046 'name':fields.char('Description', size=256),
1047 'account_id':fields.many2one('account.account','Account', required=True),
1048 'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'),
1049- 'untax_amount':fields.float('Untax Amount'),
1050- 'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')),
1051+ 'untax_amount':fields.float('Untax Amount', digits_compute=dp.get_precision('Amount')),
1052+ 'amount':fields.float('Amount', digits_compute=dp.get_precision('Amount')),
1053 'reconcile': fields.boolean('Full Reconcile'),
1054 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'),
1055 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
1056 'move_line_id': fields.many2one('account.move.line', 'Journal Item'),
1057 'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1),
1058 'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),
1059- 'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True, digits_compute=dp.get_precision('Account')),
1060- 'amount_unreconciled': fields.function(_compute_balance, multi='dc', type='float', string='Open Balance', store=True, digits_compute=dp.get_precision('Account')),
1061+ 'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True, digits_compute=dp.get_precision('Amount')),
1062+ 'amount_unreconciled': fields.function(_compute_balance, multi='dc', type='float', string='Open Balance', store=True, digits_compute=dp.get_precision('Amount')),
1063 'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True, readonly=True),
1064 'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency', readonly=True),
1065 }
1066
1067=== modified file 'analytic/analytic.py'
1068--- analytic/analytic.py 2013-09-10 12:48:03 +0000
1069+++ analytic/analytic.py 2013-10-29 13:27:40 +0000
1070@@ -185,9 +185,9 @@
1071 'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'),
1072 'child_complete_ids': fields.function(_child_compute, relation='account.analytic.account', string="Account Hierarchy", type='many2many'),
1073 'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'),
1074- 'balance': fields.function(_debit_credit_bal_qtty, type='float', string='Balance', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
1075- 'debit': fields.function(_debit_credit_bal_qtty, type='float', string='Debit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
1076- 'credit': fields.function(_debit_credit_bal_qtty, type='float', string='Credit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
1077+ 'balance': fields.function(_debit_credit_bal_qtty, type='float', string='Balance', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Amount')),
1078+ 'debit': fields.function(_debit_credit_bal_qtty, type='float', string='Debit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Amount')),
1079+ 'credit': fields.function(_debit_credit_bal_qtty, type='float', string='Credit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Amount')),
1080 'quantity': fields.function(_debit_credit_bal_qtty, type='float', string='Quantity', multi='debit_credit_bal_qtty'),
1081 'quantity_max': fields.float('Prepaid Service Units', help='Sets the higher limit of time to work on the contract, based on the timesheet. (for instance, number of hours in a limited support contract.)'),
1082 'partner_id': fields.many2one('res.partner', 'Customer'),
1083@@ -315,7 +315,7 @@
1084 _columns = {
1085 'name': fields.char('Description', size=256, required=True),
1086 'date': fields.date('Date', required=True, select=True),
1087- 'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')),
1088+ 'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Amount')),
1089 'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
1090 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='restrict', select=True, domain=[('type','<>','view')]),
1091 'user_id': fields.many2one('res.users', 'User'),
1092
1093=== modified file 'analytic_contract_hr_expense/analytic_contract_hr_expense.py'
1094--- analytic_contract_hr_expense/analytic_contract_hr_expense.py 2013-04-29 15:14:10 +0000
1095+++ analytic_contract_hr_expense/analytic_contract_hr_expense.py 2013-10-29 13:27:40 +0000
1096@@ -112,7 +112,7 @@
1097 'est_expenses': fields.float('Estimation of Expenses to Invoice'),
1098 'ca_invoiced': fields.function(_ca_invoiced_calc, type='float', string='Invoiced Amount',
1099 help="Total customer invoiced amount for this account.",
1100- digits_compute=dp.get_precision('Account')),
1101+ digits_compute=dp.get_precision('Amount')),
1102 }
1103
1104 def on_change_template(self, cr, uid, id, template_id, context=None):
1105
1106=== modified file 'analytic_user_function/analytic_user_function.py'
1107--- analytic_user_function/analytic_user_function.py 2013-08-23 15:46:55 +0000
1108+++ analytic_user_function/analytic_user_function.py 2013-10-29 13:27:40 +0000
1109@@ -31,7 +31,7 @@
1110 'product_id': fields.many2one("product.product", "Service", required=True,),
1111 'account_id': fields.many2one("account.analytic.account", "Analytic Account", required=True,),
1112 'uom_id': fields.related("product_id", "uom_id", relation="product.uom", string="Unit of Measure", type="many2one", readonly=True),
1113- 'price': fields.float('Price', digits_compute=dp.get_precision('Product Price'), help="Price per hour for this user.", required=True),
1114+ 'price': fields.float('Price', digits_compute=dp.get_precision('Price'), help="Price per hour for this user.", required=True),
1115 }
1116 def onchange_user_product_id(self, cr, uid, ids, user_id, product_id, context=None):
1117 if not user_id:
1118
1119=== modified file 'decimal_precision/__openerp__.py'
1120--- decimal_precision/__openerp__.py 2012-11-29 22:26:45 +0000
1121+++ decimal_precision/__openerp__.py 2013-10-29 13:27:40 +0000
1122@@ -33,6 +33,7 @@
1123 'category' : 'Hidden/Dependency',
1124 'data': [
1125 'decimal_precision_view.xml',
1126+ 'decimal_precision_data.xml',
1127 'security/ir.model.access.csv',
1128 ],
1129 'demo': [],
1130
1131=== added file 'decimal_precision/decimal_precision_data.xml'
1132--- decimal_precision/decimal_precision_data.xml 1970-01-01 00:00:00 +0000
1133+++ decimal_precision/decimal_precision_data.xml 2013-10-29 13:27:40 +0000
1134@@ -0,0 +1,12 @@
1135+<?xml version="1.0" encoding="utf-8"?>
1136+<openerp>
1137+ <data noupdate="1">
1138+
1139+ <!-- Decimal Precision -->
1140+ <record forcecreate="True" id="decimal_price" model="decimal.precision">
1141+ <field name="name">Price</field>
1142+ <field name="digits">2</field>
1143+ </record>
1144+
1145+ </data>
1146+</openerp>
1147\ No newline at end of file
1148
1149=== modified file 'delivery/delivery.py'
1150--- delivery/delivery.py 2013-04-15 10:23:49 +0000
1151+++ delivery/delivery.py 2013-10-29 13:27:40 +0000
1152@@ -236,8 +236,8 @@
1153 'max_value': fields.float('Maximum Value', required=True),
1154 'price_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Price Type', required=True),
1155 'variable_factor': fields.selection([('weight','Weight'),('volume','Volume'),('wv','Weight * Volume'), ('price','Price')], 'Variable Factor', required=True),
1156- 'list_price': fields.float('Sale Price', digits_compute= dp.get_precision('Product Price'), required=True),
1157- 'standard_price': fields.float('Cost Price', digits_compute= dp.get_precision('Product Price'), required=True),
1158+ 'list_price': fields.float('Sale Price', digits_compute= dp.get_precision('Price'), required=True),
1159+ 'standard_price': fields.float('Cost Price', digits_compute= dp.get_precision('Price'), required=True),
1160 }
1161 _defaults = {
1162 'type': lambda *args: 'weight',
1163
1164=== modified file 'delivery/stock.py'
1165--- delivery/stock.py 2013-04-15 10:23:49 +0000
1166+++ delivery/stock.py 2013-10-29 13:27:40 +0000
1167@@ -54,12 +54,12 @@
1168 _columns = {
1169 'carrier_id':fields.many2one("delivery.carrier","Carrier"),
1170 'volume': fields.float('Volume'),
1171- 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1172+ 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1173 store={
1174 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1175 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1176 }),
1177- 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1178+ 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1179 store={
1180 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1181 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1182@@ -167,11 +167,11 @@
1183 return res
1184
1185 _columns = {
1186- 'weight': fields.function(_cal_move_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight',
1187+ 'weight': fields.function(_cal_move_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_move_weight',
1188 store={
1189 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20),
1190 }),
1191- 'weight_net': fields.function(_cal_move_weight, type='float', string='Net weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight',
1192+ 'weight_net': fields.function(_cal_move_weight, type='float', string='Net weight', digits_compute= dp.get_precision('Weight'), multi='_cal_move_weight',
1193 store={
1194 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20),
1195 }),
1196@@ -200,12 +200,12 @@
1197 _columns = {
1198 'carrier_id':fields.many2one("delivery.carrier","Carrier"),
1199 'volume': fields.float('Volume'),
1200- 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1201+ 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1202 store={
1203 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1204 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1205 }),
1206- 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1207+ 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1208 store={
1209 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1210 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1211@@ -224,12 +224,12 @@
1212 return self.pool.get('stock.picking')._get_picking_line(cr, uid, ids, context=context)
1213
1214 _columns = {
1215- 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1216+ 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1217 store={
1218 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1219 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1220 }),
1221- 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1222+ 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1223 store={
1224 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1225 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1226
1227=== modified file 'hr_contract/hr_contract.py'
1228--- hr_contract/hr_contract.py 2013-06-27 11:00:29 +0000
1229+++ hr_contract/hr_contract.py 2013-10-29 13:27:40 +0000
1230@@ -21,6 +21,7 @@
1231 import time
1232
1233 from openerp.osv import fields, osv
1234+import openerp.addons.decimal_precision as dp
1235
1236 class hr_employee(osv.osv):
1237 _name = "hr.employee"
1238@@ -71,7 +72,7 @@
1239 'trial_date_start': fields.date('Trial Start Date'),
1240 'trial_date_end': fields.date('Trial End Date'),
1241 'working_hours': fields.many2one('resource.calendar','Working Schedule'),
1242- 'wage': fields.float('Wage', digits=(16,2), required=True, help="Basic Salary of the employee"),
1243+ 'wage': fields.float('Wage', digits_compute=dp.get_precision('Amount'), required=True, help="Basic Salary of the employee"),
1244 'advantages': fields.text('Advantages'),
1245 'notes': fields.text('Notes'),
1246 'permit_no': fields.char('Work Permit No', size=256, required=False, readonly=False),
1247
1248=== modified file 'hr_expense/hr_expense.py'
1249--- hr_expense/hr_expense.py 2013-09-10 12:48:03 +0000
1250+++ hr_expense/hr_expense.py 2013-10-29 13:27:40 +0000
1251@@ -77,7 +77,7 @@
1252 'account_move_id': fields.many2one('account.move', 'Ledger Posting'),
1253 'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),
1254 'note': fields.text('Note'),
1255- 'amount': fields.function(_amount, string='Total Amount', digits_compute=dp.get_precision('Account'),
1256+ 'amount': fields.function(_amount, string='Total Amount', digits_compute=dp.get_precision('Amount'),
1257 store={
1258 'hr.expense.line': (_get_expense_from_line, ['unit_amount','unit_quantity'], 10)
1259 }),
1260@@ -414,9 +414,9 @@
1261 'name': fields.char('Expense Note', size=128, required=True),
1262 'date_value': fields.date('Date', required=True),
1263 'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),
1264- 'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Account')),
1265- 'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Product Price')),
1266- 'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Product Unit of Measure')),
1267+ 'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Amount')),
1268+ 'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Price')),
1269+ 'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Quantity')),
1270 'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),
1271 'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True),
1272 'description': fields.text('Description'),
1273
1274=== modified file 'hr_expense/report/hr_expense_report.py'
1275--- hr_expense/report/hr_expense_report.py 2013-04-15 10:23:49 +0000
1276+++ hr_expense/report/hr_expense_report.py 2013-10-29 13:27:40 +0000
1277@@ -47,11 +47,11 @@
1278 'company_id':fields.many2one('res.company', 'Company', readonly=True),
1279 'user_id':fields.many2one('res.users', 'Validation User', readonly=True),
1280 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
1281- 'price_total':fields.float('Total Price', readonly=True, digits_compute=dp.get_precision('Account')),
1282+ 'price_total':fields.float('Total Price', readonly=True, digits_compute=dp.get_precision('Amount')),
1283 'delay_valid':fields.float('Delay to Valid', readonly=True),
1284 'delay_confirm':fields.float('Delay to Confirm', readonly=True),
1285 'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True),
1286- 'price_average':fields.float('Average Price', readonly=True, digits_compute=dp.get_precision('Account')),
1287+ 'price_average':fields.float('Average Price', readonly=True, digits_compute=dp.get_precision('Amount')),
1288 'nbr':fields.integer('# of Lines', readonly=True),
1289 'no_of_products':fields.integer('# of Products', readonly=True),
1290 'no_of_account':fields.integer('# of Accounts', readonly=True),
1291
1292=== modified file 'hr_payroll/hr_payroll.py'
1293--- hr_payroll/hr_payroll.py 2013-04-29 15:14:10 +0000
1294+++ hr_payroll/hr_payroll.py 2013-10-29 13:27:40 +0000
1295@@ -748,7 +748,7 @@
1296 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade', select=True),
1297 'sequence': fields.integer('Sequence', required=True, select=True),
1298 'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"),
1299- 'amount': fields.float('Amount', help="It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SALEURO.amount * contract.wage*0.01."),
1300+ 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount'), help="It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SALEURO.amount * contract.wage*0.01."),
1301 'contract_id': fields.many2one('hr.contract', 'Contract', required=True, help="The contract for which applied this input"),
1302 }
1303 _order = 'payslip_id, sequence'
1304@@ -781,8 +781,8 @@
1305 ('fix','Fixed Amount'),
1306 ('code','Python Code'),
1307 ],'Amount Type', select=True, required=True, help="The computation method for the rule amount."),
1308- 'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Payroll'),),
1309- 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Payroll Rate'), help='For example, enter 50.0 to apply a percentage of 50%'),
1310+ 'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Amount')),
1311+ 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Amount'), help='For example, enter 50.0 to apply a percentage of 50%'),
1312 'amount_python_compute':fields.text('Python Code'),
1313 'amount_percentage_base':fields.char('Percentage based on',size=1024, required=False, readonly=False, help='result will be affected to a variable'),
1314 'child_ids':fields.one2many('hr.salary.rule', 'parent_rule_id', 'Child Salary Rule'),
1315@@ -931,10 +931,10 @@
1316 'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True),
1317 'employee_id':fields.many2one('hr.employee', 'Employee', required=True),
1318 'contract_id':fields.many2one('hr.contract', 'Contract', required=True, select=True),
1319- 'rate': fields.float('Rate (%)', digits_compute=dp.get_precision('Payroll Rate')),
1320- 'amount': fields.float('Amount', digits_compute=dp.get_precision('Payroll')),
1321- 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Payroll')),
1322- 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Payroll'),store=True ),
1323+ 'rate': fields.float('Rate (%)', digits_compute=dp.get_precision('Price')),
1324+ 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
1325+ 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
1326+ 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Amount'),store=True ),
1327 }
1328
1329 _defaults = {
1330@@ -972,7 +972,7 @@
1331
1332 _columns = {
1333 'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True),
1334- 'total_wage': fields.function(_calculate_total_wage, method=True, type='float', string='Total Basic Salary', digits_compute=dp.get_precision('Payroll'), help="Sum of all current contract's wage of employee."),
1335+ 'total_wage': fields.function(_calculate_total_wage, method=True, type='float', string='Total Basic Salary', digits_compute=dp.get_precision('Amount'), help="Sum of all current contract's wage of employee."),
1336 }
1337
1338
1339
1340=== modified file 'hr_payroll/hr_payroll_data.xml'
1341--- hr_payroll/hr_payroll_data.xml 2012-06-20 13:04:49 +0000
1342+++ hr_payroll/hr_payroll_data.xml 2013-10-29 13:27:40 +0000
1343@@ -77,18 +77,5 @@
1344 <field name="company_id" ref="base.main_company"/>
1345 </record>
1346
1347- <!-- Decimal Precision -->
1348-
1349- <record forcecreate="True" id="decimal_payroll" model="decimal.precision">
1350- <field name="name">Payroll</field>
1351- <field name="digits">2</field>
1352- </record>
1353-
1354- <record forcecreate="True" id="decimal_payroll_rate" model="decimal.precision">
1355- <field name="name">Payroll Rate</field>
1356- <field name="digits">4</field>
1357- </record>
1358-
1359-
1360 </data>
1361 </openerp>
1362
1363=== modified file 'hr_recruitment/report/hr_recruitment_report.py'
1364--- hr_recruitment/report/hr_recruitment_report.py 2013-08-19 09:31:36 +0000
1365+++ hr_recruitment/report/hr_recruitment_report.py 2013-10-29 13:27:40 +0000
1366@@ -53,10 +53,10 @@
1367 'type_id': fields.many2one('hr.recruitment.degree', 'Degree'),
1368 'department_id': fields.many2one('hr.department','Department',readonly=True),
1369 'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'),
1370- 'salary_prop' : fields.float("Salary Proposed", digits_compute=dp.get_precision('Account')),
1371- 'salary_prop_avg' : fields.float("Avg. Proposed Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),
1372- 'salary_exp' : fields.float("Salary Expected", digits_compute=dp.get_precision('Account')),
1373- 'salary_exp_avg' : fields.float("Avg. Expected Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),
1374+ 'salary_prop' : fields.float("Salary Proposed", digits_compute=dp.get_precision('Amount')),
1375+ 'salary_prop_avg' : fields.float("Avg. Proposed Salary", group_operator="avg", digits_compute=dp.get_precision('Amount')),
1376+ 'salary_exp' : fields.float("Salary Expected", digits_compute=dp.get_precision('Amount')),
1377+ 'salary_exp_avg' : fields.float("Avg. Expected Salary", group_operator="avg", digits_compute=dp.get_precision('Amount')),
1378 'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),
1379 'available': fields.float("Availability"),
1380 'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",
1381
1382=== modified file 'hr_timesheet_invoice/report/report_analytic.py'
1383--- hr_timesheet_invoice/report/report_analytic.py 2013-04-15 10:23:49 +0000
1384+++ hr_timesheet_invoice/report/report_analytic.py 2013-10-29 13:27:40 +0000
1385@@ -71,8 +71,8 @@
1386 'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
1387 'product_uom_id':fields.many2one('product.uom', 'Unit of Measure', readonly=True),
1388 'unit_amount': fields.float('Units', readonly=True),
1389- 'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Product Price')),
1390- 'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Account')),
1391+ 'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Price')),
1392+ 'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Amount')),
1393 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
1394 ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
1395 }
1396
1397=== modified file 'hr_timesheet_sheet/report/hr_timesheet_report.py'
1398--- hr_timesheet_sheet/report/hr_timesheet_report.py 2013-04-15 10:23:49 +0000
1399+++ hr_timesheet_sheet/report/hr_timesheet_report.py 2013-10-29 13:27:40 +0000
1400@@ -42,7 +42,7 @@
1401 'user_id': fields.many2one('res.users', 'User',readonly=True),
1402 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
1403 'company_id': fields.many2one('res.company', 'Company',readonly=True),
1404- 'cost': fields.float('Cost',readonly=True, digits_compute=dp.get_precision('Account')),
1405+ 'cost': fields.float('Cost',readonly=True, digits_compute=dp.get_precision('Amount')),
1406 'quantity': fields.float('Time',readonly=True),
1407 }
1408
1409
1410=== modified file 'l10n_be_hr_payroll/l10n_be_hr_payroll.py'
1411--- l10n_be_hr_payroll/l10n_be_hr_payroll.py 2013-04-15 10:23:49 +0000
1412+++ l10n_be_hr_payroll/l10n_be_hr_payroll.py 2013-10-29 13:27:40 +0000
1413@@ -27,16 +27,16 @@
1414 _inherit = 'hr.contract'
1415
1416 _columns = {
1417- 'travel_reimbursement_amount': fields.float('Reimbursement of travel expenses', digits_compute=dp.get_precision('Payroll')),
1418- 'car_company_amount': fields.float('Company car employer', digits_compute=dp.get_precision('Payroll')),
1419- 'car_employee_deduction': fields.float('Company Car Deduction for Worker', digits_compute=dp.get_precision('Payroll')),
1420- 'misc_onss_deduction': fields.float('Miscellaneous exempt ONSS ', digits_compute=dp.get_precision('Payroll')),
1421- 'meal_voucher_amount': fields.float('Check Value Meal ', digits_compute=dp.get_precision('Payroll')),
1422- 'meal_voucher_employee_deduction': fields.float('Check Value Meal - by worker ', digits_compute=dp.get_precision('Payroll')),
1423- 'insurance_employee_deduction': fields.float('Insurance Group - by worker ', digits_compute=dp.get_precision('Payroll')),
1424- 'misc_advantage_amount': fields.float('Benefits of various nature ', digits_compute=dp.get_precision('Payroll')),
1425- 'additional_net_amount': fields.float('Net supplements', digits_compute=dp.get_precision('Payroll')),
1426- 'retained_net_amount': fields.float('Net retained ', digits_compute=dp.get_precision('Payroll')),
1427+ 'travel_reimbursement_amount': fields.float('Reimbursement of travel expenses', digits_compute=dp.get_precision('Price')),
1428+ 'car_company_amount': fields.float('Company car employer', digits_compute=dp.get_precision('Price')),
1429+ 'car_employee_deduction': fields.float('Company Car Deduction for Worker', digits_compute=dp.get_precision('Price')),
1430+ 'misc_onss_deduction': fields.float('Miscellaneous exempt ONSS ', digits_compute=dp.get_precision('Price')),
1431+ 'meal_voucher_amount': fields.float('Check Value Meal ', digits_compute=dp.get_precision('Price')),
1432+ 'meal_voucher_employee_deduction': fields.float('Check Value Meal - by worker ', digits_compute=dp.get_precision('Price')),
1433+ 'insurance_employee_deduction': fields.float('Insurance Group - by worker ', digits_compute=dp.get_precision('Price')),
1434+ 'misc_advantage_amount': fields.float('Benefits of various nature ', digits_compute=dp.get_precision('Price')),
1435+ 'additional_net_amount': fields.float('Net supplements', digits_compute=dp.get_precision('Price')),
1436+ 'retained_net_amount': fields.float('Net retained ', digits_compute=dp.get_precision('Price')),
1437 }
1438
1439
1440
1441=== modified file 'l10n_br/account.py'
1442--- l10n_br/account.py 2013-03-27 11:49:36 +0000
1443+++ l10n_br/account.py 2013-10-29 13:27:40 +0000
1444@@ -93,7 +93,7 @@
1445 def get_precision_tax():
1446 def change_digit_tax(cr):
1447 decimal_precision = openerp.registry(cr.dbname)['decimal.precision']
1448- res = decimal_precision.precision_get(cr, 1, 'Account')
1449+ res = decimal_precision.precision_get(cr, 1, 'Amount')
1450 return (16, res+2)
1451 return change_digit_tax
1452
1453
1454=== modified file 'l10n_fr_hr_payroll/l10n_fr_hr_payroll.py'
1455--- l10n_fr_hr_payroll/l10n_fr_hr_payroll.py 2013-04-15 10:23:49 +0000
1456+++ l10n_fr_hr_payroll/l10n_fr_hr_payroll.py 2013-10-29 13:27:40 +0000
1457@@ -27,9 +27,9 @@
1458 _inherit = 'res.company'
1459
1460 _columns = {
1461- 'plafond_secu': fields.float('Plafond de la Securite Sociale', digits_compute=dp.get_precision('Payroll')),
1462+ 'plafond_secu': fields.float('Plafond de la Securite Sociale', digits_compute=dp.get_precision('Price')),
1463 'nombre_employes': fields.integer('Nombre d\'employes'),
1464- 'cotisation_prevoyance': fields.float('Cotisation Patronale Prevoyance', digits_compute=dp.get_precision('Payroll')),
1465+ 'cotisation_prevoyance': fields.float('Cotisation Patronale Prevoyance', digits_compute=dp.get_precision('Price')),
1466 'org_ss': fields.char('Organisme de securite sociale', size=64),
1467 'conv_coll': fields.char('Convention collective', size=64),
1468 }
1469
1470=== modified file 'l10n_in_hr_payroll/l10n_in_hr_payroll.py'
1471--- l10n_in_hr_payroll/l10n_in_hr_payroll.py 2013-06-27 07:09:42 +0000
1472+++ l10n_in_hr_payroll/l10n_in_hr_payroll.py 2013-10-29 13:27:40 +0000
1473@@ -40,12 +40,12 @@
1474 _description = 'HR Contract'
1475
1476 _columns = {
1477- 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll'), help="Amount for Tax Deduction at Source"),
1478+ 'tds': fields.float('TDS', digits_compute=dp.get_precision('Price'), help="Amount for Tax Deduction at Source"),
1479 'driver_salay': fields.boolean('Driver Salary', help="Check this box if you provide allowance for driver"),
1480- 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'), help="Deduction towards company provided medical insurance"),
1481- 'voluntary_provident_fund': fields.float('Voluntary Provident Fund (%)', digits_compute=dp.get_precision('Payroll'), help="VPF is a safe option wherein you can contribute more than the PF ceiling of 12% that has been mandated by the government and VPF computed as percentage(%)"),
1482- 'house_rent_allowance_metro_nonmetro': fields.float('House Rent Allowance (%)', digits_compute=dp.get_precision('Payroll'), help="HRA is an allowance given by the employer to the employee for taking care of his rental or accommodation expenses for metro city it is 50% and for non metro 40%. \nHRA computed as percentage(%)"),
1483- 'supplementary_allowance': fields.float('Supplementary Allowance', digits_compute=dp.get_precision('Payroll')),
1484+ 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Price'), help="Deduction towards company provided medical insurance"),
1485+ 'voluntary_provident_fund': fields.float('Voluntary Provident Fund (%)', digits_compute=dp.get_precision('Price'), help="VPF is a safe option wherein you can contribute more than the PF ceiling of 12% that has been mandated by the government and VPF computed as percentage(%)"),
1486+ 'house_rent_allowance_metro_nonmetro': fields.float('House Rent Allowance (%)', digits_compute=dp.get_precision('Price'), help="HRA is an allowance given by the employer to the employee for taking care of his rental or accommodation expenses for metro city it is 50% and for non metro 40%. \nHRA computed as percentage(%)"),
1487+ 'supplementary_allowance': fields.float('Supplementary Allowance', digits_compute=dp.get_precision('Price')),
1488 }
1489
1490
1491@@ -235,7 +235,7 @@
1492 'name': fields.char('Bank Account No.', size=25, required=True),
1493 'ifsc_code': fields.char('IFSC Code', size=16),
1494 'employee_id': fields.many2one('hr.employee', 'Employee', required=True),
1495- 'bysal': fields.float('By Salary', digits_compute=dp.get_precision('Payroll')),
1496+ 'bysal': fields.float('By Salary', digits_compute=dp.get_precision('Price')),
1497 'debit_credit': fields.char('C/D', size=3, required=False),
1498 'company_id': fields.related('advice_id', 'company_id', type='many2one', required=False, relation='res.company', string='Company', store=True),
1499 'ifsc': fields.related('advice_id', 'neft', type='boolean', string='IFSC'),
1500
1501=== modified file 'lunch/lunch.py'
1502--- lunch/lunch.py 2013-08-23 14:31:14 +0000
1503+++ lunch/lunch.py 2013-10-29 13:27:40 +0000
1504@@ -435,7 +435,7 @@
1505 'name': fields.char('Product', required=True, size=64),
1506 'category_id': fields.many2one('lunch.product.category', 'Category', required=True),
1507 'description': fields.text('Description', size=256),
1508- 'price': fields.float('Price', digits=(16,2)), #TODO: use decimal precision of 'Account', move it from product to decimal_precision
1509+ 'price': fields.float('Price', digits=(16,2)), #TODO: use decimal precision of 'Amount', move it from product to decimal_precision
1510 'supplier': fields.many2one('res.partner', 'Supplier'),
1511 }
1512
1513
1514=== modified file 'marketing_campaign/marketing_campaign.py'
1515--- marketing_campaign/marketing_campaign.py 2013-04-15 10:23:49 +0000
1516+++ marketing_campaign/marketing_campaign.py 2013-10-29 13:27:40 +0000
1517@@ -119,7 +119,7 @@
1518 'Status',),
1519 'activity_ids': fields.one2many('marketing.campaign.activity',
1520 'campaign_id', 'Activities'),
1521- '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('Product Price')),
1522+ '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')),
1523 }
1524
1525 _defaults = {
1526@@ -432,8 +432,8 @@
1527 'from_ids': fields.one2many('marketing.campaign.transition',
1528 'activity_to_id',
1529 'Previous Activities'),
1530- '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('Product Price')),
1531- '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')),
1532+ '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')),
1533+ '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('Amount')),
1534 'signal': fields.char('Signal', size=128,
1535 help='An activity with a signal can be called programmatically. Be careful, the workitem is always created when a signal is sent'),
1536 'keep_if_condition_not_met': fields.boolean("Don't Delete Workitems",
1537
1538=== modified file 'marketing_campaign/report/campaign_analysis.py'
1539--- marketing_campaign/report/campaign_analysis.py 2013-04-15 10:23:49 +0000
1540+++ marketing_campaign/report/campaign_analysis.py 2013-10-29 13:27:40 +0000
1541@@ -63,8 +63,8 @@
1542 'country_id': fields.related('partner_id', 'country_id',
1543 type='many2one', relation='res.country',string='Country'),
1544 'total_cost' : fields.function(_total_cost, string='Cost',
1545- type="float", digits_compute=dp.get_precision('Account')),
1546- 'revenue': fields.float('Revenue', readonly=True, digits_compute=dp.get_precision('Account')),
1547+ type="float", digits_compute=dp.get_precision('Amount')),
1548+ 'revenue': fields.float('Revenue', readonly=True, digits_compute=dp.get_precision('Amount')),
1549 'count' : fields.integer('# of Actions', readonly=True),
1550 'state': fields.selection([('todo', 'To Do'),
1551 ('exception', 'Exception'), ('done', 'Done'),
1552
1553=== modified file 'membership/membership.py'
1554--- membership/membership.py 2013-06-05 07:04:25 +0000
1555+++ membership/membership.py 2013-10-29 13:27:40 +0000
1556@@ -146,7 +146,7 @@
1557 'date_to': fields.date('To', readonly=True),
1558 'date_cancel': fields.date('Cancel date'),
1559 'date': fields.date('Join Date', help="Date on which member has joined the membership"),
1560- 'member_price': fields.float('Membership Fee', digits_compute= dp.get_precision('Product Price'), required=True, help='Amount for the membership'),
1561+ 'member_price': fields.float('Membership Fee', digits_compute= dp.get_precision('Price'), required=True, help='Amount for the membership'),
1562 'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True),
1563 'account_invoice_id': fields.related('account_invoice_line', 'invoice_id', type='many2one', relation='account.invoice', string='Invoice', readonly=True),
1564 'state': fields.function(_state,
1565
1566=== modified file 'membership/report/report_membership.py'
1567--- membership/report/report_membership.py 2013-04-15 10:23:49 +0000
1568+++ membership/report/report_membership.py 2013-10-29 13:27:40 +0000
1569@@ -53,8 +53,8 @@
1570 'num_waiting': fields.integer('# Waiting', readonly=True),
1571 'num_invoiced': fields.integer('# Invoiced', readonly=True),
1572 'num_paid': fields.integer('# Paid', readonly=True),
1573- 'tot_pending': fields.float('Pending Amount', digits_compute= dp.get_precision('Account'), readonly=True),
1574- 'tot_earned': fields.float('Earned Amount', digits_compute= dp.get_precision('Account'), readonly=True),
1575+ 'tot_pending': fields.float('Pending Amount', digits_compute= dp.get_precision('Amount'), readonly=True),
1576+ 'tot_earned': fields.float('Earned Amount', digits_compute= dp.get_precision('Amount'), readonly=True),
1577 'partner_id': fields.many2one('res.partner', 'Member', readonly=True),
1578 'associate_member_id': fields.many2one('res.partner', 'Associate Member', readonly=True),
1579 'membership_id': fields.many2one('product.product', 'Membership Product', readonly=True),
1580
1581=== modified file 'membership/wizard/membership_invoice.py'
1582--- membership/wizard/membership_invoice.py 2013-04-15 10:23:49 +0000
1583+++ membership/wizard/membership_invoice.py 2013-10-29 13:27:40 +0000
1584@@ -29,7 +29,7 @@
1585 _description = "Membership Invoice"
1586 _columns = {
1587 'product_id': fields.many2one('product.product','Membership', required=True),
1588- 'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Product Price'), required=True),
1589+ 'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Price'), required=True),
1590 }
1591 def onchange_product(self, cr, uid, ids, product_id=False):
1592 """This function returns value of product's member price based on product id.
1593
1594=== modified file 'mrp/mrp.py'
1595--- mrp/mrp.py 2013-10-03 11:12:22 +0000
1596+++ mrp/mrp.py 2013-10-29 13:27:40 +0000
1597@@ -203,9 +203,9 @@
1598 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bills of material."),
1599 'position': fields.char('Internal Reference', size=64, help="Reference to a position in an external plan."),
1600 'product_id': fields.many2one('product.product', 'Product', required=True),
1601- 'product_uos_qty': fields.float('Product UOS Qty'),
1602+ 'product_uos_qty': fields.float('Product UOS Qty', digits_compute= dp.get_precision('Quantity')),
1603 'product_uos': fields.many2one('product.uom', 'Product UOS', help="Product UOS (Unit of Sale) is the unit of measurement for the invoicing and promotion of stock."),
1604- 'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Product Unit of Measure')),
1605+ 'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Quantity')),
1606 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for the inventory control"),
1607 'product_rounding': fields.float('Product Rounding', help="Rounding applied on the product quantity."),
1608 'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% within the production process."),
1609@@ -444,9 +444,9 @@
1610 select=True, readonly=True, states=dict.fromkeys(['draft', 'confirmed'], [('readonly', False)])),
1611
1612 'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft': [('readonly', False)]}),
1613- 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
1614+ 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Quantity'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
1615 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, readonly=True, states={'draft': [('readonly', False)]}),
1616- 'product_uos_qty': fields.float('Product UoS Quantity', readonly=True, states={'draft': [('readonly', False)]}),
1617+ 'product_uos_qty': fields.float('Product UoS Quantity', digits_compute= dp.get_precision('Quantity'), readonly=True, states={'draft': [('readonly', False)]}),
1618 'product_uos': fields.many2one('product.uom', 'Product UoS', readonly=True, states={'draft': [('readonly', False)]}),
1619 'progress': fields.function(_get_progress, type='float',
1620 string='Production progress'),
1621@@ -1093,9 +1093,9 @@
1622 _columns = {
1623 'name': fields.char('Name', size=64, required=True),
1624 'product_id': fields.many2one('product.product', 'Product', required=True),
1625- 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
1626+ 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
1627 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
1628- 'product_uos_qty': fields.float('Product UOS Quantity'),
1629+ 'product_uos_qty': fields.float('Product UOS Quantity', digits_compute= dp.get_precision('Quantity')),
1630 'product_uos': fields.many2one('product.uom', 'Product UOS'),
1631 'production_id': fields.many2one('mrp.production', 'Production Order', select=True),
1632 }
1633
1634=== modified file 'mrp/report/price.py'
1635--- mrp/report/price.py 2013-03-27 13:47:02 +0000
1636+++ mrp/report/price.py 2013-10-29 13:27:40 +0000
1637@@ -139,7 +139,7 @@
1638 </row>
1639 """ % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Unit of Measure'), _('Supplier Price per Unit of Measure'))
1640
1641- purchase_price_digits = rml_obj.get_digits(dp='Product Price')
1642+ purchase_price_digits = rml_obj.get_digits(dp='Price')
1643
1644 for product in product_pool.browse(cr, uid, ids, context=context):
1645 product_uom_name = to_xml(product.uom_id.name)
1646
1647=== modified file 'mrp/wizard/change_production_qty.py'
1648--- mrp/wizard/change_production_qty.py 2013-04-15 10:23:49 +0000
1649+++ mrp/wizard/change_production_qty.py 2013-10-29 13:27:40 +0000
1650@@ -28,7 +28,7 @@
1651 _description = 'Change Quantity of Products'
1652
1653 _columns = {
1654- 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
1655+ 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Quantity'), required=True),
1656 }
1657
1658 def default_get(self, cr, uid, fields, context=None):
1659
1660=== modified file 'mrp/wizard/mrp_product_produce.py'
1661--- mrp/wizard/mrp_product_produce.py 2013-04-15 10:23:49 +0000
1662+++ mrp/wizard/mrp_product_produce.py 2013-10-29 13:27:40 +0000
1663@@ -27,7 +27,7 @@
1664 _description = "Product Produce"
1665
1666 _columns = {
1667- 'product_qty': fields.float('Select Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
1668+ 'product_qty': fields.float('Select Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
1669 'mode': fields.selection([('consume_produce', 'Consume & Produce'),
1670 ('consume', 'Consume Only')], 'Mode', required=True,
1671 help="'Consume only' mode will only consume the products with the quantity selected.\n"
1672
1673=== modified file 'mrp_byproduct/mrp_byproduct.py'
1674--- mrp_byproduct/mrp_byproduct.py 2013-04-15 10:23:49 +0000
1675+++ mrp_byproduct/mrp_byproduct.py 2013-10-29 13:27:40 +0000
1676@@ -29,7 +29,7 @@
1677 _description = 'Byproduct'
1678 _columns={
1679 'product_id': fields.many2one('product.product', 'Product', required=True),
1680- 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
1681+ 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Quantity'), required=True),
1682 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
1683 'subproduct_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Quantity Type', required=True, help="Define how the quantity of byproducts will be set on the production orders using this BoM.\
1684 'Fixed' depicts a situation where the quantity of created byproduct is always equal to the quantity set on the BoM, regardless of how many are created in the production order.\
1685
1686=== modified file 'mrp_operations/report/mrp_workorder_analysis.py'
1687--- mrp_operations/report/mrp_workorder_analysis.py 2013-04-15 10:23:49 +0000
1688+++ mrp_operations/report/mrp_workorder_analysis.py 2013-10-29 13:27:40 +0000
1689@@ -35,7 +35,7 @@
1690 'nbr': fields.integer('# of Lines', readonly=True),
1691 'date': fields.date('Date', readonly=True),
1692 'product_id': fields.many2one('product.product', 'Product', readonly=True),
1693- 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True),
1694+ 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Quantity'), readonly=True),
1695 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')],'Status', readonly=True),
1696 'total_hours': fields.float('Total Hours', readonly=True),
1697 'total_cycles': fields.float('Total Cycles', readonly=True),
1698
1699=== modified file 'mrp_repair/mrp_repair.py'
1700--- mrp_repair/mrp_repair.py 2013-10-18 12:58:18 +0000
1701+++ mrp_repair/mrp_repair.py 2013-10-29 13:27:40 +0000
1702@@ -158,17 +158,17 @@
1703 'deliver_bool': fields.boolean('Deliver', help="Check this box if you want to manage the delivery once the product is repaired and create a picking with selected product. Note that you can select the locations in the Info tab, if you have the extended view.", states={'confirmed':[('readonly',True)]}),
1704 'invoiced': fields.boolean('Invoiced', readonly=True),
1705 'repaired': fields.boolean('Repaired', readonly=True),
1706- 'amount_untaxed': fields.function(_amount_untaxed, string='Untaxed Amount',
1707- store={
1708- 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),
1709- 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1710- }),
1711- 'amount_tax': fields.function(_amount_tax, string='Taxes',
1712- store={
1713- 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),
1714- 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1715- }),
1716- 'amount_total': fields.function(_amount_total, string='Total',
1717+ 'amount_untaxed': fields.function(_amount_untaxed, string='Untaxed Amount', digits_compute=dp.get_precision('Amount'),
1718+ store={
1719+ 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),
1720+ 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1721+ }),
1722+ 'amount_tax': fields.function(_amount_tax, string='Taxes', digits_compute=dp.get_precision('Amount'),
1723+ store={
1724+ 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),
1725+ 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1726+ }),
1727+ 'amount_total': fields.function(_amount_total, string='Total', digits_compute=dp.get_precision('Amount'),
1728 store={
1729 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),
1730 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1731@@ -636,10 +636,10 @@
1732 'to_invoice': fields.boolean('To Invoice'),
1733 'product_id': fields.many2one('product.product', 'Product', required=True),
1734 'invoiced': fields.boolean('Invoiced',readonly=True),
1735- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
1736- 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),
1737+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
1738+ 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Amount')),
1739 'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),
1740- 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),
1741+ 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True),
1742 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
1743 'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number',domain="[('product_id','=',product_id)]"),
1744 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
1745@@ -729,10 +729,10 @@
1746 'repair_id': fields.many2one('mrp.repair', 'Repair Order Reference', required=True, ondelete='cascade', select=True),
1747 'name': fields.char('Description', size=64, select=True,required=True),
1748 'product_id': fields.many2one('product.product', 'Product'),
1749- 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),
1750- 'price_unit': fields.float('Unit Price', required=True),
1751+ 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True),
1752+ 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Price'), required=True),
1753 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
1754- 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),
1755+ 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Amount')),
1756 'tax_id': fields.many2many('account.tax', 'repair_fee_line_tax', 'repair_fee_line_id', 'tax_id', 'Taxes'),
1757 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
1758 'to_invoice': fields.boolean('To Invoice'),
1759
1760=== modified file 'mrp_repair/report/order.rml'
1761--- mrp_repair/report/order.rml 2012-11-29 22:26:45 +0000
1762+++ mrp_repair/report/order.rml 2013-10-29 13:27:40 +0000
1763@@ -367,7 +367,7 @@
1764 <para style="terp_default_9">Taxes:</para>
1765 </td>
1766 <td>
1767- <para style="P26">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</para>
1768+ <para style="P26">[[ formatLang(o.amount_tax, dp='Amount', currency_obj=o.pricelist_id.currency_id) ]]</para>
1769 </td>
1770 </tr>
1771 <tr>
1772
1773=== modified file 'point_of_sale/point_of_sale.py'
1774--- point_of_sale/point_of_sale.py 2013-10-18 12:58:18 +0000
1775+++ point_of_sale/point_of_sale.py 2013-10-29 13:27:40 +0000
1776@@ -230,13 +230,13 @@
1777
1778 'cash_register_balance_end_real' : fields.related('cash_register_id', 'balance_end_real',
1779 type='float',
1780- digits_compute=dp.get_precision('Account'),
1781+ digits_compute=dp.get_precision('Amount'),
1782 string="Ending Balance",
1783 help="Computed using the cash control lines",
1784 readonly=True),
1785 'cash_register_balance_start' : fields.related('cash_register_id', 'balance_start',
1786 type='float',
1787- digits_compute=dp.get_precision('Account'),
1788+ digits_compute=dp.get_precision('Amount'),
1789 string="Starting Balance",
1790 help="Computed using the cash control at the opening.",
1791 readonly=True),
1792@@ -245,7 +245,7 @@
1793 readonly=True),
1794 'cash_register_balance_end' : fields.related('cash_register_id', 'balance_end',
1795 type='float',
1796- digits_compute=dp.get_precision('Account'),
1797+ digits_compute=dp.get_precision('Amount'),
1798 string="Computed Balance",
1799 help="Computed with the initial cash control and the sum of all payments.",
1800 readonly=True),
1801@@ -621,10 +621,10 @@
1802 'warehouse_id': fields.related('session_id', 'config_id', 'warehouse_id', relation='stock.warehouse', type='many2one', string='Warehouse', store=True, readonly=True),
1803 'date_order': fields.datetime('Order Date', readonly=True, select=True),
1804 'user_id': fields.many2one('res.users', 'Salesman', help="Person who uses the the cash register. It can be a reliever, a student or an interim employee."),
1805- 'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
1806- 'amount_total': fields.function(_amount_all, string='Total', multi='all'),
1807- 'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
1808- 'amount_return': fields.function(_amount_all, 'Returned', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
1809+ 'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Amount'), multi='all'),
1810+ 'amount_total': fields.function(_amount_all, string='Total', digits_compute=dp.get_precision('Amount'), multi='all'),
1811+ 'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, digits_compute=dp.get_precision('Amount'), multi='all'),
1812+ 'amount_return': fields.function(_amount_all, 'Returned', digits_compute=dp.get_precision('Amount'), multi='all'),
1813 'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True),
1814 'statement_ids': fields.one2many('account.bank.statement.line', 'pos_statement_id', 'Payments', states={'draft': [('readonly', False)]}, readonly=True),
1815 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),
1816@@ -1229,11 +1229,11 @@
1817 'name': fields.char('Line No', size=32, required=True),
1818 'notice': fields.char('Discount Notice', size=128),
1819 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True, change_default=True),
1820- 'price_unit': fields.float(string='Unit Price', digits=(16, 2)),
1821- 'qty': fields.float('Quantity', digits=(16, 2)),
1822+ 'price_unit': fields.float(string='Unit Price', digits_compute=dp.get_precision('Price')),
1823+ 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
1824 'price_subtotal': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal w/o Tax', store=True),
1825 'price_subtotal_incl': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal', store=True),
1826- 'discount': fields.float('Discount (%)', digits=(16, 2)),
1827+ 'discount': fields.float('Discount (%)', digits_compute=dp.get_precision('Price')),
1828 'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'),
1829 'create_date': fields.datetime('Creation Date', readonly=True),
1830 }
1831
1832=== modified file 'point_of_sale/report/account_statement.rml'
1833--- point_of_sale/report/account_statement.rml 2012-11-29 22:26:45 +0000
1834+++ point_of_sale/report/account_statement.rml 2013-10-29 13:27:40 +0000
1835@@ -214,10 +214,10 @@
1836 <para style="terp_default_Centre_8">[[ formatLang(statement.closing_date,date_time=True)]]</para>
1837 </td>
1838 <td>
1839- <para style="terp_default_Centre_8">[[ formatLang(statement.balance_start, dp='Account', currency_obj = company.currency_id) ]]</para>
1840+ <para style="terp_default_Centre_8">[[ formatLang(statement.balance_start, dp='Amount', currency_obj = company.currency_id) ]]</para>
1841 </td>
1842 <td>
1843- <para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real, dp='Account', currency_obj = company.currency_id) ]]</para>
1844+ <para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real, dp='Amount', currency_obj = company.currency_id) ]]</para>
1845 </td>
1846 </tr>
1847 </blockTable>
1848@@ -250,7 +250,7 @@
1849 <para style="terp_default_9">[[ line_ids.partner_id.name ]]</para>
1850 </td>
1851 <td>
1852- <para style="terp_default_Right_9">[[ formatLang(line_ids.amount, dp='Account', currency_obj=company.currency_id) ]]</para>
1853+ <para style="terp_default_Right_9">[[ formatLang(line_ids.amount, dp='Amount', currency_obj=company.currency_id) ]]</para>
1854 </td>
1855 </tr>
1856 </blockTable>
1857@@ -267,7 +267,7 @@
1858 <para style="terp_tblheader_Details">Total :</para>
1859 </td>
1860 <td>
1861- <para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement.line_ids), dp='Account', currency_obj = company.currency_id) ]]</para>
1862+ <para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement.line_ids), dp='Amount', currency_obj = company.currency_id) ]]</para>
1863 </td>
1864 </tr>
1865 </blockTable>
1866
1867=== modified file 'point_of_sale/report/pos_details.rml'
1868--- point_of_sale/report/pos_details.rml 2012-11-29 22:26:45 +0000
1869+++ point_of_sale/report/pos_details.rml 2013-10-29 13:27:40 +0000
1870@@ -320,7 +320,7 @@
1871 <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para>
1872 </td>
1873 <td>
1874- <para style="terp_default_Right_9_Bold">[[ formatLang(p['sum'], dp='Account', currency_obj = company.currency_id) or removeParentNode('tr') ]]</para>
1875+ <para style="terp_default_Right_9_Bold">[[ formatLang(p['sum'], dp='Amount', currency_obj = company.currency_id) or removeParentNode('tr') ]]</para>
1876 </td>
1877 </tr>
1878 </blockTable>
1879
1880=== modified file 'portal/acquirer.py'
1881--- portal/acquirer.py 2012-11-30 09:45:01 +0000
1882+++ portal/acquirer.py 2013-10-29 13:27:40 +0000
1883@@ -80,7 +80,7 @@
1884 return ''
1885 else:
1886 payment_header = _('Pay safely online')
1887- amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))
1888+ amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount'))
1889 currency_str = currency.symbol or currency.name
1890 amount = u"%s %s" % ((currency_str, amount_str) if currency.position == 'before' else (amount_str, currency_str))
1891 result = """<div class="payment_acquirers">
1892
1893=== modified file 'procurement/procurement.py'
1894--- procurement/procurement.py 2013-10-21 14:53:34 +0000
1895+++ procurement/procurement.py 2013-10-29 13:27:40 +0000
1896@@ -92,9 +92,9 @@
1897 'date_planned': fields.datetime('Scheduled date', required=True, select=True),
1898 'date_close': fields.datetime('Date Closed'),
1899 'product_id': fields.many2one('product.product', 'Product', required=True, states={'draft':[('readonly',False)]}, readonly=True),
1900- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
1901+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
1902 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, states={'draft':[('readonly',False)]}, readonly=True),
1903- 'product_uos_qty': fields.float('UoS Quantity', states={'draft':[('readonly',False)]}, readonly=True),
1904+ 'product_uos_qty': fields.float('UoS Quantity', digits_compute= dp.get_precision('Quantity'), states={'draft':[('readonly',False)]}, readonly=True),
1905 'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True),
1906 'move_id': fields.many2one('stock.move', 'Reservation', ondelete='set null'),
1907 'close_move': fields.boolean('Close Move at end'),
1908@@ -528,10 +528,10 @@
1909 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade"),
1910 'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type','!=','service')]),
1911 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
1912- 'product_min_qty': fields.float('Minimum Quantity', required=True,
1913+ 'product_min_qty': fields.float('Minimum Quantity', required=True, digits_compute=dp.get_precision('Quantity'),
1914 help="When the virtual stock goes below the Min Quantity specified for this field, OpenERP generates "\
1915 "a procurement to bring the forecasted quantity to the Max Quantity."),
1916- 'product_max_qty': fields.float('Maximum Quantity', required=True,
1917+ 'product_max_qty': fields.float('Maximum Quantity', required=True, digits_compute=dp.get_precision('Quantity'),
1918 help="When the virtual stock goes below the Min Quantity, OpenERP generates "\
1919 "a procurement to bring the forecasted quantity to the Quantity specified as Max Quantity."),
1920 'qty_multiple': fields.integer('Qty Multiple', required=True,
1921
1922=== modified file 'product/pricelist.py'
1923--- product/pricelist.py 2013-09-23 17:13:10 +0000
1924+++ product/pricelist.py 2013-10-29 13:27:40 +0000
1925@@ -449,18 +449,18 @@
1926 'base_pricelist_id': fields.many2one('product.pricelist', 'Other Pricelist'),
1927
1928 'price_surcharge': fields.float('Price Surcharge',
1929- digits_compute= dp.get_precision('Product Price'), help='Specify the fixed amount to add or substract(if negative) to the amount calculated with the discount.'),
1930- 'price_discount': fields.float('Price Discount', digits=(16,4)),
1931+ digits_compute= dp.get_precision('Price'), help='Specify the fixed amount to add or substract(if negative) to the amount calculated with the discount.'),
1932+ 'price_discount': fields.float('Price Discount', digits_compute=dp.get_precision('Price')),
1933 'price_round': fields.float('Price Rounding',
1934- digits_compute= dp.get_precision('Product Price'),
1935+ digits_compute= dp.get_precision('Price'),
1936 help="Sets the price so that it is a multiple of this value.\n" \
1937 "Rounding is applied after the discount and before the surcharge.\n" \
1938 "To have prices that end in 9.99, set rounding 10, surcharge -0.01" \
1939 ),
1940 'price_min_margin': fields.float('Min. Price Margin',
1941- digits_compute= dp.get_precision('Product Price'), help='Specify the minimum amount of margin over the base price.'),
1942+ digits_compute= dp.get_precision('Price'), help='Specify the minimum amount of margin over the base price.'),
1943 'price_max_margin': fields.float('Max. Price Margin',
1944- digits_compute= dp.get_precision('Product Price'), help='Specify the maximum amount of margin over the base price.'),
1945+ digits_compute= dp.get_precision('Price'), help='Specify the maximum amount of margin over the base price.'),
1946 'company_id': fields.related('price_version_id','company_id',type='many2one',
1947 readonly=True, relation='res.company', string='Company', store=True)
1948 }
1949
1950=== modified file 'product/product.py'
1951--- product/product.py 2013-09-10 12:48:03 +0000
1952+++ product/product.py 2013-10-29 13:27:40 +0000
1953@@ -138,7 +138,7 @@
1954 string='Ratio',
1955 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category:\n'\
1956 '1 * (this unit) = ratio * (reference unit)', required=True),
1957- 'rounding': fields.float('Rounding Precision', digits_compute=dp.get_precision('Product Unit of Measure'), required=True,
1958+ 'rounding': fields.float('Rounding Precision', digits_compute=dp.get_precision('Quantity'), required=True,
1959 help="The computed quantity will be a multiple of this value. "\
1960 "Use 1.0 for a Unit of Measure that cannot be further split, such as a piece."),
1961 'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."),
1962@@ -304,11 +304,11 @@
1963 'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. In the case of multi-level BOM, the manufacturing lead times of the components will be added."),
1964 'rental': fields.boolean('Can be Rent'),
1965 'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
1966- 'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Product Price'), help="Base price to compute the customer price. Sometimes called the catalog price."),
1967- 'standard_price': fields.float('Cost', digits_compute=dp.get_precision('Product Price'), help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user"),
1968+ 'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Price'), help="Base price to compute the customer price. Sometimes called the catalog price."),
1969+ 'standard_price': fields.float('Cost', digits_compute=dp.get_precision('Price'), help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user"),
1970 'volume': fields.float('Volume', help="The volume in m3."),
1971- 'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."),
1972- 'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."),
1973+ 'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Weight'), help="The gross weight in Kg."),
1974+ 'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Weight'), help="The net weight in Kg."),
1975 'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True,
1976 help="Standard Price: The cost price is manually updated at the end of a specific period (usually every year). \nAverage Price: The cost price is recomputed at each incoming shipment."),
1977 'warranty': fields.float('Warranty'),
1978@@ -322,9 +322,7 @@
1979 'uom_po_id': fields.many2one('product.uom', 'Purchase Unit of Measure', required=True, help="Default Unit of Measure used for purchase orders. It must be in the same category than the default unit of measure."),
1980 'uos_id' : fields.many2one('product.uom', 'Unit of Sale',
1981 help='Specify a unit of measure here if invoicing is made in another unit of measure than inventory. Keep empty to use the default unit of measure.'),
1982- 'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Product UoS'),
1983- help='Coefficient to convert default Unit of Measure to Unit of Sale\n'
1984- ' uos = uom * coeff'),
1985+ 'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Quantity'), help='Coefficient to convert default Unit of Measure to Unit of Sale\n' ' uos = uom * coeff'),
1986 'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'),
1987 'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Supplier'),
1988 'company_id': fields.many2one('res.company', 'Company', select=1),
1989@@ -553,8 +551,8 @@
1990 'virtual_available': fields.function(_product_virtual_available, type='float', string='Quantity Available'),
1991 'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'),
1992 'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'),
1993- 'price': fields.function(_product_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')),
1994- 'lst_price' : fields.function(_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Product Price')),
1995+ 'price': fields.function(_product_price, type='float', string='Price', digits_compute=dp.get_precision('Price')),
1996+ 'lst_price' : fields.function(_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Price')),
1997 'code': fields.function(_product_code, type='char', string='Internal Reference'),
1998 'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),
1999 'default_code' : fields.char('Internal Reference', size=64, select=True),
2000@@ -563,8 +561,8 @@
2001 'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade", select=True),
2002 'ean13': fields.char('EAN13 Barcode', size=13, help="International Article Number used for product identification."),
2003 'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."),
2004- 'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Product Price')),
2005- 'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Product Price')),
2006+ 'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Price')),
2007+ 'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Price')),
2008 'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
2009 'name_template': fields.related('product_tmpl_id', 'name', string="Template Name", type='char', size=128, store={
2010 'product.template': (_get_name_template_ids, ['name'], 10),
2011@@ -778,8 +776,7 @@
2012 _columns = {
2013 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of packaging."),
2014 'name' : fields.text('Description', size=64),
2015- 'qty' : fields.float('Quantity by Package',
2016- help="The total number of products you can put by pallet or box."),
2017+ 'qty' : fields.float('Quantity by Package', digits_compute=dp.get_precision('Quantity'), help="The total number of products you can put by pallet or box."),
2018 'ul' : fields.many2one('product.ul', 'Type of Package', required=True),
2019 'ul_qty' : fields.integer('Package by layer', help='The number of packages by layer'),
2020 'rows' : fields.integer('Number of Layers', required=True,
2021@@ -789,9 +786,8 @@
2022 help="The EAN code of the package unit."),
2023 'code' : fields.char('Code', size=14,
2024 help="The code of the transport unit."),
2025- 'weight': fields.float('Total Package Weight',
2026- help='The weight of a full package, pallet or box.'),
2027- 'weight_ul': fields.float('Empty Package Weight'),
2028+ 'weight': fields.float('Total Package Weight', digits_compute=dp.get_precision('Weight'), help='The weight of a full package, pallet or box.'),
2029+ 'weight_ul': fields.float('Empty Package Weight', digits_compute=dp.get_precision('Weight')),
2030 'height': fields.float('Height', help='The height of the package'),
2031 'width': fields.float('Width', help='The width of the package'),
2032 'length': fields.float('Length', help='The length of the package'),
2033@@ -855,8 +851,8 @@
2034 'product_code': fields.char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."),
2035 'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."),
2036 'product_uom': fields.related('product_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier Unit of Measure", readonly="1", help="This comes from the product form."),
2037- 'min_qty': fields.float('Minimal Quantity', required=True, help="The minimal quantity to purchase to this supplier, expressed in the supplier Product Unit of Measure if not empty, in the default unit of measure of the product otherwise."),
2038- 'qty': fields.function(_calc_qty, store=True, type='float', string='Quantity', multi="qty", help="This is a quantity which is converted into Default Unit of Measure."),
2039+ 'min_qty': fields.float('Minimal Quantity', required=True, digits_compute=dp.get_precision('Quantity'), help="The minimal quantity to purchase to this supplier, expressed in the supplier Product Unit of Measure if not empty, in the default unit of measure of the product otherwise."),
2040+ 'qty': fields.function(_calc_qty, store=True, type='float', string='Quantity', multi="qty", digits_compute=dp.get_precision('Quantity'), help="This is a quantity which is converted into Default Unit of Measure."),
2041 'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True),
2042 'delay' : fields.integer('Delivery Lead Time', required=True, help="Lead time in days between the confirmation of the purchase order and the reception of the products in your warehouse. Used by the scheduler for automatic computation of the purchase order planning."),
2043 'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'),
2044@@ -914,8 +910,8 @@
2045 _columns = {
2046 'name': fields.char('Description', size=64),
2047 'suppinfo_id': fields.many2one('product.supplierinfo', 'Partner Information', required=True, ondelete='cascade'),
2048- 'min_quantity': fields.float('Quantity', required=True, help="The minimal quantity to trigger this rule, expressed in the supplier Unit of Measure if any or in the default Unit of Measure of the product otherrwise."),
2049- 'price': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Product Price'), help="This price will be considered as a price for the supplier Unit of Measure if any or the default Unit of Measure of the product otherwise"),
2050+ 'min_quantity': fields.float('Quantity', required=True, digits_compute=dp.get_precision('Quantity'), help="The minimal quantity to trigger this rule, expressed in the supplier Unit of Measure if any or in the default Unit of Measure of the product otherrwise."),
2051+ 'price': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Price'), help="This price will be considered as a price for the supplier Unit of Measure if any or the default Unit of Measure of the product otherwise"),
2052 }
2053 _order = 'min_quantity asc'
2054
2055@@ -923,7 +919,7 @@
2056 _inherit = 'res.currency'
2057
2058 def _check_main_currency_rounding(self, cr, uid, ids, context=None):
2059- cr.execute('SELECT digits FROM decimal_precision WHERE name like %s',('Account',))
2060+ cr.execute('SELECT digits FROM decimal_precision WHERE name like %s',('Amount',))
2061 digits = cr.fetchone()
2062 if digits and len(digits):
2063 digits = digits[0]
2064@@ -942,7 +938,7 @@
2065 _inherit = 'decimal.precision'
2066
2067 def _check_main_currency_rounding(self, cr, uid, ids, context=None):
2068- cr.execute('SELECT id, digits FROM decimal_precision WHERE name like %s',('Account',))
2069+ cr.execute('SELECT id, digits FROM decimal_precision WHERE name like %s',('Amount',))
2070 res = cr.fetchone()
2071 if res and len(res):
2072 account_precision_id, digits = res
2073
2074=== modified file 'product/product_data.xml'
2075--- product/product_data.xml 2013-02-01 13:24:54 +0000
2076+++ product/product_data.xml 2013-10-29 13:27:40 +0000
2077@@ -161,28 +161,20 @@
2078 <field eval="'product.pricelist,'+str(ref('list0'))" name="value"/>
2079 </record>
2080
2081- <record forcecreate="True" id="decimal_price" model="decimal.precision">
2082- <field name="name">Product Price</field>
2083- <field name="digits">2</field>
2084- </record>
2085- <record forcecreate="True" id="decimal_discount" model="decimal.precision">
2086- <field name="name">Discount</field>
2087- <field name="digits">2</field>
2088- </record>
2089- <record forcecreate="True" id="decimal_account" model="decimal.precision">
2090- <field name="name">Account</field>
2091- <field name="digits">2</field>
2092- </record>
2093- <record forcecreate="True" id="decimal_stock_weight" model="decimal.precision">
2094- <field name="name">Stock Weight</field>
2095- <field name="digits">2</field>
2096- </record>
2097- <record forcecreate="True" id="decimal_product_uom" model="decimal.precision">
2098- <field name="name">Product Unit of Measure</field>
2099+ <record forcecreate="True" id="decimal_amount" model="decimal.precision">
2100+ <field name="name">Amount</field>
2101+ <field name="digits">2</field>
2102+ </record>
2103+ <record forcecreate="True" id="decimal_weight" model="decimal.precision">
2104+ <field name="name">Weight</field>
2105+ <field name="digits">2</field>
2106+ </record>
2107+ <record forcecreate="True" id="decimal_qty" model="decimal.precision">
2108+ <field name="name">Quantity</field>
2109 <field name="digits" eval="3"/>
2110 </record>
2111- <record forcecreate="True" id="decimal_product_uos" model="decimal.precision">
2112- <field name="name">Product UoS</field>
2113+ <record forcecreate="True" id="decimal_percentage" model="decimal.precision">
2114+ <field name="name">Percentage</field>
2115 <field name="digits" eval="3"/>
2116 </record>
2117
2118
2119=== modified file 'product/report/product_pricelist.py'
2120--- product/report/product_pricelist.py 2013-03-28 12:10:09 +0000
2121+++ product/report/product_pricelist.py 2013-10-29 13:27:40 +0000
2122@@ -110,7 +110,7 @@
2123 return res
2124
2125 def _get_price(self, pricelist_id, product_id, qty):
2126- sale_price_digits = self.get_digits(dp='Product Price')
2127+ sale_price_digits = self.get_digits(dp='Price')
2128 pricelist = self.pool.get('product.pricelist').browse(self.cr, self.uid, [pricelist_id], context=self.localcontext)[0]
2129 price_dict = self.pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext)
2130 if price_dict[pricelist_id]:
2131
2132=== modified file 'purchase/purchase.py'
2133--- purchase/purchase.py 2013-10-18 12:58:18 +0000
2134+++ purchase/purchase.py 2013-10-29 13:27:40 +0000
2135@@ -208,15 +208,15 @@
2136 'purchase.order.line': (_get_order, ['date_planned'], 10),
2137 }
2138 ),
2139- 'amount_untaxed': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Untaxed Amount',
2140+ 'amount_untaxed': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Untaxed Amount',
2141 store={
2142 'purchase.order.line': (_get_order, None, 10),
2143 }, multi="sums", help="The amount without tax", track_visibility='always'),
2144- 'amount_tax': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Taxes',
2145+ 'amount_tax': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Taxes',
2146 store={
2147 'purchase.order.line': (_get_order, None, 10),
2148 }, multi="sums", help="The tax amount"),
2149- 'amount_total': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Total',
2150+ 'amount_total': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Total',
2151 store={
2152 'purchase.order.line': (_get_order, None, 10),
2153 }, multi="sums",help="The total amount"),
2154@@ -853,15 +853,15 @@
2155
2156 _columns = {
2157 'name': fields.text('Description', required=True),
2158- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
2159+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
2160 'date_planned': fields.date('Scheduled Date', required=True, select=True),
2161 'taxes_id': fields.many2many('account.tax', 'purchase_order_taxe', 'ord_id', 'tax_id', 'Taxes'),
2162 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
2163 'product_id': fields.many2one('product.product', 'Product', domain=[('purchase_ok','=',True)], change_default=True),
2164 'move_ids': fields.one2many('stock.move', 'purchase_line_id', 'Reservation', readonly=True, ondelete='set null'),
2165 'move_dest_id': fields.many2one('stock.move', 'Reservation Destination', ondelete='set null'),
2166- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
2167- 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),
2168+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
2169+ 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Amount')),
2170 'order_id': fields.many2one('purchase.order', 'Order Reference', select=True, required=True, ondelete='cascade'),
2171 'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',),
2172 'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
2173
2174=== modified file 'purchase/report/order.rml'
2175--- purchase/report/order.rml 2013-05-28 08:19:55 +0000
2176+++ purchase/report/order.rml 2013-10-29 13:27:40 +0000
2177@@ -252,10 +252,10 @@
2178 <para style="terp_default_Right_9">[[ formatLang(line.product_qty ) ]] [[ line.product_uom.name ]] </para>
2179 </td>
2180 <td>
2181- <para style="terp_default_Right_9">[[ formatLang(line.price_unit, digits=get_digits(dp='Product Price') ) ]]</para>
2182+ <para style="terp_default_Right_9">[[ formatLang(line.price_unit, digits=get_digits(dp='Price') ) ]]</para>
2183 </td>
2184 <td>
2185- <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id ) ]]</para>
2186+ <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Amount'), currency_obj=o.pricelist_id.currency_id ) ]]</para>
2187 </td>
2188 </tr>
2189 </blockTable>
2190@@ -271,7 +271,7 @@
2191 <para style="terp_default_9">Net Total :</para>
2192 </td>
2193 <td>
2194- <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id ) ]]</para>
2195+ <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Amount'), currency_obj=o.pricelist_id.currency_id ) ]]</para>
2196 </td>
2197 </tr>
2198 <tr>
2199@@ -284,7 +284,7 @@
2200 <para style="terp_default_9">Taxes :</para>
2201 </td>
2202 <td>
2203- <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</para>
2204+ <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Amount', currency_obj=o.pricelist_id.currency_id) ]]</para>
2205 </td>
2206 </tr>
2207 <tr>
2208@@ -297,7 +297,7 @@
2209 <para style="terp_default_Bold_9"><b>Total :</b></para>
2210 </td>
2211 <td>
2212- <para style="terp_default_Bold_9_Right"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account') , currency_obj=o.pricelist_id.currency_id) ]]</b></para>
2213+ <para style="terp_default_Bold_9_Right"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Amount') , currency_obj=o.pricelist_id.currency_id) ]]</b></para>
2214 </td>
2215 </tr>
2216 </blockTable>
2217
2218=== modified file 'purchase_requisition/purchase_requisition.py'
2219--- purchase_requisition/purchase_requisition.py 2013-06-10 11:41:41 +0000
2220+++ purchase_requisition/purchase_requisition.py 2013-10-29 13:27:40 +0000
2221@@ -174,7 +174,7 @@
2222 _columns = {
2223 'product_id': fields.many2one('product.product', 'Product' ),
2224 'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure'),
2225- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
2226+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
2227 'requisition_id' : fields.many2one('purchase.requisition','Purchase Requisition', ondelete='cascade'),
2228 'company_id': fields.related('requisition_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
2229 }
2230
2231=== modified file 'report_intrastat/report/invoice.rml'
2232--- report_intrastat/report/invoice.rml 2012-11-29 22:26:45 +0000
2233+++ report_intrastat/report/invoice.rml 2013-10-29 13:27:40 +0000
2234@@ -360,10 +360,10 @@
2235 <para style="terp_default_8">[[ t.name ]]</para>
2236 </td>
2237 <td>
2238- <para style="terp_default_Right_8">[[ formatLang(t.base, digits=get_digits(dp='Account'), currency_obj = o.currency_id) ]]</para>
2239+ <para style="terp_default_Right_8">[[ formatLang(t.base, digits=get_digits(dp='Amount'), currency_obj = o.currency_id) ]]</para>
2240 </td>
2241 <td>
2242- <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
2243+ <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Amount'), currency_obj=o.currency_id) ]]</para>
2244 </td>
2245 <td>
2246 <para style="terp_default_8">
2247
2248=== modified file 'report_intrastat/report_intrastat.py'
2249--- report_intrastat/report_intrastat.py 2013-04-15 10:23:49 +0000
2250+++ report_intrastat/report_intrastat.py 2013-10-29 13:27:40 +0000
2251@@ -67,7 +67,7 @@
2252 'code': fields.char('Country code', size=2, readonly=True),
2253 'intrastat_id': fields.many2one('report.intrastat.code', 'Intrastat code', readonly=True),
2254 'weight': fields.float('Weight', readonly=True),
2255- 'value': fields.float('Value', readonly=True, digits_compute=dp.get_precision('Account')),
2256+ 'value': fields.float('Value', readonly=True, digits_compute=dp.get_precision('Amount')),
2257 'type': fields.selection([('import', 'Import'), ('export', 'Export')], 'Type'),
2258 'currency_id': fields.many2one('res.currency', "Currency", readonly=True),
2259 }
2260
2261=== modified file 'sale/report/sale_order.rml'
2262--- sale/report/sale_order.rml 2013-05-27 16:51:33 +0000
2263+++ sale/report/sale_order.rml 2013-10-29 13:27:40 +0000
2264@@ -251,13 +251,13 @@
2265 <para style="terp_default_Right_9">[[ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty) ]] [[ line.product_uos and line.product_uos.name or line.product_uom.name ]]</para>
2266 </td>
2267 <td>
2268- <para style="terp_default_Right_9">[[ formatLang(line.price_unit , digits=get_digits(dp='Product Price'))]]</para>
2269- </td>
2270- <td>
2271- <para style="terp_default_Centre_9">[[show_discount(user.id) and formatLang(line.discount, digits=get_digits(dp='Discount')) or '']]</para>
2272- </td>
2273- <td>
2274- <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]] </para>
2275+ <para style="terp_default_Right_9">[[ formatLang(line.price_unit , digits=get_digits(dp='Price'))]]</para>
2276+ </td>
2277+ <td>
2278+ <para style="terp_default_Centre_9">[[show_discount(user.id) and formatLang(line.discount, digits=get_digits(dp='Price')) or '']]</para>
2279+ </td>
2280+ <td>
2281+ <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Amount'), currency_obj=o.pricelist_id.currency_id) ]] </para>
2282 </td>
2283 </tr>
2284 </blockTable>
2285@@ -273,7 +273,7 @@
2286 <para style="terp_default_9">Net Total :</para>
2287 </td>
2288 <td>
2289- <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</para>
2290+ <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, dp='Amount', currency_obj=o.pricelist_id.currency_id) ]]</para>
2291 </td>
2292 </tr>
2293 <tr>
2294@@ -286,7 +286,7 @@
2295 <para style="terp_default_9">Taxes :</para>
2296 </td>
2297 <td>
2298- <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</para>
2299+ <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Amount', currency_obj=o.pricelist_id.currency_id) ]]</para>
2300 </td>
2301 </tr>
2302 <tr>
2303@@ -299,7 +299,7 @@
2304 <para style="terp_default_Bold_9"><b>Total :</b></para>
2305 </td>
2306 <td>
2307- <para style="terp_default_Right_9_Bold"><b>[[ formatLang(o.amount_total, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</b></para>
2308+ <para style="terp_default_Right_9_Bold"><b>[[ formatLang(o.amount_total, dp='Amount', currency_obj=o.pricelist_id.currency_id) ]]</b></para>
2309 </td>
2310 </tr>
2311 </blockTable>
2312
2313=== modified file 'sale/sale.py'
2314--- sale/sale.py 2013-09-23 17:13:10 +0000
2315+++ sale/sale.py 2013-10-29 13:27:40 +0000
2316@@ -198,19 +198,19 @@
2317 fnct_search=_invoiced_search, type='boolean', help="It indicates that sales order has at least one invoice."),
2318 'note': fields.text('Terms and conditions'),
2319
2320- 'amount_untaxed': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Untaxed Amount',
2321+ 'amount_untaxed': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Untaxed Amount',
2322 store={
2323 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
2324 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
2325 },
2326 multi='sums', help="The amount without tax.", track_visibility='always'),
2327- 'amount_tax': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Taxes',
2328+ 'amount_tax': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Taxes',
2329 store={
2330 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
2331 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
2332 },
2333 multi='sums', help="The tax amount."),
2334- 'amount_total': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Total',
2335+ 'amount_total': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Total',
2336 store={
2337 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
2338 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
2339@@ -677,18 +677,18 @@
2340 store={
2341 'account.invoice': (_order_lines_from_invoice, ['state'], 10),
2342 'sale.order.line': (lambda self,cr,uid,ids,ctx=None: ids, ['invoice_lines'], 10)}),
2343- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price'), readonly=True, states={'draft': [('readonly', False)]}),
2344+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price'), readonly=True, states={'draft': [('readonly', False)]}),
2345 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},
2346 help="From stock: When needed, the product is taken from the stock or we wait for replenishment.\nOn order: When needed, the product is purchased or produced."),
2347- 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),
2348+ 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Amount')),
2349 'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft': [('readonly', False)]}),
2350 'address_allotment_id': fields.many2one('res.partner', 'Allotment Partner',help="A partner to whom the particular product needs to be allotted."),
2351- 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product UoS'), required=True, readonly=True, states={'draft': [('readonly', False)]}),
2352+ 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True, readonly=True, states={'draft': [('readonly', False)]}),
2353 'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft': [('readonly', False)]}),
2354- 'product_uos_qty': fields.float('Quantity (UoS)' ,digits_compute= dp.get_precision('Product UoS'), readonly=True, states={'draft': [('readonly', False)]}),
2355+ 'product_uos_qty': fields.float('Quantity (UoS)' ,digits_compute= dp.get_precision('Quantity'), readonly=True, states={'draft': [('readonly', False)]}),
2356 'product_uos': fields.many2one('product.uom', 'Product UoS'),
2357- 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount'), readonly=True, states={'draft': [('readonly', False)]}),
2358- 'th_weight': fields.float('Weight', readonly=True, states={'draft': [('readonly', False)]}),
2359+ 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price'), readonly=True, states={'draft': [('readonly', False)]}),
2360+ 'th_weight': fields.float('Weight', readonly=True, digits_compute=dp.get_precision('Weight'), states={'draft': [('readonly', False)]}),
2361 'state': fields.selection([('cancel', 'Cancelled'),('draft', 'Draft'),('confirmed', 'Confirmed'),('exception', 'Exception'),('done', 'Done')], 'Status', required=True, readonly=True,
2362 help='* The \'Draft\' status is set when the related sales order in draft status. \
2363 \n* The \'Confirmed\' status is set when the related sales order is confirmed. \
2364@@ -755,7 +755,7 @@
2365 pu = 0.0
2366 if uosqty:
2367 pu = round(line.price_unit * line.product_uom_qty / uosqty,
2368- self.pool.get('decimal.precision').precision_get(cr, uid, 'Product Price'))
2369+ self.pool.get('decimal.precision').precision_get(cr, uid, 'Price'))
2370 fpos = line.order_id.fiscal_position or False
2371 account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id)
2372 if not account_id:
2373
2374=== modified file 'sale/wizard/sale_make_invoice_advance.py'
2375--- sale/wizard/sale_make_invoice_advance.py 2013-06-13 10:59:23 +0000
2376+++ sale/wizard/sale_make_invoice_advance.py 2013-10-29 13:27:40 +0000
2377@@ -39,7 +39,7 @@
2378 'product_id': fields.many2one('product.product', 'Advance Product',
2379 help="""Select a product of type service which is called 'Advance Product'.
2380 You may have to create it and set it as a default value on this field."""),
2381- 'amount': fields.float('Advance Amount', digits_compute= dp.get_precision('Account'),
2382+ 'amount': fields.float('Advance Amount', digits_compute= dp.get_precision('Amount'),
2383 help="The amount to be invoiced in advance."),
2384 }
2385
2386
2387=== modified file 'stock/product.py'
2388--- stock/product.py 2013-06-26 11:10:29 +0000
2389+++ stock/product.py 2013-10-29 13:27:40 +0000
2390@@ -358,7 +358,7 @@
2391 'reception_count': fields.function(_stock_move_count, string="Reception", type='integer', multi='pickings'),
2392 'delivery_count': fields.function(_stock_move_count, string="Delivery", type='integer', multi='pickings'),
2393 'qty_available': fields.function(_product_available, multi='qty_available',
2394- type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
2395+ type='float', digits_compute=dp.get_precision('Quantity'),
2396 string='Quantity On Hand',
2397 help="Current quantity of products.\n"
2398 "In a context with a single Stock Location, this includes "
2399@@ -371,7 +371,7 @@
2400 "Otherwise, this includes goods stored in any Stock Location "
2401 "with 'internal' type."),
2402 'virtual_available': fields.function(_product_available, multi='qty_available',
2403- type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
2404+ type='float', digits_compute=dp.get_precision('Quantity'),
2405 string='Forecasted Quantity',
2406 help="Forecast quantity (computed as Quantity On Hand "
2407 "- Outgoing + Incoming)\n"
2408@@ -385,7 +385,7 @@
2409 "Otherwise, this includes goods stored in any Stock Location "
2410 "with 'internal' type."),
2411 'incoming_qty': fields.function(_product_available, multi='qty_available',
2412- type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
2413+ type='float', digits_compute=dp.get_precision('Quantity'),
2414 string='Incoming',
2415 help="Quantity of products that are planned to arrive.\n"
2416 "In a context with a single Stock Location, this includes "
2417@@ -399,7 +399,7 @@
2418 "Otherwise, this includes goods arriving to any Stock "
2419 "Location with 'internal' type."),
2420 'outgoing_qty': fields.function(_product_available, multi='qty_available',
2421- type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
2422+ type='float', digits_compute=dp.get_precision('Quantity'),
2423 string='Outgoing',
2424 help="Quantity of products that are planned to leave.\n"
2425 "In a context with a single Stock Location, this includes "
2426
2427=== modified file 'stock/report/lot_overview.rml'
2428--- stock/report/lot_overview.rml 2012-11-29 22:26:45 +0000
2429+++ stock/report/lot_overview.rml 2013-10-29 13:27:40 +0000
2430@@ -181,10 +181,10 @@
2431 <para style="terp_default_Right_9">[[formatLang( p['prod_qty']) ]] [[ p['uom'] ]]</para>
2432 </td>
2433 <td>
2434- <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Account') ]]</para>
2435+ <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Amount') ]]</para>
2436 </td>
2437 <td>
2438- <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Account', currency_obj = o.company_id.currency_id)]]</para>
2439+ <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Amount', currency_obj = o.company_id.currency_id)]]</para>
2440 </td>
2441 </tr>
2442 </blockTable>
2443@@ -198,7 +198,7 @@
2444 <para style="terp_default_Bold_9">Total:</para>
2445 </td>
2446 <td>
2447- <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>
2448+ <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
2449 </td>
2450 </tr>
2451 </blockTable>
2452@@ -215,7 +215,7 @@
2453 </para>
2454 </td>
2455 <td>
2456- <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>
2457+ <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
2458 </td>
2459 </tr>
2460 </blockTable>
2461
2462=== modified file 'stock/report/lot_overview_all.rml'
2463--- stock/report/lot_overview_all.rml 2012-11-29 22:26:45 +0000
2464+++ stock/report/lot_overview_all.rml 2013-10-29 13:27:40 +0000
2465@@ -181,10 +181,10 @@
2466 <para style="terp_default_Right_9">[[formatLang( p['prod_qty']) ]] [[ p['uom'] ]]</para>
2467 </td>
2468 <td>
2469- <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Account') ]]</para>
2470+ <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Amount') ]]</para>
2471 </td>
2472 <td>
2473- <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Account', currency_obj = o.company_id.currency_id)]]</para>
2474+ <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Amount', currency_obj = o.company_id.currency_id)]]</para>
2475 </td>
2476 </tr>
2477 </blockTable>
2478@@ -198,7 +198,7 @@
2479 <para style="terp_default_Bold_9">Total:</para>
2480 </td>
2481 <td>
2482- <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>
2483+ <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
2484 </td>
2485 </tr>
2486 </blockTable>
2487@@ -215,7 +215,7 @@
2488 </para>
2489 </td>
2490 <td>
2491- <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>
2492+ <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
2493 </td>
2494 </tr>
2495 </blockTable>
2496
2497=== modified file 'stock/report/report_stock_move.py'
2498--- stock/report/report_stock_move.py 2013-04-15 10:23:49 +0000
2499+++ stock/report/report_stock_move.py 2013-10-29 13:27:40 +0000
2500@@ -48,9 +48,9 @@
2501 'product_qty_in':fields.integer('In Qty',readonly=True),
2502 'product_qty_out':fields.integer('Out Qty',readonly=True),
2503 'value' : fields.float('Total Value', required=True),
2504- 'day_diff2':fields.float('Lag (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),
2505- 'day_diff1':fields.float('Planned Lead Time (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),
2506- 'day_diff':fields.float('Execution Lead Time (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),
2507+ 'day_diff2':fields.float('Lag (Days)',readonly=True, group_operator="avg"),
2508+ 'day_diff1':fields.float('Planned Lead Time (Days)',readonly=True, group_operator="avg"),
2509+ 'day_diff':fields.float('Execution Lead Time (Days)',readonly=True, group_operator="avg"),
2510 'stock_journal': fields.many2one('stock.journal','Stock Journal', select=True),
2511
2512
2513@@ -160,8 +160,8 @@
2514 'location_id': fields.many2one('stock.location', 'Location', readonly=True),
2515 'prodlot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True),
2516 'company_id': fields.many2one('res.company', 'Company', readonly=True),
2517- 'product_qty':fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True),
2518- 'value' : fields.float('Total Value', digits_compute=dp.get_precision('Account'), required=True),
2519+ 'product_qty':fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), readonly=True),
2520+ 'value' : fields.float('Total Value', digits_compute=dp.get_precision('Amount'), required=True),
2521 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', readonly=True, select=True,
2522 help='When the stock move is created it is in the \'Draft\' state.\n After that it is set to \'Confirmed\' state.\n If stock is available state is set to \'Avaiable\'.\n When the picking it done the state is \'Done\'.\
2523 \nThe state is \'Waiting\' if the move is waiting for another one.'),
2524
2525=== modified file 'stock/res_config.py'
2526--- stock/res_config.py 2013-09-17 13:08:14 +0000
2527+++ stock/res_config.py 2013-10-29 13:27:40 +0000
2528@@ -73,12 +73,12 @@
2529 }
2530
2531 def get_default_dp(self, cr, uid, fields, context=None):
2532- dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_stock_weight')
2533+ dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_weight')
2534 return {'decimal_precision': dp.digits}
2535
2536 def set_default_dp(self, cr, uid, ids, context=None):
2537 config = self.browse(cr, uid, ids[0], context)
2538- dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_stock_weight')
2539+ dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_weight')
2540 dp.write({'digits': config.decimal_precision})
2541
2542 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2543
2544=== modified file 'stock/stock.py'
2545--- stock/stock.py 2013-10-18 12:58:18 +0000
2546+++ stock/stock.py 2013-10-29 13:27:40 +0000
2547@@ -200,8 +200,8 @@
2548
2549 'parent_left': fields.integer('Left Parent', select=1),
2550 'parent_right': fields.integer('Right Parent', select=1),
2551- 'stock_real_value': fields.function(_product_value, type='float', string='Real Stock Value', multi="stock", digits_compute=dp.get_precision('Account')),
2552- 'stock_virtual_value': fields.function(_product_value, type='float', string='Virtual Stock Value', multi="stock", digits_compute=dp.get_precision('Account')),
2553+ 'stock_real_value': fields.function(_product_value, type='float', string='Real Stock Value', multi="stock", digits_compute=dp.get_precision('Amount')),
2554+ 'stock_virtual_value': fields.function(_product_value, type='float', string='Virtual Stock Value', multi="stock", digits_compute=dp.get_precision('Amount')),
2555 'company_id': fields.many2one('res.company', 'Company', select=1, help='Let this field empty if this location is shared between all companies'),
2556 'scrap_location': fields.boolean('Scrap Location', help='Check this box to allow using this location to put scrapped/damaged goods.'),
2557 'valuation_in_account_id': fields.many2one('account.account', 'Stock Valuation Account (Incoming)', domain = [('type','=','other')],
2558@@ -1468,7 +1468,7 @@
2559 'date': fields.datetime('Creation Date', required=True),
2560 'stock_available': fields.function(_get_stock, fnct_search=_stock_search, type="float", string="Available", select=True,
2561 help="Current quantity of products with this Serial Number available in company warehouses",
2562- digits_compute=dp.get_precision('Product Unit of Measure')),
2563+ digits_compute=dp.get_precision('Quantity')),
2564 'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'),
2565 'company_id': fields.many2one('res.company', 'Company', select=True),
2566 'move_ids': fields.one2many('stock.move', 'prodlot_id', 'Moves for this serial number', readonly=True),
2567@@ -1607,7 +1607,7 @@
2568 'date_expected': fields.datetime('Scheduled Date', states={'done': [('readonly', True)]},required=True, select=True, help="Scheduled date for the processing of this move"),
2569 'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type','<>','service')],states={'done': [('readonly', True)]}),
2570
2571- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'),
2572+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'),
2573 required=True,states={'done': [('readonly', True)]},
2574 help="This is the quantity of products from an inventory "
2575 "point of view. For moves in the state 'done', this is the "
2576@@ -1618,7 +1618,7 @@
2577 "the product reservation, and should be done with care."
2578 ),
2579 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True,states={'done': [('readonly', True)]}),
2580- 'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Product Unit of Measure'), states={'done': [('readonly', True)]}),
2581+ 'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Quantity'), states={'done': [('readonly', True)]}),
2582 'product_uos': fields.many2one('product.uom', 'Product UOS', states={'done': [('readonly', True)]}),
2583 'product_packaging': fields.many2one('product.packaging', 'Packaging', help="It specifies attributes of packaging like type, quantity of packaging,etc."),
2584
2585@@ -1648,7 +1648,7 @@
2586 "* Waiting Availability: This state is reached when the procurement resolution is not straight forward. It may need the scheduler to run, a component to me manufactured...\n"\
2587 "* Available: When products are reserved, it is set to \'Available\'.\n"\
2588 "* Done: When the shipment is processed, the state is \'Done\'."),
2589- 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Product Price'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"),
2590+ 'price_unit': fields.float('Unit Price', digits_compute=dp.get_precision('Amount'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"),
2591 'price_currency_id': fields.many2one('res.currency', 'Currency for average price', help="Technical field used to record the currency chosen by the user during a picking confirmation (when average price costing method is used)"),
2592 'company_id': fields.many2one('res.company', 'Company', required=True, select=True),
2593 'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order of", select=True),
2594@@ -2896,7 +2896,7 @@
2595 'location_id': fields.many2one('stock.location', 'Location', required=True),
2596 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
2597 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
2598- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
2599+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
2600 'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True, readonly=True),
2601 'prod_lot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
2602 'state': fields.related('inventory_id','state',type='char',string='Status',readonly=True),
2603
2604=== modified file 'stock/stock_data.xml'
2605--- stock/stock_data.xml 2012-11-29 22:26:45 +0000
2606+++ stock/stock_data.xml 2013-10-29 13:27:40 +0000
2607@@ -151,12 +151,6 @@
2608 <field eval="'stock.location,'+str(location_production)" name="value"/>
2609 </record>
2610
2611-
2612- <record forcecreate="True" id="decimal_shipping_delay" model="decimal.precision">
2613- <field name="name">Shipping Delay</field>
2614- <field name="digits" eval="2"/>
2615- </record>
2616-
2617 <!--
2618 Resource: stock.warehouse
2619 -->
2620
2621=== modified file 'stock/wizard/stock_change_product_qty.py'
2622--- stock/wizard/stock_change_product_qty.py 2013-08-01 14:21:19 +0000
2623+++ stock/wizard/stock_change_product_qty.py 2013-10-29 13:27:40 +0000
2624@@ -29,7 +29,7 @@
2625 _description = "Change Product Quantity"
2626 _columns = {
2627 'product_id' : fields.many2one('product.product', 'Product'),
2628- 'new_quantity': fields.float('New Quantity on Hand', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, help='This quantity is expressed in the Default Unit of Measure of the product.'),
2629+ 'new_quantity': fields.float('New Quantity on Hand', digits_compute=dp.get_precision('Quantity'), required=True, help='This quantity is expressed in the Default Unit of Measure of the product.'),
2630 'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
2631 'location_id': fields.many2one('stock.location', 'Location', required=True, domain="[('usage', '=', 'internal')]"),
2632 }
2633
2634=== modified file 'stock/wizard/stock_change_standard_price.py'
2635--- stock/wizard/stock_change_standard_price.py 2013-09-17 12:21:02 +0000
2636+++ stock/wizard/stock_change_standard_price.py 2013-10-29 13:27:40 +0000
2637@@ -27,7 +27,7 @@
2638 _name = "stock.change.standard.price"
2639 _description = "Change Standard Price"
2640 _columns = {
2641- 'new_price': fields.float('Price', required=True, digits_compute=dp.get_precision('Product Price'),
2642+ 'new_price': fields.float('Price', required=True, digits_compute=dp.get_precision('Amount'),
2643 help="If cost price is increased, stock variation account will be debited "
2644 "and stock output account will be credited with the value = (difference of amount * quantity available).\n"
2645 "If cost price is decreased, stock variation account will be creadited and stock input account will be debited."),
2646
2647=== modified file 'stock/wizard/stock_move.py'
2648--- stock/wizard/stock_move.py 2013-04-15 10:23:49 +0000
2649+++ stock/wizard/stock_move.py 2013-10-29 13:27:40 +0000
2650@@ -29,7 +29,7 @@
2651
2652 _columns = {
2653 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
2654- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
2655+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
2656 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
2657 'location_id': fields.many2one('stock.location', 'Location', required=True)
2658 }
2659@@ -163,7 +163,7 @@
2660 return res
2661
2662 _columns = {
2663- 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
2664+ 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
2665 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
2666 'product_uom': fields.many2one('product.uom', 'Unit of Measure'),
2667 'line_ids': fields.one2many('stock.move.split.lines', 'wizard_id', 'Serial Numbers'),
2668@@ -259,7 +259,7 @@
2669 _description = "Stock move Split lines"
2670 _columns = {
2671 'name': fields.char('Serial Number', size=64),
2672- 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
2673+ 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
2674 'wizard_id': fields.many2one('stock.move.split', 'Parent Wizard'),
2675 'wizard_exist_id': fields.many2one('stock.move.split', 'Parent Wizard (for existing lines)'),
2676 'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number'),
2677
2678=== modified file 'stock/wizard/stock_partial_picking.py'
2679--- stock/wizard/stock_partial_picking.py 2013-06-14 09:19:24 +0000
2680+++ stock/wizard/stock_partial_picking.py 2013-10-29 13:27:40 +0000
2681@@ -43,7 +43,7 @@
2682 _rec_name = 'product_id'
2683 _columns = {
2684 'product_id' : fields.many2one('product.product', string="Product", required=True, ondelete='CASCADE'),
2685- 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
2686+ 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Quantity'), required=True),
2687 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True, ondelete='CASCADE'),
2688 'prodlot_id' : fields.many2one('stock.production.lot', 'Serial Number', ondelete='CASCADE'),
2689 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete='CASCADE', domain = [('usage','<>','view')]),
2690
2691=== modified file 'stock/wizard/stock_return_picking.py'
2692--- stock/wizard/stock_return_picking.py 2013-09-10 12:21:13 +0000
2693+++ stock/wizard/stock_return_picking.py 2013-10-29 13:27:40 +0000
2694@@ -31,7 +31,7 @@
2695
2696 _columns = {
2697 'product_id' : fields.many2one('product.product', string="Product", required=True),
2698- 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
2699+ 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Quantity'), required=True),
2700 'wizard_id' : fields.many2one('stock.return.picking', string="Wizard"),
2701 'move_id' : fields.many2one('stock.move', "Move"),
2702 'prodlot_id': fields.related('move_id', 'prodlot_id', type='many2one', relation='stock.production.lot', string='Serial Number', readonly=True),
2703
2704=== modified file 'stock/wizard/stock_splitinto.py'
2705--- stock/wizard/stock_splitinto.py 2013-04-15 10:23:49 +0000
2706+++ stock/wizard/stock_splitinto.py 2013-10-29 13:27:40 +0000
2707@@ -27,7 +27,7 @@
2708 _name = "stock.split.into"
2709 _description = "Split into"
2710 _columns = {
2711- 'quantity': fields.float('Quantity',digits_compute=dp.get_precision('Product Unit of Measure')),
2712+ 'quantity': fields.float('Quantity',digits_compute=dp.get_precision('Quantity')),
2713 }
2714 _defaults = {
2715 'quantity': lambda *x: 0,

Subscribers

People subscribed via source and target branches

to all changes: