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

Proposed by Jaydeep Barot(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-decimal-rounding-fix-jar
Merge into: lp:openobject-addons
Diff against target: 3141 lines (+1070/-378)
88 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_invoice_report.py (+3/-3)
account/report/account_treasury_report.py (+2/-2)
account/res_config.py (+2/-2)
account/test/price_accuracy00.yml (+2/-2)
account/views/report_generalledger.xml (+15/-15)
account/wizard/account_reconcile.py (+4/-4)
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/views/report_analyticaccountbudget.xml (+9/-9)
account_budget/views/report_budget.xml (+9/-9)
account_budget/views/report_crossoveredbudget.xml (+14/-14)
account_followup/account_followup.py (+1/-1)
account_followup/wizard/account_followup_print.py (+2/-1)
account_payment/account_payment.py (+3/-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/-14)
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 (+19/-19)
payment/models/payment_acquirer.py (+1/-1)
point_of_sale/point_of_sale.py (+10/-10)
point_of_sale/report/account_statement.rml.THIS (+285/-0)
point_of_sale/report/pos_details.rml.THIS (+400/-0)
point_of_sale/static/src/js/models.js (+1/-1)
procurement/procurement.py (+1/-1)
product/pricelist.py (+5/-5)
product/product.py (+18/-18)
product/product_data.xml (+16/-0)
product/report/product_pricelist.py (+1/-1)
purchase/purchase.py (+6/-6)
purchase_requisition/purchase_requisition.py (+1/-1)
report_intrastat/report_intrastat.py (+1/-1)
sale/sale.py (+9/-9)
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 (+2/-2)
stock/wizard/stock_return_picking.py (+1/-1)
stock/wizard/stock_splitinto.py (+1/-1)
website_quote/models/order.py (+10/-10)
website_sale_delivery/models/sale_order.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-decimal-rounding-fix-jar
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+217404@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,
Jaydeep Barot (JAR)

To post a comment you must log in.
9385. By Jaydeep Barot(OpenERP)

[MERGE] Merge with addons.

Unmerged revisions

9385. By Jaydeep Barot(OpenERP)

[MERGE] Merge with addons.

9384. By Jaydeep Barot(OpenERP)

[IMP] change decimal precision.

9383. By Jaydeep Barot(OpenERP)

[IMP] Create a new Data File in decimal_precision module and Improvement in Decimal Precision

9382. By Jaydeep Barot(OpenERP)

[IMP] change decimal Precision in account module

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 2014-04-24 13:45:33 +0000
3+++ account/account.py 2014-05-02 07:31:45 +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@@ -1240,11 +1240,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@@ -1735,7 +1735,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@@ -1842,7 +1842,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@@ -2086,15 +2086,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@@ -2137,7 +2137,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@@ -2233,7 +2233,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@@ -2362,9 +2362,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-10-27 12:31:04 +0000
128+++ account/account_analytic_line.py 2014-05-02 07:31:45 +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 2014-02-10 06:46:42 +0000
141+++ account/account_bank_statement.py 2014-05-02 07:31:45 +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)]}, help="Computed using the cash control lines"),
152 'balance_end': fields.function(_end_balance,
153 store = {
154@@ -553,7 +553,7 @@
155 _columns = {
156 'name': fields.char('Description', required=True),
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 2014-01-02 11:30:09 +0000
166+++ account/account_cash_statement.py 2014-05-02 07:31:45 +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@@ -349,7 +349,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 2014-04-30 12:50:33 +0000
194+++ account/account_invoice.py 2014-05-02 07:31:45 +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@@ -1360,7 +1360,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@@ -1419,11 +1419,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@@ -1661,14 +1661,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 2014-05-01 15:56:33 +0000
297+++ account/account_move_line.py 2014-05-02 07:31:45 +0000
298@@ -446,11 +446,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@@ -460,7 +460,7 @@
314 'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),
315 'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref', store={
316 'account.move.line': (lambda self, cr, uid, ids, c={}: ids, ['reconcile_id','reconcile_partial_id'], 50),'account.move.reconcile': (_get_move_from_reconcile, None, 50)}),
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@@ -485,7 +485,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-12-18 15:57:15 +0000
334+++ account/data/account_data.xml 2014-05-02 07:31:45 +0000
335@@ -41,11 +41,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 2014-04-09 10:30:45 +0000
350+++ account/report/account_entries_report.py 2014-05-02 07:31:45 +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_invoice_report.py'
362--- account/report/account_invoice_report.py 2014-01-29 16:03:48 +0000
363+++ account/report/account_invoice_report.py 2014-05-02 07:31:45 +0000
364@@ -69,9 +69,9 @@
365 'company_id': fields.many2one('res.company', 'Company', readonly=True),
366 'user_id': fields.many2one('res.users', 'Salesperson', readonly=True),
367 'price_total': fields.float('Total Without Tax', readonly=True),
368- '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"),
369+ '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"),
370 'price_average': fields.float('Average Price', readonly=True, group_operator="avg"),
371- '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"),
372+ '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"),
373 'currency_rate': fields.float('Currency Rate', readonly=True),
374 'nbr':fields.integer('# of Lines', readonly=True),
375 'type': fields.selection([
376@@ -93,7 +93,7 @@
377 'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True),
378 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
379 'residual': fields.float('Total Residual', readonly=True),
380- 'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),
381+ 'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Amount'), multi="_compute_amounts"),
382 'country_id': fields.many2one('res.country', 'Country of the Partner Company'),
383 }
384 _order = 'date desc'
385
386=== modified file 'account/report/account_treasury_report.py'
387--- account/report/account_treasury_report.py 2013-10-27 12:31:04 +0000
388+++ account/report/account_treasury_report.py 2014-05-02 07:31:45 +0000
389@@ -47,8 +47,8 @@
390 'credit': fields.float('Credit', readonly=True),
391 'balance': fields.float('Balance', readonly=True),
392 'date': fields.date('Beginning of Period Date', readonly=True),
393- 'starting_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Account'), string='Starting Balance', multi='balance'),
394- 'ending_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Account'), string='Ending Balance', multi='balance'),
395+ 'starting_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Amount'), string='Starting Balance', multi='balance'),
396+ 'ending_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Amount'), string='Ending Balance', multi='balance'),
397 'company_id': fields.many2one('res.company', 'Company', readonly=True),
398 }
399
400
401=== modified file 'account/res_config.py'
402--- account/res_config.py 2014-04-23 11:40:53 +0000
403+++ account/res_config.py 2014-05-02 07:31:45 +0000
404@@ -340,12 +340,12 @@
405 fiscalyear.create_period3(cr, uid, [fiscalyear_id])
406
407 def get_default_dp(self, cr, uid, fields, context=None):
408- dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
409+ dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_amount')
410 return {'decimal_precision': dp.digits}
411
412 def set_default_dp(self, cr, uid, ids, context=None):
413 config = self.browse(cr, uid, ids[0], context)
414- dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
415+ dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_amount')
416 dp.write({'digits': config.decimal_precision})
417
418 def onchange_analytic_accounting(self, cr, uid, ids, analytic_accounting, context=None):
419
420=== modified file 'account/test/price_accuracy00.yml'
421--- account/test/price_accuracy00.yml 2012-11-29 22:26:45 +0000
422+++ account/test/price_accuracy00.yml 2014-05-02 07:31:45 +0000
423@@ -6,7 +6,7 @@
424 Given the price accuracy for the account module is configured with two
425 digits
426 -
427- !record {model: decimal.precision, id: product.decimal_account}:
428+ !record {model: decimal.precision, id: product.decimal_amount}:
429 digits: 2
430 -
431 And we have a tax defined
432@@ -61,7 +61,7 @@
433 -
434 Then, I change the precision of numbers to 3 digits.
435 -
436- !record {model: decimal.precision, id: product.decimal_account}:
437+ !record {model: decimal.precision, id: product.decimal_amount}:
438 digits: 3
439 -
440 And I create another invoice with the same content.
441
442=== modified file 'account/views/report_generalledger.xml'
443--- account/views/report_generalledger.xml 2014-03-27 18:25:20 +0000
444+++ account/views/report_generalledger.xml 2014-05-02 07:31:45 +0000
445@@ -87,16 +87,16 @@
446 <span t-esc="childrenaccount['name']"/>
447 </td>
448 <td class="text-right">
449- <span t-esc="formatLang(sum_debit_account(childrenaccount), digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>
450- </td>
451- <td class="text-right">
452- <span t-esc="formatLang(sum_credit_account(childrenaccount), digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>
453- </td>
454- <td class="text-right">
455- <span t-esc="formatLang(sum_balance_account(childrenaccount), digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>
456+ <span t-esc="formatLang(sum_debit_account(childrenaccount), digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
457+ </td>
458+ <td class="text-right">
459+ <span t-esc="formatLang(sum_credit_account(childrenaccount), digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
460+ </td>
461+ <td class="text-right">
462+ <span t-esc="formatLang(sum_balance_account(childrenaccount), digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
463 </td>
464 <td class="text-right" t-if="data['form']['amount_currency']">
465- <span t-esc="formatLang(sum_currency_amount_account(childrenaccount), digits=get_digits(dp='Account'), currency_obj=res_company.currency_id) if sum_currency_amount_account(childrenaccount) > 0.00 else ''"/>
466+ <span t-esc="formatLang(sum_currency_amount_account(childrenaccount), digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id) if sum_currency_amount_account(childrenaccount) > 0.00 else ''"/>
467 </td>
468 </tr>
469 <tr t-foreach="lines(childrenaccount)" t-as="line">
470@@ -108,13 +108,13 @@
471 <td><span t-esc="line['lname']"/></td>
472 <td><span t-esc="line['line_corresp'].replace(',',', ')"/></td>
473 <td class="text-right">
474- <span t-esc="formatLang(line['debit'], digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>
475- </td>
476- <td class="text-right">
477- <span t-esc="formatLang(line['credit'], digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>
478- </td>
479- <td class="text-right">
480- <span t-esc="formatLang(line['progress'], digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>
481+ <span t-esc="formatLang(line['debit'], digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
482+ </td>
483+ <td class="text-right">
484+ <span t-esc="formatLang(line['credit'], digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
485+ </td>
486+ <td class="text-right">
487+ <span t-esc="formatLang(line['progress'], digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
488 </td>
489 <td class="text-right" t-if="data['form']['amount_currency']">
490 <span t-esc="formatLang(line['amount_currency'], currency_obj=res_company.currency_id) if line['amount_currency'] > 0.00 else ''"/>
491
492=== modified file 'account/wizard/account_reconcile.py'
493--- account/wizard/account_reconcile.py 2014-01-29 18:47:03 +0000
494+++ account/wizard/account_reconcile.py 2014-05-02 07:31:45 +0000
495@@ -34,9 +34,9 @@
496 _description = 'Account move line reconcile'
497 _columns = {
498 'trans_nbr': fields.integer('# of Transaction', readonly=True),
499- 'credit': fields.float('Credit amount', readonly=True, digits_compute=dp.get_precision('Account')),
500- 'debit': fields.float('Debit amount', readonly=True, digits_compute=dp.get_precision('Account')),
501- 'writeoff': fields.float('Write-Off amount', readonly=True, digits_compute=dp.get_precision('Account')),
502+ 'credit': fields.float('Credit amount', readonly=True, digits_compute=dp.get_precision('Amount')),
503+ 'debit': fields.float('Debit amount', readonly=True, digits_compute=dp.get_precision('Amount')),
504+ 'writeoff': fields.float('Write-Off amount', readonly=True, digits_compute=dp.get_precision('Amount')),
505 }
506
507 def default_get(self, cr, uid, fields, context=None):
508@@ -65,7 +65,7 @@
509 credit += line.credit
510 debit += line.debit
511 account_id = line.account_id.id
512- precision = self.pool['decimal.precision'].precision_get(cr, uid, 'Account')
513+ precision = self.pool['decimal.precision'].precision_get(cr, uid, 'Amount')
514 writeoff = float_round(debit-credit, precision_digits=precision)
515 credit = float_round(credit, precision_digits=precision)
516 debit = float_round(debit, precision_digits=precision)
517
518=== modified file 'account/wizard/pos_box.py'
519--- account/wizard/pos_box.py 2013-12-27 15:35:17 +0000
520+++ account/wizard/pos_box.py 2014-05-02 07:31:45 +0000
521@@ -9,7 +9,7 @@
522 # Attention, we don't set a domain, because there is a journal_type key
523 # in the context of the action
524 'amount' : fields.float('Amount',
525- digits_compute = dp.get_precision('Account'),
526+ digits_compute = dp.get_precision('Amount'),
527 required=True),
528 }
529
530
531=== modified file 'account_analytic_analysis/account_analytic_analysis.py'
532--- account_analytic_analysis/account_analytic_analysis.py 2014-04-29 11:27:38 +0000
533+++ account_analytic_analysis/account_analytic_analysis.py 2014-05-02 07:31:45 +0000
534@@ -49,10 +49,10 @@
535 'product_id': fields.many2one('product.product','Product',required=True),
536 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
537 'name': fields.text('Description', required=True),
538- 'quantity': fields.float('Quantity', required=True),
539+ 'quantity': fields.float('Quantity', required=True, digits_compute=dp.get_precision('Quantity')),
540 'uom_id': fields.many2one('product.uom', 'Unit of Measure',required=True),
541- 'price_unit': fields.float('Unit Price', required=True),
542- 'price_subtotal': fields.function(_amount_line, string='Sub Total', type="float",digits_compute= dp.get_precision('Account')),
543+ 'price_unit': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Price')),
544+ 'price_subtotal': fields.function(_amount_line, string='Sub Total', type="float",digits_compute= dp.get_precision('Amount')),
545 }
546 _defaults = {
547 'quantity' : 1,
548@@ -453,16 +453,16 @@
549 }),
550 'ca_invoiced': fields.function(_ca_invoiced_calc, type='float', string='Invoiced Amount',
551 help="Total customer invoiced amount for this account.",
552- digits_compute=dp.get_precision('Account')),
553+ digits_compute=dp.get_precision('Amount')),
554 'total_cost': fields.function(_total_cost_calc, type='float', string='Total Costs',
555 help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets.",
556- digits_compute=dp.get_precision('Account')),
557+ digits_compute=dp.get_precision('Amount')),
558 'ca_to_invoice': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Uninvoiced Amount',
559 help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs.",
560- digits_compute=dp.get_precision('Account')),
561+ digits_compute=dp.get_precision('Amount')),
562 'ca_theorical': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Theoretical Revenue',
563 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.",
564- digits_compute=dp.get_precision('Account')),
565+ digits_compute=dp.get_precision('Amount')),
566 'hours_quantity': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Total Worked Time',
567 help="Number of time you spent on the analytic account (from timesheet). It computes quantities on all journal of type 'general'."),
568 'last_invoice_date': fields.function(_analysis_all, multi='analytic_analysis', type='date', string='Last Invoice Date',
569@@ -485,19 +485,19 @@
570 help="Sum of timesheet lines invoiced for this contract."),
571 'remaining_ca': fields.function(_remaining_ca_calc, type='float', string='Remaining Revenue',
572 help="Computed using the formula: Max Invoice Price - Invoiced Amount.",
573- digits_compute=dp.get_precision('Account')),
574+ digits_compute=dp.get_precision('Amount')),
575 'revenue_per_hour': fields.function(_revenue_per_hour_calc, type='float', string='Revenue per Time (real)',
576 help="Computed using the formula: Invoiced Amount / Total Time",
577- digits_compute=dp.get_precision('Account')),
578+ digits_compute=dp.get_precision('Amount')),
579 'real_margin': fields.function(_real_margin_calc, type='float', string='Real Margin',
580 help="Computed using the formula: Invoiced Amount - Total Costs.",
581- digits_compute=dp.get_precision('Account')),
582+ digits_compute=dp.get_precision('Amount')),
583 'theorical_margin': fields.function(_theorical_margin_calc, type='float', string='Theoretical Margin',
584 help="Computed using the formula: Theoretical Revenue - Total Costs",
585- digits_compute=dp.get_precision('Account')),
586+ digits_compute=dp.get_precision('Amount')),
587 'real_margin_rate': fields.function(_real_margin_rate_calc, type='float', string='Real Margin Rate (%)',
588 help="Computes using the formula: (Real Margin / Total Costs) * 100.",
589- digits_compute=dp.get_precision('Account')),
590+ digits_compute=dp.get_precision('Amount')),
591 'fix_price_invoices' : fields.boolean('Fixed Price'),
592 'invoice_on_timesheets' : fields.boolean("On Timesheets"),
593 'month_ids': fields.function(_analysis_all, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'),
594
595=== modified file 'account_asset/account_asset.py'
596--- account_asset/account_asset.py 2014-04-10 11:04:24 +0000
597+++ account_asset/account_asset.py 2014-05-02 07:31:45 +0000
598@@ -242,7 +242,7 @@
599 'account_move_line_ids': fields.one2many('account.move.line', 'asset_id', 'Entries', readonly=True, states={'draft':[('readonly',False)]}),
600 'name': fields.char('Asset Name', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),
601 'code': fields.char('Reference', size=32, readonly=True, states={'draft':[('readonly',False)]}),
602- 'purchase_value': fields.float('Gross Value', required=True, readonly=True, states={'draft':[('readonly',False)]}),
603+ 'purchase_value': fields.float('Gross Value', required=True, digits_compute=dp.get_precision('Amount'), readonly=True, states={'draft':[('readonly',False)]}),
604 'currency_id': fields.many2one('res.currency','Currency',required=True, readonly=True, states={'draft':[('readonly',False)]}),
605 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
606 'note': fields.text('Note'),
607@@ -263,7 +263,7 @@
608 '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"),
609 'method_end': fields.date('Ending Date', readonly=True, states={'draft':[('readonly',False)]}),
610 'method_progress_factor': fields.float('Degressive Factor', readonly=True, states={'draft':[('readonly',False)]}),
611- 'value_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual Value'),
612+ 'value_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Amount'), string='Residual Value'),
613 'method_time': fields.selection([('number','Number of Depreciations'),('end','Ending Date')], 'Time Method', required=True, readonly=True, states={'draft':[('readonly',False)]},
614 help="Choose the method to use to compute the dates and number of depreciation lines.\n"\
615 " * Number of Depreciations: Fix the number of depreciation lines and the time between 2 depreciations.\n" \
616@@ -271,7 +271,7 @@
617 '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'),
618 'history_ids': fields.one2many('account.asset.history', 'asset_id', 'History', readonly=True),
619 'depreciation_line_ids': fields.one2many('account.asset.depreciation.line', 'asset_id', 'Depreciation Lines', readonly=True, states={'draft':[('readonly',False)],'open':[('readonly',False)]}),
620- '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)]}),
621+ '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)]}),
622 }
623 _defaults = {
624 'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'account.asset.code'),
625@@ -377,9 +377,9 @@
626 'sequence': fields.integer('Sequence', required=True),
627 'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True, ondelete='cascade'),
628 'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),
629- 'amount': fields.float('Current Depreciation', digits_compute=dp.get_precision('Account'), required=True),
630- 'remaining_value': fields.float('Next Period Depreciation', digits_compute=dp.get_precision('Account'),required=True),
631- 'depreciated_value': fields.float('Amount Already Depreciated', required=True),
632+ 'amount': fields.float('Current Depreciation', digits_compute=dp.get_precision('Amount'), required=True),
633+ 'remaining_value': fields.float('Next Period Depreciation', digits_compute=dp.get_precision('Amount'), required=True),
634+ 'depreciated_value': fields.float('Amount Already Depreciated', digits_compute=dp.get_precision('Amount'), required=True),
635 'depreciation_date': fields.date('Depreciation Date', select=1),
636 'move_id': fields.many2one('account.move', 'Depreciation Entry'),
637 'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True)
638
639=== modified file 'account_bank_statement_extensions/account_bank_statement.py'
640--- account_bank_statement_extensions/account_bank_statement.py 2013-10-27 12:31:04 +0000
641+++ account_bank_statement_extensions/account_bank_statement.py 2014-05-02 07:31:45 +0000
642@@ -71,7 +71,7 @@
643 ('coda', 'CODA'),
644 ('manual', 'Manual'),
645 ], 'Type', required=True),
646- 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
647+ 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
648 'bank_statement_line_ids': fields.one2many('account.bank.statement.line', 'globalisation_id', 'Bank Statement Lines'),
649 }
650 _rec_name = 'code'
651
652=== modified file 'account_budget/account_budget.py'
653--- account_budget/account_budget.py 2014-04-11 14:28:00 +0000
654+++ account_budget/account_budget.py 2014-05-02 07:31:45 +0000
655@@ -193,9 +193,9 @@
656 'date_from': fields.date('Start Date', required=True),
657 'date_to': fields.date('End Date', required=True),
658 'paid_date': fields.date('Paid Date'),
659- 'planned_amount':fields.float('Planned Amount', required=True, digits_compute=dp.get_precision('Account')),
660- 'practical_amount':fields.function(_prac, string='Practical Amount', type='float', digits_compute=dp.get_precision('Account')),
661- 'theoritical_amount':fields.function(_theo, string='Theoretical Amount', type='float', digits_compute=dp.get_precision('Account')),
662+ 'planned_amount':fields.float('Planned Amount', required=True, digits_compute=dp.get_precision('Amount')),
663+ 'practical_amount':fields.function(_prac, string='Practical Amount', type='float', digits_compute=dp.get_precision('Amount')),
664+ 'theoritical_amount':fields.function(_theo, string='Theoretical Amount', type='float', digits_compute=dp.get_precision('Amount')),
665 'percentage':fields.function(_perc, string='Percentage', type='float'),
666 'company_id': fields.related('crossovered_budget_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
667 }
668
669=== modified file 'account_budget/views/report_analyticaccountbudget.xml'
670--- account_budget/views/report_analyticaccountbudget.xml 2014-03-27 18:25:20 +0000
671+++ account_budget/views/report_analyticaccountbudget.xml 2014-05-02 07:31:45 +0000
672@@ -38,24 +38,24 @@
673 <t t-foreach="funct(o, data['form'])" t-as="line">
674 <tr t-if="line['status'] == 1">
675 <td><strong t-esc="line['name']"/></td>
676- <td class="text-right"><strong t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>
677- <td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
678- <td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
679+ <td class="text-right"><strong t-esc="formatLang(line['theo'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
680+ <td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
681+ <td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
682 <td class="text-right"><strong t-esc="formatLang(line['perc'], digits=2)"/> %</td>
683 </tr>
684 <tr t-if="line['status'] != 1">
685 <td><span style="color: white;" t-esc="'.....'*(line['status'] - 1)"/><span t-esc="line['name']"/></td>
686- <td class="text-right"><span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>
687- <td class="text-right"><span t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
688- <td class="text-right"><span t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
689+ <td class="text-right"><span t-esc="formatLang(line['theo'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
690+ <td class="text-right"><span t-esc="formatLang(line['pln'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
691+ <td class="text-right"><span t-esc="formatLang(line['prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
692 <td class="text-right"><span t-esc="formatLang(line['perc'],digits=2)"/> %</td>
693 </tr>
694 </t>
695 <tr t-foreach="funct_total(data['form'])" t-as="tot">
696 <td><strong>Total:</strong></td>
697- <td class="text-right"><strong t-esc="formatLang(tot['tot_theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>
698- <td class="text-right"><strong t-esc="formatLang(tot['tot_pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
699- <td class="text-right"><strong t-esc="formatLang(tot['tot_prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
700+ <td class="text-right"><strong t-esc="formatLang(tot['tot_theo'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
701+ <td class="text-right"><strong t-esc="formatLang(tot['tot_pln'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
702+ <td class="text-right"><strong t-esc="formatLang(tot['tot_prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
703 <td class="text-right"><strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %</td>
704 </tr>
705 </tbody>
706
707=== modified file 'account_budget/views/report_budget.xml'
708--- account_budget/views/report_budget.xml 2014-03-27 18:25:20 +0000
709+++ account_budget/views/report_budget.xml 2014-05-02 07:31:45 +0000
710@@ -44,26 +44,26 @@
711 <tr>
712 <td><strong t-esc="line['name']"/></td>
713 <td class="text-right">
714- <strong t-esc="formatLang(line['theo'], dp='Account', currency_obj = res_company.currency_id)"/>
715+ <strong t-esc="formatLang(line['theo'], dp='Amount', currency_obj = res_company.currency_id)"/>
716 </td>
717- <td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
718- <td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
719+ <td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
720+ <td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
721 <td class="text-right"><strong t-esc="formatLang(line['perc'],digits=2)"/> %</td>
722 </tr>
723 </t>
724 <tr t-if="line['status'] != 1">
725 <td><span style="color: white;" t-esc="'.....'*(line['status'] - 1)"/><span t-esc="line['name']"/></td>
726- <td class="text-right"><span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>
727- <td class="text-right"><span t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
728- <td class="text-right"><span t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
729+ <td class="text-right"><span t-esc="formatLang(line['theo'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
730+ <td class="text-right"><span t-esc="formatLang(line['pln'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
731+ <td class="text-right"><span t-esc="formatLang(line['prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
732 <td class="text-right"><span t-esc="formatLang(line['perc'],digits=2)"/> % </td>
733 </tr>
734 </t>
735 <tr t-foreach="funct_total(data['form'])" t-as="tot">
736 <td><strong>Total:</strong></td>
737- <td class="text-right"><strong t-esc="formatLang(tot['tot_theo'], dp='Account', currency_obj = res_company.currency_id)"/></td>
738- <td class="text-right"><strong t-esc="formatLang(tot['tot_pln'], dp='Account', currency_obj = res_company.currency_id)"/></td>
739- <td class="text-right"><strong t-esc="formatLang(tot['tot_prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
740+ <td class="text-right"><strong t-esc="formatLang(tot['tot_theo'], dp='Amount', currency_obj = res_company.currency_id)"/></td>
741+ <td class="text-right"><strong t-esc="formatLang(tot['tot_pln'], dp='Amount', currency_obj = res_company.currency_id)"/></td>
742+ <td class="text-right"><strong t-esc="formatLang(tot['tot_prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
743 <td class="text-right"><strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %</td>
744 </tr>
745 </tbody>
746
747=== modified file 'account_budget/views/report_crossoveredbudget.xml'
748--- account_budget/views/report_crossoveredbudget.xml 2014-03-27 18:25:20 +0000
749+++ account_budget/views/report_crossoveredbudget.xml 2014-05-02 07:31:45 +0000
750@@ -41,13 +41,13 @@
751 <span t-esc="line['name']"/>
752 </td>
753 <td class="text-right">
754- <span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/>
755- </td>
756- <td class="text-right">
757- <span t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/>
758- </td>
759- <td class="text-right">
760- <span t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/>
761+ <span t-esc="formatLang(line['theo'], dp='Amount', currency_obj=res_company.currency_id)"/>
762+ </td>
763+ <td class="text-right">
764+ <span t-esc="formatLang(line['pln'], dp='Amount', currency_obj=res_company.currency_id)"/>
765+ </td>
766+ <td class="text-right">
767+ <span t-esc="formatLang(line['prac'], dp='Amount', currency_obj=res_company.currency_id)"/>
768 </td>
769 <td class="text-center">
770 <span t-esc="formatLang(line['perc'],digits=2)"/> %
771@@ -58,13 +58,13 @@
772 <strong>Total:</strong>
773 </td>
774 <td class="text-right">
775- <strong t-esc="formatLang(tot['tot_theo'], dp='Account', currency_obj=res_company.currency_id)"/>
776- </td>
777- <td class="text-right">
778- <strong t-esc="formatLang(tot['tot_pln'], dp='Account', currency_obj=res_company.currency_id)"/>
779- </td>
780- <td class="text-right">
781- <strong t-esc="formatLang(tot['tot_prac'], dp='Account', currency_obj=res_company.currency_id)"/>
782+ <strong t-esc="formatLang(tot['tot_theo'], dp='Amount', currency_obj=res_company.currency_id)"/>
783+ </td>
784+ <td class="text-right">
785+ <strong t-esc="formatLang(tot['tot_pln'], dp='Amount', currency_obj=res_company.currency_id)"/>
786+ </td>
787+ <td class="text-right">
788+ <strong t-esc="formatLang(tot['tot_prac'], dp='Amount', currency_obj=res_company.currency_id)"/>
789 </td>
790 <td class="text-center">
791 <strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %
792
793=== modified file 'account_followup/account_followup.py'
794--- account_followup/account_followup.py 2014-04-22 10:38:02 +0000
795+++ account_followup/account_followup.py 2014-05-02 07:31:45 +0000
796@@ -272,7 +272,7 @@
797
798 total = reduce(lambda x, y: x+y['balance'], currency_dict['line'], 0.00)
799
800- total = rml_parse.formatLang(total, dp='Account', currency_obj=currency)
801+ total = rml_parse.formatLang(total, dp='Amount', currency_obj=currency)
802 followup_table += '''<tr> </tr>
803 </table>
804 <center>''' + _("Amount due") + ''' : %s </center>''' % (total)
805
806=== modified file 'account_followup/wizard/account_followup_print.py'
807--- account_followup/wizard/account_followup_print.py 2014-04-02 16:40:53 +0000
808+++ account_followup/wizard/account_followup_print.py 2014-05-02 07:31:45 +0000
809@@ -25,6 +25,7 @@
810 from openerp import tools
811 from openerp.osv import fields, osv
812 from openerp.tools.translate import _
813+import openerp.addons.decimal_precision as dp
814
815 class account_followup_stat_by_partner(osv.osv):
816 _name = "account_followup.stat.by.partner"
817@@ -38,7 +39,7 @@
818 'date_followup':fields.date('Latest follow-up', readonly=True),
819 'max_followup_id': fields.many2one('account_followup.followup.line',
820 'Max Follow Up Level', readonly=True, ondelete="cascade"),
821- 'balance':fields.float('Balance', readonly=True),
822+ 'balance':fields.float('Balance', readonly=True, digits_compute=dp.get_precision('Amount')),
823 'company_id': fields.many2one('res.company', 'Company', readonly=True),
824 }
825
826
827=== modified file 'account_payment/account_payment.py'
828--- account_payment/account_payment.py 2013-10-27 12:31:04 +0000
829+++ account_payment/account_payment.py 2014-05-02 07:31:45 +0000
830@@ -23,6 +23,7 @@
831 import time
832
833 from openerp.osv import fields, osv
834+from openerp.addons.decimal_precision import decimal_precision as dp
835
836 _logger = logging.getLogger(__name__)
837
838@@ -96,7 +97,7 @@
839 ('done', 'Done')], 'Status', select=True,
840 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\'.'),
841 'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),
842- 'total': fields.function(_total, string="Total", type='float'),
843+ 'total': fields.function(_total, string="Total", type='float', digits_compute= dp.get_precision('Amount')),
844 'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done': [('readonly', True)]}),
845 'date_prefered': fields.selection([
846 ('now', 'Directly'),
847@@ -307,7 +308,7 @@
848 '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 ?'"),
849 'communication2': fields.char('Communication 2', size=64, help='The successor message of Communication.'),
850 '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.'),
851- 'amount_currency': fields.float('Amount in Partner Currency', digits=(16, 2),
852+ 'amount_currency': fields.float('Amount in Partner Currency', digits_compute= dp.get_precision('Amount'),
853 required=True, help='Payment amount in the partner currency'),
854 'currency': fields.many2one('res.currency','Partner Currency', required=True),
855 'company_currency': fields.many2one('res.currency', 'Company Currency', readonly=True),
856
857=== modified file 'account_voucher/account_voucher.py'
858--- account_voucher/account_voucher.py 2014-05-01 15:56:33 +0000
859+++ account_voucher/account_voucher.py 2014-05-02 07:31:45 +0000
860@@ -357,8 +357,8 @@
861 \n* The \'Pro-forma\' when voucher is in Pro-forma status,voucher does not have an voucher number. \
862 \n* The \'Posted\' status is used when user create voucher,a voucher number is generated and voucher entries are created in account \
863 \n* The \'Cancelled\' status is used when user cancel voucher.'),
864- 'amount': fields.float('Total', digits_compute=dp.get_precision('Account'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
865- 'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),
866+ 'amount': fields.float('Total', digits_compute=dp.get_precision('Amount'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
867+ 'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Amount'), readonly=True, states={'draft':[('readonly',False)]}),
868 'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),
869 'number': fields.char('Number', size=32, readonly=True,),
870 'move_id':fields.many2one('account.move', 'Account Entry'),
871@@ -380,7 +380,7 @@
872 'writeoff_acc_id': fields.many2one('account.account', 'Counterpart Account', readonly=True, states={'draft': [('readonly', False)]}),
873 'comment': fields.char('Counterpart Comment', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}),
874 'analytic_id': fields.many2one('account.analytic.account','Write-Off Analytic Account', readonly=True, states={'draft': [('readonly', False)]}),
875- '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."),
876+ '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."),
877 'payment_rate_currency_id': fields.many2one('res.currency', 'Payment Rate Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
878 'payment_rate': fields.float('Exchange Rate', digits=(12,6), required=True, readonly=True, states={'draft': [('readonly', False)]},
879 help='The specific rate that will be used, in this voucher, between the selected currency (in \'Payment Rate Currency\' field) and the voucher currency.'),
880@@ -1187,7 +1187,7 @@
881 ctx.update({
882 'voucher_special_currency_rate': voucher_currency.rate * voucher.payment_rate ,
883 'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False,})
884- prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
885+ prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
886 for line in voucher.line_ids:
887 #create one move line per voucher line where amount is not 0.0
888 # AND (second part of the clause) only if the original move line was not having debit = credit = 0 (which is a legal value)
889@@ -1487,16 +1487,16 @@
890 'name':fields.char('Description', size=256),
891 'account_id':fields.many2one('account.account','Account', required=True),
892 'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'),
893- 'untax_amount':fields.float('Untax Amount'),
894- 'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')),
895+ 'untax_amount':fields.float('Untax Amount', digits_compute=dp.get_precision('Amount')),
896+ 'amount':fields.float('Amount', digits_compute=dp.get_precision('Amount')),
897 'reconcile': fields.boolean('Full Reconcile'),
898 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'),
899 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
900 'move_line_id': fields.many2one('account.move.line', 'Journal Item'),
901 'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1),
902 'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),
903- 'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True, digits_compute=dp.get_precision('Account')),
904- 'amount_unreconciled': fields.function(_compute_balance, multi='dc', type='float', string='Open Balance', store=True, digits_compute=dp.get_precision('Account')),
905+ 'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True, digits_compute=dp.get_precision('Amount')),
906+ 'amount_unreconciled': fields.function(_compute_balance, multi='dc', type='float', string='Open Balance', store=True, digits_compute=dp.get_precision('Amount')),
907 'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True, readonly=True),
908 'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency', readonly=True),
909 }
910
911=== modified file 'analytic/analytic.py'
912--- analytic/analytic.py 2014-04-01 12:36:57 +0000
913+++ analytic/analytic.py 2014-05-02 07:31:45 +0000
914@@ -185,9 +185,9 @@
915 'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'),
916 'child_complete_ids': fields.function(_child_compute, relation='account.analytic.account', string="Account Hierarchy", type='many2many'),
917 'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'),
918- 'balance': fields.function(_debit_credit_bal_qtty, type='float', string='Balance', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
919- 'debit': fields.function(_debit_credit_bal_qtty, type='float', string='Debit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
920- 'credit': fields.function(_debit_credit_bal_qtty, type='float', string='Credit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
921+ 'balance': fields.function(_debit_credit_bal_qtty, type='float', string='Balance', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Amount')),
922+ 'debit': fields.function(_debit_credit_bal_qtty, type='float', string='Debit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Amount')),
923+ 'credit': fields.function(_debit_credit_bal_qtty, type='float', string='Credit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Amount')),
924 'quantity': fields.function(_debit_credit_bal_qtty, type='float', string='Quantity', multi='debit_credit_bal_qtty'),
925 '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.)'),
926 'partner_id': fields.many2one('res.partner', 'Customer'),
927@@ -316,7 +316,7 @@
928 _columns = {
929 'name': fields.char('Description', size=256, required=True),
930 'date': fields.date('Date', required=True, select=True),
931- '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')),
932+ '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')),
933 'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
934 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='restrict', select=True, domain=[('type','<>','view')]),
935 'user_id': fields.many2one('res.users', 'User'),
936
937=== modified file 'analytic_contract_hr_expense/analytic_contract_hr_expense.py'
938--- analytic_contract_hr_expense/analytic_contract_hr_expense.py 2014-04-01 12:36:57 +0000
939+++ analytic_contract_hr_expense/analytic_contract_hr_expense.py 2014-05-02 07:31:45 +0000
940@@ -112,7 +112,7 @@
941 'est_expenses': fields.float('Estimation of Expenses to Invoice'),
942 'ca_invoiced': fields.function(_ca_invoiced_calc, type='float', string='Invoiced Amount',
943 help="Total customer invoiced amount for this account.",
944- digits_compute=dp.get_precision('Account')),
945+ digits_compute=dp.get_precision('Amount')),
946 }
947
948 def on_change_template(self, cr, uid, id, template_id, date_start=False, context=None):
949
950=== modified file 'analytic_user_function/analytic_user_function.py'
951--- analytic_user_function/analytic_user_function.py 2014-04-09 16:31:32 +0000
952+++ analytic_user_function/analytic_user_function.py 2014-05-02 07:31:45 +0000
953@@ -32,7 +32,7 @@
954 'product_id': fields.many2one("product.product", "Service", required=True,),
955 'account_id': fields.many2one("account.analytic.account", "Analytic Account", required=True,),
956 'uom_id': fields.related("product_id", "uom_id", relation="product.uom", string="Unit of Measure", type="many2one", readonly=True),
957- 'price': fields.float('Price', digits_compute=dp.get_precision('Product Price'), help="Price per hour for this user.", required=True),
958+ 'price': fields.float('Price', digits_compute=dp.get_precision('Price'), help="Price per hour for this user.", required=True),
959 }
960 def onchange_user_product_id(self, cr, uid, ids, user_id, product_id, context=None):
961 if not user_id:
962
963=== modified file 'decimal_precision/__openerp__.py'
964--- decimal_precision/__openerp__.py 2012-11-29 22:26:45 +0000
965+++ decimal_precision/__openerp__.py 2014-05-02 07:31:45 +0000
966@@ -33,6 +33,7 @@
967 'category' : 'Hidden/Dependency',
968 'data': [
969 'decimal_precision_view.xml',
970+ 'decimal_precision_data.xml',
971 'security/ir.model.access.csv',
972 ],
973 'demo': [],
974
975=== added file 'decimal_precision/decimal_precision_data.xml'
976--- decimal_precision/decimal_precision_data.xml 1970-01-01 00:00:00 +0000
977+++ decimal_precision/decimal_precision_data.xml 2014-05-02 07:31:45 +0000
978@@ -0,0 +1,12 @@
979+<?xml version="1.0" encoding="utf-8"?>
980+<openerp>
981+ <data noupdate="1">
982+
983+ <!-- Decimal Precision -->
984+ <record forcecreate="True" id="decimal_price" model="decimal.precision">
985+ <field name="name">Price</field>
986+ <field name="digits">2</field>
987+ </record>
988+
989+ </data>
990+</openerp>
991\ No newline at end of file
992
993=== modified file 'delivery/delivery.py'
994--- delivery/delivery.py 2014-05-01 15:56:33 +0000
995+++ delivery/delivery.py 2014-05-02 07:31:45 +0000
996@@ -235,8 +235,8 @@
997 'max_value': fields.float('Maximum Value', required=True),
998 'price_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Price Type', required=True),
999 'variable_factor': fields.selection([('weight','Weight'),('volume','Volume'),('wv','Weight * Volume'), ('price','Price')], 'Variable Factor', required=True),
1000- 'list_price': fields.float('Sale Price', digits_compute= dp.get_precision('Product Price'), required=True),
1001- 'standard_price': fields.float('Cost Price', digits_compute= dp.get_precision('Product Price'), required=True),
1002+ 'list_price': fields.float('Sale Price', digits_compute= dp.get_precision('Price'), required=True),
1003+ 'standard_price': fields.float('Cost Price', digits_compute= dp.get_precision('Price'), required=True),
1004 }
1005 _defaults = {
1006 'type': lambda *args: 'weight',
1007
1008=== modified file 'delivery/stock.py'
1009--- delivery/stock.py 2013-11-27 15:32:57 +0000
1010+++ delivery/stock.py 2014-05-02 07:31:45 +0000
1011@@ -54,12 +54,12 @@
1012 _columns = {
1013 'carrier_id':fields.many2one("delivery.carrier","Carrier"),
1014 'volume': fields.float('Volume'),
1015- 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1016+ 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1017 store={
1018 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1019 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1020 }),
1021- 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1022+ 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1023 store={
1024 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1025 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1026@@ -167,11 +167,11 @@
1027 return res
1028
1029 _columns = {
1030- 'weight': fields.function(_cal_move_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight',
1031+ 'weight': fields.function(_cal_move_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_move_weight',
1032 store={
1033 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20),
1034 }),
1035- 'weight_net': fields.function(_cal_move_weight, type='float', string='Net weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight',
1036+ 'weight_net': fields.function(_cal_move_weight, type='float', string='Net weight', digits_compute= dp.get_precision('Weight'), multi='_cal_move_weight',
1037 store={
1038 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20),
1039 }),
1040@@ -203,12 +203,12 @@
1041 _columns = {
1042 'carrier_id':fields.many2one("delivery.carrier","Carrier"),
1043 'volume': fields.float('Volume'),
1044- 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1045+ 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1046 store={
1047 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1048 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1049 }),
1050- 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1051+ 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1052 store={
1053 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1054 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1055@@ -230,12 +230,12 @@
1056 _columns = {
1057 'carrier_id':fields.many2one("delivery.carrier","Carrier"),
1058 'volume': fields.float('Volume'),
1059- 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1060+ 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1061 store={
1062 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1063 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1064 }),
1065- 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
1066+ 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
1067 store={
1068 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
1069 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
1070
1071=== modified file 'hr_contract/hr_contract.py'
1072--- hr_contract/hr_contract.py 2013-10-27 12:31:04 +0000
1073+++ hr_contract/hr_contract.py 2014-05-02 07:31:45 +0000
1074@@ -21,6 +21,7 @@
1075 import time
1076
1077 from openerp.osv import fields, osv
1078+import openerp.addons.decimal_precision as dp
1079
1080 class hr_employee(osv.osv):
1081 _name = "hr.employee"
1082@@ -71,7 +72,7 @@
1083 'trial_date_start': fields.date('Trial Start Date'),
1084 'trial_date_end': fields.date('Trial End Date'),
1085 'working_hours': fields.many2one('resource.calendar','Working Schedule'),
1086- 'wage': fields.float('Wage', digits=(16,2), required=True, help="Basic Salary of the employee"),
1087+ 'wage': fields.float('Wage', digits_compute=dp.get_precision('Amount'), required=True, help="Basic Salary of the employee"),
1088 'advantages': fields.text('Advantages'),
1089 'notes': fields.text('Notes'),
1090 'permit_no': fields.char('Work Permit No', size=256, required=False, readonly=False),
1091
1092=== modified file 'hr_expense/hr_expense.py'
1093--- hr_expense/hr_expense.py 2014-03-10 14:36:00 +0000
1094+++ hr_expense/hr_expense.py 2014-05-02 07:31:45 +0000
1095@@ -77,7 +77,7 @@
1096 'account_move_id': fields.many2one('account.move', 'Ledger Posting'),
1097 'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),
1098 'note': fields.text('Note'),
1099- 'amount': fields.function(_amount, string='Total Amount', digits_compute=dp.get_precision('Account'),
1100+ 'amount': fields.function(_amount, string='Total Amount', digits_compute=dp.get_precision('Amount'),
1101 store={
1102 'hr.expense.line': (_get_expense_from_line, ['unit_amount','unit_quantity'], 10)
1103 }),
1104@@ -418,9 +418,9 @@
1105 'name': fields.char('Expense Note', size=128, required=True),
1106 'date_value': fields.date('Date', required=True),
1107 'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),
1108- 'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Account')),
1109- 'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Product Price')),
1110- 'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Product Unit of Measure')),
1111+ 'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Amount')),
1112+ 'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Price')),
1113+ 'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Quantity')),
1114 'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),
1115 'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True),
1116 'description': fields.text('Description'),
1117
1118=== modified file 'hr_expense/report/hr_expense_report.py'
1119--- hr_expense/report/hr_expense_report.py 2013-10-27 12:31:04 +0000
1120+++ hr_expense/report/hr_expense_report.py 2014-05-02 07:31:45 +0000
1121@@ -47,11 +47,11 @@
1122 'company_id':fields.many2one('res.company', 'Company', readonly=True),
1123 'user_id':fields.many2one('res.users', 'Validation User', readonly=True),
1124 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
1125- 'price_total':fields.float('Total Price', readonly=True, digits_compute=dp.get_precision('Account')),
1126+ 'price_total':fields.float('Total Price', readonly=True, digits_compute=dp.get_precision('Amount')),
1127 'delay_valid':fields.float('Delay to Valid', readonly=True),
1128 'delay_confirm':fields.float('Delay to Confirm', readonly=True),
1129 'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True),
1130- 'price_average':fields.float('Average Price', readonly=True, digits_compute=dp.get_precision('Account')),
1131+ 'price_average':fields.float('Average Price', readonly=True, digits_compute=dp.get_precision('Amount')),
1132 'nbr':fields.integer('# of Lines', readonly=True),
1133 'no_of_products':fields.integer('# of Products', readonly=True),
1134 'no_of_account':fields.integer('# of Accounts', readonly=True),
1135
1136=== modified file 'hr_payroll/hr_payroll.py'
1137--- hr_payroll/hr_payroll.py 2014-04-03 15:59:04 +0000
1138+++ hr_payroll/hr_payroll.py 2014-05-02 07:31:45 +0000
1139@@ -750,7 +750,7 @@
1140 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade', select=True),
1141 'sequence': fields.integer('Sequence', required=True, select=True),
1142 'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"),
1143- '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."),
1144+ '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."),
1145 'contract_id': fields.many2one('hr.contract', 'Contract', required=True, help="The contract for which applied this input"),
1146 }
1147 _order = 'payslip_id, sequence'
1148@@ -783,8 +783,8 @@
1149 ('fix','Fixed Amount'),
1150 ('code','Python Code'),
1151 ],'Amount Type', select=True, required=True, help="The computation method for the rule amount."),
1152- 'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Payroll'),),
1153- 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Payroll Rate'), help='For example, enter 50.0 to apply a percentage of 50%'),
1154+ 'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Amount'),),
1155+ 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Amount'), help='For example, enter 50.0 to apply a percentage of 50%'),
1156 'amount_python_compute':fields.text('Python Code'),
1157 'amount_percentage_base':fields.char('Percentage based on',size=1024, required=False, readonly=False, help='result will be affected to a variable'),
1158 'child_ids':fields.one2many('hr.salary.rule', 'parent_rule_id', 'Child Salary Rule'),
1159@@ -933,10 +933,10 @@
1160 'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True),
1161 'employee_id':fields.many2one('hr.employee', 'Employee', required=True),
1162 'contract_id':fields.many2one('hr.contract', 'Contract', required=True, select=True),
1163- 'rate': fields.float('Rate (%)', digits_compute=dp.get_precision('Payroll Rate')),
1164- 'amount': fields.float('Amount', digits_compute=dp.get_precision('Payroll')),
1165- 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Payroll')),
1166- 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Payroll'),store=True ),
1167+ 'rate': fields.float('Rate (%)', digits_compute=dp.get_precision('Price')),
1168+ 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
1169+ 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
1170+ 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Amount'),store=True ),
1171 }
1172
1173 _defaults = {
1174@@ -974,7 +974,7 @@
1175
1176 _columns = {
1177 'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True),
1178- '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."),
1179+ '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."),
1180 }
1181
1182
1183
1184=== modified file 'hr_payroll/hr_payroll_data.xml'
1185--- hr_payroll/hr_payroll_data.xml 2012-06-20 13:04:49 +0000
1186+++ hr_payroll/hr_payroll_data.xml 2014-05-02 07:31:45 +0000
1187@@ -67,7 +67,6 @@
1188 <field name="register_id" ref="contrib_register_employees"/>
1189 </record>
1190
1191-
1192 <!-- Salary Structure -->
1193
1194 <record id="structure_base" model="hr.payroll.structure">
1195@@ -77,18 +76,5 @@
1196 <field name="company_id" ref="base.main_company"/>
1197 </record>
1198
1199- <!-- Decimal Precision -->
1200-
1201- <record forcecreate="True" id="decimal_payroll" model="decimal.precision">
1202- <field name="name">Payroll</field>
1203- <field name="digits">2</field>
1204- </record>
1205-
1206- <record forcecreate="True" id="decimal_payroll_rate" model="decimal.precision">
1207- <field name="name">Payroll Rate</field>
1208- <field name="digits">4</field>
1209- </record>
1210-
1211-
1212 </data>
1213 </openerp>
1214
1215=== modified file 'hr_recruitment/report/hr_recruitment_report.py'
1216--- hr_recruitment/report/hr_recruitment_report.py 2014-01-27 09:23:08 +0000
1217+++ hr_recruitment/report/hr_recruitment_report.py 2014-05-02 07:31:45 +0000
1218@@ -43,10 +43,10 @@
1219 'type_id': fields.many2one('hr.recruitment.degree', 'Degree'),
1220 'department_id': fields.many2one('hr.department','Department',readonly=True),
1221 'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'),
1222- 'salary_prop' : fields.float("Salary Proposed", digits_compute=dp.get_precision('Account')),
1223- 'salary_prop_avg' : fields.float("Avg. Proposed Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),
1224- 'salary_exp' : fields.float("Salary Expected", digits_compute=dp.get_precision('Account')),
1225- 'salary_exp_avg' : fields.float("Avg. Expected Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),
1226+ 'salary_prop' : fields.float("Salary Proposed", digits_compute=dp.get_precision('Amount')),
1227+ 'salary_prop_avg' : fields.float("Avg. Proposed Salary", group_operator="avg", digits_compute=dp.get_precision('Amount')),
1228+ 'salary_exp' : fields.float("Salary Expected", digits_compute=dp.get_precision('Amount')),
1229+ 'salary_exp_avg' : fields.float("Avg. Expected Salary", group_operator="avg", digits_compute=dp.get_precision('Amount')),
1230 'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),
1231 'available': fields.float("Availability"),
1232 'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",
1233
1234=== modified file 'hr_timesheet_invoice/report/report_analytic.py'
1235--- hr_timesheet_invoice/report/report_analytic.py 2013-10-27 12:31:04 +0000
1236+++ hr_timesheet_invoice/report/report_analytic.py 2014-05-02 07:31:45 +0000
1237@@ -71,8 +71,8 @@
1238 'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
1239 'product_uom_id':fields.many2one('product.uom', 'Unit of Measure', readonly=True),
1240 'unit_amount': fields.float('Units', readonly=True),
1241- 'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Product Price')),
1242- 'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Account')),
1243+ 'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Price')),
1244+ 'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Amount')),
1245 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
1246 ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
1247 }
1248
1249=== modified file 'hr_timesheet_sheet/report/hr_timesheet_report.py'
1250--- hr_timesheet_sheet/report/hr_timesheet_report.py 2014-01-27 13:03:51 +0000
1251+++ hr_timesheet_sheet/report/hr_timesheet_report.py 2014-05-02 07:31:45 +0000
1252@@ -37,7 +37,7 @@
1253 'user_id': fields.many2one('res.users', 'User',readonly=True),
1254 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
1255 'company_id': fields.many2one('res.company', 'Company',readonly=True),
1256- 'cost': fields.float('Cost',readonly=True, digits_compute=dp.get_precision('Account')),
1257+ 'cost': fields.float('Cost',readonly=True, digits_compute=dp.get_precision('Amount')),
1258 'quantity': fields.float('Time',readonly=True),
1259 }
1260
1261
1262=== modified file 'l10n_be_hr_payroll/l10n_be_hr_payroll.py'
1263--- l10n_be_hr_payroll/l10n_be_hr_payroll.py 2013-10-27 12:31:04 +0000
1264+++ l10n_be_hr_payroll/l10n_be_hr_payroll.py 2014-05-02 07:31:45 +0000
1265@@ -27,16 +27,16 @@
1266 _inherit = 'hr.contract'
1267
1268 _columns = {
1269- 'travel_reimbursement_amount': fields.float('Reimbursement of travel expenses', digits_compute=dp.get_precision('Payroll')),
1270- 'car_company_amount': fields.float('Company car employer', digits_compute=dp.get_precision('Payroll')),
1271- 'car_employee_deduction': fields.float('Company Car Deduction for Worker', digits_compute=dp.get_precision('Payroll')),
1272- 'misc_onss_deduction': fields.float('Miscellaneous exempt ONSS ', digits_compute=dp.get_precision('Payroll')),
1273- 'meal_voucher_amount': fields.float('Check Value Meal ', digits_compute=dp.get_precision('Payroll')),
1274- 'meal_voucher_employee_deduction': fields.float('Check Value Meal - by worker ', digits_compute=dp.get_precision('Payroll')),
1275- 'insurance_employee_deduction': fields.float('Insurance Group - by worker ', digits_compute=dp.get_precision('Payroll')),
1276- 'misc_advantage_amount': fields.float('Benefits of various nature ', digits_compute=dp.get_precision('Payroll')),
1277- 'additional_net_amount': fields.float('Net supplements', digits_compute=dp.get_precision('Payroll')),
1278- 'retained_net_amount': fields.float('Net retained ', digits_compute=dp.get_precision('Payroll')),
1279+ 'travel_reimbursement_amount': fields.float('Reimbursement of travel expenses', digits_compute=dp.get_precision('Price')),
1280+ 'car_company_amount': fields.float('Company car employer', digits_compute=dp.get_precision('Price')),
1281+ 'car_employee_deduction': fields.float('Company Car Deduction for Worker', digits_compute=dp.get_precision('Price')),
1282+ 'misc_onss_deduction': fields.float('Miscellaneous exempt ONSS ', digits_compute=dp.get_precision('Price')),
1283+ 'meal_voucher_amount': fields.float('Check Value Meal ', digits_compute=dp.get_precision('Price')),
1284+ 'meal_voucher_employee_deduction': fields.float('Check Value Meal - by worker ', digits_compute=dp.get_precision('Price')),
1285+ 'insurance_employee_deduction': fields.float('Insurance Group - by worker ', digits_compute=dp.get_precision('Price')),
1286+ 'misc_advantage_amount': fields.float('Benefits of various nature ', digits_compute=dp.get_precision('Price')),
1287+ 'additional_net_amount': fields.float('Net supplements', digits_compute=dp.get_precision('Price')),
1288+ 'retained_net_amount': fields.float('Net retained ', digits_compute=dp.get_precision('Price')),
1289 }
1290
1291
1292
1293=== modified file 'l10n_br/account.py'
1294--- l10n_br/account.py 2013-10-27 12:31:04 +0000
1295+++ l10n_br/account.py 2014-05-02 07:31:45 +0000
1296@@ -93,7 +93,7 @@
1297 def get_precision_tax():
1298 def change_digit_tax(cr):
1299 decimal_precision = openerp.registry(cr.dbname)['decimal.precision']
1300- res = decimal_precision.precision_get(cr, 1, 'Account')
1301+ res = decimal_precision.precision_get(cr, 1, 'Amount')
1302 return (16, res+2)
1303 return change_digit_tax
1304
1305
1306=== modified file 'l10n_fr_hr_payroll/l10n_fr_hr_payroll.py'
1307--- l10n_fr_hr_payroll/l10n_fr_hr_payroll.py 2013-10-27 12:31:04 +0000
1308+++ l10n_fr_hr_payroll/l10n_fr_hr_payroll.py 2014-05-02 07:31:45 +0000
1309@@ -27,9 +27,9 @@
1310 _inherit = 'res.company'
1311
1312 _columns = {
1313- 'plafond_secu': fields.float('Plafond de la Securite Sociale', digits_compute=dp.get_precision('Payroll')),
1314+ 'plafond_secu': fields.float('Plafond de la Securite Sociale', digits_compute=dp.get_precision('Price')),
1315 'nombre_employes': fields.integer('Nombre d\'employes'),
1316- 'cotisation_prevoyance': fields.float('Cotisation Patronale Prevoyance', digits_compute=dp.get_precision('Payroll')),
1317+ 'cotisation_prevoyance': fields.float('Cotisation Patronale Prevoyance', digits_compute=dp.get_precision('Price')),
1318 'org_ss': fields.char('Organisme de securite sociale', size=64),
1319 'conv_coll': fields.char('Convention collective', size=64),
1320 }
1321
1322=== modified file 'l10n_in_hr_payroll/l10n_in_hr_payroll.py'
1323--- l10n_in_hr_payroll/l10n_in_hr_payroll.py 2013-10-27 12:31:04 +0000
1324+++ l10n_in_hr_payroll/l10n_in_hr_payroll.py 2014-05-02 07:31:45 +0000
1325@@ -40,12 +40,12 @@
1326 _description = 'HR Contract'
1327
1328 _columns = {
1329- 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll'), help="Amount for Tax Deduction at Source"),
1330+ 'tds': fields.float('TDS', digits_compute=dp.get_precision('Price'), help="Amount for Tax Deduction at Source"),
1331 'driver_salay': fields.boolean('Driver Salary', help="Check this box if you provide allowance for driver"),
1332- 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'), help="Deduction towards company provided medical insurance"),
1333- '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(%)"),
1334- '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(%)"),
1335- 'supplementary_allowance': fields.float('Supplementary Allowance', digits_compute=dp.get_precision('Payroll')),
1336+ 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Price'), help="Deduction towards company provided medical insurance"),
1337+ '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(%)"),
1338+ '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(%)"),
1339+ 'supplementary_allowance': fields.float('Supplementary Allowance', digits_compute=dp.get_precision('Price')),
1340 }
1341
1342
1343@@ -235,7 +235,7 @@
1344 'name': fields.char('Bank Account No.', size=25, required=True),
1345 'ifsc_code': fields.char('IFSC Code', size=16),
1346 'employee_id': fields.many2one('hr.employee', 'Employee', required=True),
1347- 'bysal': fields.float('By Salary', digits_compute=dp.get_precision('Payroll')),
1348+ 'bysal': fields.float('By Salary', digits_compute=dp.get_precision('Price')),
1349 'debit_credit': fields.char('C/D', size=3, required=False),
1350 'company_id': fields.related('advice_id', 'company_id', type='many2one', required=False, relation='res.company', string='Company', store=True),
1351 'ifsc': fields.related('advice_id', 'neft', type='boolean', string='IFSC'),
1352
1353=== modified file 'lunch/lunch.py'
1354--- lunch/lunch.py 2013-10-27 12:31:04 +0000
1355+++ lunch/lunch.py 2014-05-02 07:31:45 +0000
1356@@ -435,7 +435,7 @@
1357 'name': fields.char('Product', required=True, size=64),
1358 'category_id': fields.many2one('lunch.product.category', 'Category', required=True),
1359 'description': fields.text('Description', size=256),
1360- 'price': fields.float('Price', digits=(16,2)), #TODO: use decimal precision of 'Account', move it from product to decimal_precision
1361+ 'price': fields.float('Price', digits=(16,2)), #TODO: use decimal precision of 'Amount', move it from product to decimal_precision
1362 'supplier': fields.many2one('res.partner', 'Supplier'),
1363 }
1364
1365
1366=== modified file 'marketing_campaign/marketing_campaign.py'
1367--- marketing_campaign/marketing_campaign.py 2013-11-27 15:32:57 +0000
1368+++ marketing_campaign/marketing_campaign.py 2014-05-02 07:31:45 +0000
1369@@ -120,7 +120,7 @@
1370 'Status',),
1371 'activity_ids': fields.one2many('marketing.campaign.activity',
1372 'campaign_id', 'Activities'),
1373- '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')),
1374+ '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')),
1375 }
1376
1377 _defaults = {
1378@@ -433,8 +433,8 @@
1379 'from_ids': fields.one2many('marketing.campaign.transition',
1380 'activity_to_id',
1381 'Previous Activities'),
1382- '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')),
1383- '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')),
1384+ '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')),
1385+ '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')),
1386 'signal': fields.char('Signal', size=128,
1387 help='An activity with a signal can be called programmatically. Be careful, the workitem is always created when a signal is sent'),
1388 'keep_if_condition_not_met': fields.boolean("Don't Delete Workitems",
1389
1390=== modified file 'marketing_campaign/report/campaign_analysis.py'
1391--- marketing_campaign/report/campaign_analysis.py 2013-10-27 12:31:04 +0000
1392+++ marketing_campaign/report/campaign_analysis.py 2014-05-02 07:31:45 +0000
1393@@ -63,8 +63,8 @@
1394 'country_id': fields.related('partner_id', 'country_id',
1395 type='many2one', relation='res.country',string='Country'),
1396 'total_cost' : fields.function(_total_cost, string='Cost',
1397- type="float", digits_compute=dp.get_precision('Account')),
1398- 'revenue': fields.float('Revenue', readonly=True, digits_compute=dp.get_precision('Account')),
1399+ type="float", digits_compute=dp.get_precision('Amount')),
1400+ 'revenue': fields.float('Revenue', readonly=True, digits_compute=dp.get_precision('Amount')),
1401 'count' : fields.integer('# of Actions', readonly=True),
1402 'state': fields.selection([('todo', 'To Do'),
1403 ('exception', 'Exception'), ('done', 'Done'),
1404
1405=== modified file 'membership/membership.py'
1406--- membership/membership.py 2013-10-27 12:31:04 +0000
1407+++ membership/membership.py 2014-05-02 07:31:45 +0000
1408@@ -146,7 +146,7 @@
1409 'date_to': fields.date('To', readonly=True),
1410 'date_cancel': fields.date('Cancel date'),
1411 'date': fields.date('Join Date', help="Date on which member has joined the membership"),
1412- 'member_price': fields.float('Membership Fee', digits_compute= dp.get_precision('Product Price'), required=True, help='Amount for the membership'),
1413+ 'member_price': fields.float('Membership Fee', digits_compute= dp.get_precision('Price'), required=True, help='Amount for the membership'),
1414 'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True),
1415 'account_invoice_id': fields.related('account_invoice_line', 'invoice_id', type='many2one', relation='account.invoice', string='Invoice', readonly=True),
1416 'state': fields.function(_state,
1417
1418=== modified file 'membership/report/report_membership.py'
1419--- membership/report/report_membership.py 2013-10-27 12:31:04 +0000
1420+++ membership/report/report_membership.py 2014-05-02 07:31:45 +0000
1421@@ -53,8 +53,8 @@
1422 'num_waiting': fields.integer('# Waiting', readonly=True),
1423 'num_invoiced': fields.integer('# Invoiced', readonly=True),
1424 'num_paid': fields.integer('# Paid', readonly=True),
1425- 'tot_pending': fields.float('Pending Amount', digits_compute= dp.get_precision('Account'), readonly=True),
1426- 'tot_earned': fields.float('Earned Amount', digits_compute= dp.get_precision('Account'), readonly=True),
1427+ 'tot_pending': fields.float('Pending Amount', digits_compute= dp.get_precision('Amount'), readonly=True),
1428+ 'tot_earned': fields.float('Earned Amount', digits_compute= dp.get_precision('Amount'), readonly=True),
1429 'partner_id': fields.many2one('res.partner', 'Member', readonly=True),
1430 'associate_member_id': fields.many2one('res.partner', 'Associate Member', readonly=True),
1431 'membership_id': fields.many2one('product.product', 'Membership Product', readonly=True),
1432
1433=== modified file 'membership/wizard/membership_invoice.py'
1434--- membership/wizard/membership_invoice.py 2013-10-27 12:31:04 +0000
1435+++ membership/wizard/membership_invoice.py 2014-05-02 07:31:45 +0000
1436@@ -29,7 +29,7 @@
1437 _description = "Membership Invoice"
1438 _columns = {
1439 'product_id': fields.many2one('product.product','Membership', required=True),
1440- 'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Product Price'), required=True),
1441+ 'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Price'), required=True),
1442 }
1443 def onchange_product(self, cr, uid, ids, product_id=False):
1444 """This function returns value of product's member price based on product id.
1445
1446=== modified file 'mrp/mrp.py'
1447--- mrp/mrp.py 2014-03-11 14:52:05 +0000
1448+++ mrp/mrp.py 2014-05-02 07:31:45 +0000
1449@@ -202,9 +202,9 @@
1450 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bills of material."),
1451 'position': fields.char('Internal Reference', size=64, help="Reference to a position in an external plan."),
1452 'product_id': fields.many2one('product.product', 'Product', required=True),
1453- 'product_uos_qty': fields.float('Product UOS Qty'),
1454+ 'product_uos_qty': fields.float('Product UOS Qty', digits_compute= dp.get_precision('Quantity')),
1455 '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."),
1456- 'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Product Unit of Measure')),
1457+ 'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Quantity')),
1458 '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"),
1459 'product_rounding': fields.float('Product Rounding', help="Rounding applied on the product quantity."),
1460 'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% within the production process."),
1461@@ -448,9 +448,9 @@
1462 select=True, readonly=True, states=dict.fromkeys(['draft', 'confirmed'], [('readonly', False)])),
1463
1464 'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft': [('readonly', False)]}),
1465- 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
1466+ 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Quantity'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
1467 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, readonly=True, states={'draft': [('readonly', False)]}),
1468- 'product_uos_qty': fields.float('Product UoS Quantity', readonly=True, states={'draft': [('readonly', False)]}),
1469+ 'product_uos_qty': fields.float('Product UoS Quantity', digits_compute= dp.get_precision('Quantity'), readonly=True, states={'draft': [('readonly', False)]}),
1470 'product_uos': fields.many2one('product.uom', 'Product UoS', readonly=True, states={'draft': [('readonly', False)]}),
1471 'progress': fields.function(_get_progress, type='float',
1472 string='Production progress'),
1473@@ -1102,9 +1102,9 @@
1474 _columns = {
1475 'name': fields.char('Name', size=64, required=True),
1476 'product_id': fields.many2one('product.product', 'Product', required=True),
1477- 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
1478+ 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
1479 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
1480- 'product_uos_qty': fields.float('Product UOS Quantity'),
1481+ 'product_uos_qty': fields.float('Product UOS Quantity', digits_compute= dp.get_precision('Quantity')),
1482 'product_uos': fields.many2one('product.uom', 'Product UOS'),
1483 'production_id': fields.many2one('mrp.production', 'Production Order', select=True),
1484 }
1485
1486=== modified file 'mrp/report/price.py'
1487--- mrp/report/price.py 2014-01-06 13:57:00 +0000
1488+++ mrp/report/price.py 2014-05-02 07:31:45 +0000
1489@@ -140,7 +140,7 @@
1490 </row>
1491 """ % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Unit of Measure'), _('Supplier Price per Unit of Measure'))
1492
1493- purchase_price_digits = rml_obj.get_digits(dp='Product Price')
1494+ purchase_price_digits = rml_obj.get_digits(dp='Price')
1495
1496 for product in product_pool.browse(cr, uid, ids, context=context):
1497 product_uom_name = to_xml(product.uom_id.name)
1498
1499=== modified file 'mrp/wizard/change_production_qty.py'
1500--- mrp/wizard/change_production_qty.py 2013-10-27 12:31:04 +0000
1501+++ mrp/wizard/change_production_qty.py 2014-05-02 07:31:45 +0000
1502@@ -28,7 +28,7 @@
1503 _description = 'Change Quantity of Products'
1504
1505 _columns = {
1506- 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
1507+ 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Quantity'), required=True),
1508 }
1509
1510 def default_get(self, cr, uid, fields, context=None):
1511
1512=== modified file 'mrp/wizard/mrp_product_produce.py'
1513--- mrp/wizard/mrp_product_produce.py 2013-10-27 12:31:04 +0000
1514+++ mrp/wizard/mrp_product_produce.py 2014-05-02 07:31:45 +0000
1515@@ -27,7 +27,7 @@
1516 _description = "Product Produce"
1517
1518 _columns = {
1519- 'product_qty': fields.float('Select Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
1520+ 'product_qty': fields.float('Select Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
1521 'mode': fields.selection([('consume_produce', 'Consume & Produce'),
1522 ('consume', 'Consume Only')], 'Mode', required=True,
1523 help="'Consume only' mode will only consume the products with the quantity selected.\n"
1524
1525=== modified file 'mrp_byproduct/mrp_byproduct.py'
1526--- mrp_byproduct/mrp_byproduct.py 2013-11-27 15:32:57 +0000
1527+++ mrp_byproduct/mrp_byproduct.py 2014-05-02 07:31:45 +0000
1528@@ -29,7 +29,7 @@
1529 _description = 'Byproduct'
1530 _columns={
1531 'product_id': fields.many2one('product.product', 'Product', required=True),
1532- 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
1533+ 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Quantity'), required=True),
1534 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
1535 '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.\
1536 '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.\
1537
1538=== modified file 'mrp_operations/report/mrp_workorder_analysis.py'
1539--- mrp_operations/report/mrp_workorder_analysis.py 2014-01-29 14:30:55 +0000
1540+++ mrp_operations/report/mrp_workorder_analysis.py 2014-05-02 07:31:45 +0000
1541@@ -31,7 +31,7 @@
1542 'nbr': fields.integer('# of Lines', readonly=True),
1543 'date': fields.date('Date', readonly=True),
1544 'product_id': fields.many2one('product.product', 'Product', readonly=True),
1545- 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True),
1546+ 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Quantity'), readonly=True),
1547 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')],'Status', readonly=True),
1548 'total_hours': fields.float('Total Hours', readonly=True),
1549 'total_cycles': fields.float('Total Cycles', readonly=True),
1550
1551=== modified file 'mrp_repair/mrp_repair.py'
1552--- mrp_repair/mrp_repair.py 2014-04-01 19:03:08 +0000
1553+++ mrp_repair/mrp_repair.py 2014-05-02 07:31:45 +0000
1554@@ -160,19 +160,19 @@
1555 '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)]}),
1556 'invoiced': fields.boolean('Invoiced', readonly=True),
1557 'repaired': fields.boolean('Repaired', readonly=True),
1558- 'amount_untaxed': fields.function(_amount_untaxed, string='Untaxed Amount',
1559- store={
1560- 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations', 'fees_lines'], 10),
1561- 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1562- 'mrp.repair.fee': (_get_fee_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1563- }),
1564- 'amount_tax': fields.function(_amount_tax, string='Taxes',
1565- store={
1566- 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations', 'fees_lines'], 10),
1567- 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1568- 'mrp.repair.fee': (_get_fee_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1569- }),
1570- 'amount_total': fields.function(_amount_total, string='Total',
1571+ 'amount_untaxed': fields.function(_amount_untaxed, string='Untaxed Amount', digits_compute=dp.get_precision('Amount'),
1572+ store={
1573+ 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations', 'fees_lines'], 10),
1574+ 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1575+ 'mrp.repair.fee': (_get_fee_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1576+ }),
1577+ 'amount_tax': fields.function(_amount_tax, string='Taxes', digits_compute=dp.get_precision('Amount'),
1578+ store={
1579+ 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations', 'fees_lines'], 10),
1580+ 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1581+ 'mrp.repair.fee': (_get_fee_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1582+ }),
1583+ 'amount_total': fields.function(_amount_total, string='Total', digits_compute=dp.get_precision('Amount'),
1584 store={
1585 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations', 'fees_lines'], 10),
1586 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
1587@@ -641,10 +641,10 @@
1588 'to_invoice': fields.boolean('To Invoice'),
1589 'product_id': fields.many2one('product.product', 'Product', required=True),
1590 'invoiced': fields.boolean('Invoiced',readonly=True),
1591- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
1592- 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),
1593+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
1594+ 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Amount')),
1595 'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),
1596- 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),
1597+ 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True),
1598 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
1599 'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number',domain="[('product_id','=',product_id)]"),
1600 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
1601@@ -734,10 +734,10 @@
1602 'repair_id': fields.many2one('mrp.repair', 'Repair Order Reference', required=True, ondelete='cascade', select=True),
1603 'name': fields.char('Description', size=64, select=True,required=True),
1604 'product_id': fields.many2one('product.product', 'Product'),
1605- 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),
1606- 'price_unit': fields.float('Unit Price', required=True),
1607+ 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True),
1608+ 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Price'), required=True),
1609 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
1610- 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),
1611+ 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Amount')),
1612 'tax_id': fields.many2many('account.tax', 'repair_fee_line_tax', 'repair_fee_line_id', 'tax_id', 'Taxes'),
1613 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
1614 'to_invoice': fields.boolean('To Invoice'),
1615
1616=== modified file 'payment/models/payment_acquirer.py'
1617--- payment/models/payment_acquirer.py 2014-04-16 12:10:55 +0000
1618+++ payment/models/payment_acquirer.py 2014-05-02 07:31:45 +0000
1619@@ -269,7 +269,7 @@
1620
1621 def _wrap_payment_block(self, cr, uid, html_block, amount, currency_id, context=None):
1622 payment_header = _('Pay safely online')
1623- amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))
1624+ amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount'))
1625 currency = self.pool['res.currency'].browse(cr, uid, currency_id, context=context)
1626 currency_str = currency.symbol or currency.name
1627 amount = u"%s %s" % ((currency_str, amount_str) if currency.position == 'before' else (amount_str, currency_str))
1628
1629=== modified file 'point_of_sale/point_of_sale.py'
1630--- point_of_sale/point_of_sale.py 2014-04-14 12:35:29 +0000
1631+++ point_of_sale/point_of_sale.py 2014-05-02 07:31:45 +0000
1632@@ -247,13 +247,13 @@
1633
1634 'cash_register_balance_end_real' : fields.related('cash_register_id', 'balance_end_real',
1635 type='float',
1636- digits_compute=dp.get_precision('Account'),
1637+ digits_compute=dp.get_precision('Amount'),
1638 string="Ending Balance",
1639 help="Total of closing cash control lines.",
1640 readonly=True),
1641 'cash_register_balance_start' : fields.related('cash_register_id', 'balance_start',
1642 type='float',
1643- digits_compute=dp.get_precision('Account'),
1644+ digits_compute=dp.get_precision('Amount'),
1645 string="Starting Balance",
1646 help="Total of opening cash control lines.",
1647 readonly=True),
1648@@ -263,7 +263,7 @@
1649 help="Total of all paid sale orders"),
1650 'cash_register_balance_end' : fields.related('cash_register_id', 'balance_end',
1651 type='float',
1652- digits_compute=dp.get_precision('Account'),
1653+ digits_compute=dp.get_precision('Amount'),
1654 string="Theoretical Closing Balance",
1655 help="Sum of opening balance and transactions.",
1656 readonly=True),
1657@@ -646,10 +646,10 @@
1658 'warehouse_id': fields.related('session_id', 'config_id', 'warehouse_id', relation='stock.warehouse', type='many2one', string='Warehouse', store=True, readonly=True),
1659 'date_order': fields.datetime('Order Date', readonly=True, select=True),
1660 '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."),
1661- 'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Account'), multi='all'),
1662- 'amount_total': fields.function(_amount_all, string='Total', multi='all'),
1663- 'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, digits_compute=dp.get_precision('Account'), multi='all'),
1664- 'amount_return': fields.function(_amount_all, 'Returned', digits_compute=dp.get_precision('Account'), multi='all'),
1665+ 'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Amount'), multi='all'),
1666+ 'amount_total': fields.function(_amount_all, string='Total', digits_compute=dp.get_precision('Amount'), multi='all'),
1667+ 'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, digits_compute=dp.get_precision('Amount'), multi='all'),
1668+ 'amount_return': fields.function(_amount_all, 'Returned', digits_compute=dp.get_precision('Amount'), multi='all'),
1669 'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True),
1670 'statement_ids': fields.one2many('account.bank.statement.line', 'pos_statement_id', 'Payments', states={'draft': [('readonly', False)]}, readonly=True),
1671 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),
1672@@ -1246,11 +1246,11 @@
1673 'name': fields.char('Line No', size=32, required=True),
1674 'notice': fields.char('Discount Notice', size=128),
1675 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True, change_default=True),
1676- 'price_unit': fields.float(string='Unit Price', digits_compute=dp.get_precision('Account')),
1677- 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoS')),
1678+ 'price_unit': fields.float(string='Unit Price', digits_compute=dp.get_precision('Price')),
1679+ 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
1680 'price_subtotal': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal w/o Tax', store=True),
1681 'price_subtotal_incl': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal', store=True),
1682- 'discount': fields.float('Discount (%)', digits_compute=dp.get_precision('Account')),
1683+ 'discount': fields.float('Discount (%)', digits_compute=dp.get_precision('Price')),
1684 'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'),
1685 'create_date': fields.datetime('Creation Date', readonly=True),
1686 }
1687
1688=== added file 'point_of_sale/report/account_statement.rml.THIS'
1689--- point_of_sale/report/account_statement.rml.THIS 1970-01-01 00:00:00 +0000
1690+++ point_of_sale/report/account_statement.rml.THIS 2014-05-02 07:31:45 +0000
1691@@ -0,0 +1,285 @@
1692+<?xml version="1.0"?>
1693+<document filename="test.pdf">
1694+ <template title="Statement" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
1695+ <pageTemplate id="first">
1696+ <frame id="first" x1="36.0" y1="57.0" width="520" height="728"/>
1697+ </pageTemplate>
1698+ </template>
1699+ <stylesheet>
1700+ <blockTableStyle id="Standard_Outline">
1701+ <blockAlignment value="LEFT"/>
1702+ <blockValign value="TOP"/>
1703+ </blockTableStyle>
1704+ <blockTableStyle id="Table1">
1705+ <blockAlignment value="LEFT"/>
1706+ <blockValign value="TOP"/>
1707+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
1708+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
1709+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
1710+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
1711+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
1712+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
1713+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
1714+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
1715+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
1716+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
1717+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
1718+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
1719+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
1720+ </blockTableStyle>
1721+ <blockTableStyle id="Table2">
1722+ <blockAlignment value="LEFT"/>
1723+ <blockValign value="TOP"/>
1724+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
1725+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
1726+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
1727+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
1728+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
1729+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
1730+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
1731+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
1732+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
1733+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
1734+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
1735+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
1736+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
1737+ </blockTableStyle>
1738+ <blockTableStyle id="Table3">
1739+ <blockAlignment value="LEFT"/>
1740+ <blockValign value="TOP"/>
1741+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
1742+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
1743+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
1744+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
1745+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
1746+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
1747+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
1748+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
1749+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
1750+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
1751+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
1752+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
1753+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
1754+ </blockTableStyle>
1755+ <blockTableStyle id="Table4">
1756+ <blockAlignment value="LEFT"/>
1757+ <blockValign value="TOP"/>
1758+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
1759+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
1760+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
1761+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
1762+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
1763+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
1764+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
1765+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
1766+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
1767+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
1768+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
1769+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
1770+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
1771+ </blockTableStyle>
1772+ <blockTableStyle id="Table9">
1773+ <blockAlignment value="LEFT"/>
1774+ <blockValign value="TOP"/>
1775+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
1776+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
1777+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
1778+ </blockTableStyle>
1779+ <blockTableStyle id="Table5">
1780+ <blockAlignment value="LEFT"/>
1781+ <blockValign value="TOP"/>
1782+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
1783+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
1784+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
1785+ </blockTableStyle>
1786+ <blockTableStyle id="Table7">
1787+ <blockAlignment value="LEFT"/>
1788+ <blockValign value="TOP"/>
1789+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
1790+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
1791+ </blockTableStyle>
1792+ <initialize>
1793+ <paraStyle name="all" alignment="justify"/>
1794+ </initialize>
1795+ <paraStyle name="Standard" fontName="Helvetica"/>
1796+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
1797+ <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
1798+ <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
1799+ <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
1800+ <paraStyle name="Index" fontName="Helvetica"/>
1801+ <paraStyle name="Table Contents" fontName="Helvetica"/>
1802+ <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
1803+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
1804+ <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
1805+ <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
1806+ <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
1807+ <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
1808+ <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
1809+ <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
1810+ <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
1811+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
1812+ <paraStyle name="Footer" fontName="Helvetica"/>
1813+ <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
1814+ <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
1815+ <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
1816+ <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
1817+ <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
1818+ <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
1819+ <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
1820+ <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
1821+ <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
1822+ <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
1823+ <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
1824+ <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
1825+ <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
1826+ <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
1827+ <images/>
1828+ </stylesheet>
1829+ <story>
1830+ <pto>
1831+ <pto_header>
1832+ <blockTable colWidths="131.0,292.0,97.0" style="Table9">
1833+ <tr>
1834+ <td>
1835+ <para style="terp_tblheader_Details">Name</para>
1836+ </td>
1837+ <td>
1838+ <para style="terp_tblheader_Details">Partner</para>
1839+ </td>
1840+ <td>
1841+ <para style="terp_tblheader_Details_Right">Amount </para>
1842+ </td>
1843+ </tr>
1844+ </blockTable>
1845+ </pto_header>
1846+ <para style="terp_default_8">[[ repeatIn(objects,'statement') ]]</para>
1847+ <para style="terp_header_Centre">Statement</para>
1848+ <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table1">
1849+ <tr>
1850+ <td>
1851+ <para style="terp_tblheader_General_Centre">Statement Name</para>
1852+ </td>
1853+ <td>
1854+ <para style="terp_tblheader_General_Centre">Journal</para>
1855+ </td>
1856+ <td>
1857+ <para style="terp_tblheader_General_Centre">Company</para>
1858+ </td>
1859+ <td>
1860+ <para style="terp_tblheader_General_Centre">User</para>
1861+ </td>
1862+ </tr>
1863+ </blockTable>
1864+ <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table2">
1865+ <tr>
1866+ <td>
1867+ <para style="terp_default_Centre_8">[[ statement.name ]]</para>
1868+ </td>
1869+ <td>
1870+ <para style="terp_default_Centre_8">[[ statement.journal_id.name ]]</para>
1871+ </td>
1872+ <td>
1873+ <para style="terp_default_Centre_8">[[ statement.company_id.name ]]</para>
1874+ </td>
1875+ <td>
1876+ <para style="terp_default_Centre_8">[[ statement.user_id.name ]]</para>
1877+ </td>
1878+ </tr>
1879+ </blockTable>
1880+ <para style="terp_default_8">
1881+ <font color="white"> </font>
1882+ </para>
1883+ <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table3">
1884+ <tr>
1885+ <td>
1886+ <para style="terp_tblheader_General_Centre">Opening Date</para>
1887+ </td>
1888+ <td>
1889+ <para style="terp_tblheader_General_Centre">Closing Date</para>
1890+ </td>
1891+ <td>
1892+ <para style="terp_tblheader_General_Centre">Starting Balance</para>
1893+ </td>
1894+ <td>
1895+ <para style="terp_tblheader_General_Centre">Ending Balance</para>
1896+ </td>
1897+ </tr>
1898+ </blockTable>
1899+ <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table4">
1900+ <tr>
1901+ <td>
1902+ <para style="terp_default_Centre_8">[[ formatLang(statement.date,date=True) ]]</para>
1903+ </td>
1904+ <td>
1905+ <para style="terp_default_Centre_8">[[ formatLang(statement.closing_date,date_time=True)]]</para>
1906+ </td>
1907+ <td>
1908+ <para style="terp_default_Centre_8">[[ formatLang(statement.balance_start, dp='Amount', currency_obj = company.currency_id) ]]</para>
1909+ </td>
1910+ <td>
1911+ <para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real, dp='Amount', currency_obj = company.currency_id) ]]</para>
1912+ </td>
1913+ </tr>
1914+ </blockTable>
1915+ <para style="terp_default_8">
1916+ <font color="white"> </font>
1917+ </para>
1918+ <blockTable colWidths="131.0,292.0,97.0" style="Table9">
1919+ <tr>
1920+ <td>
1921+ <para style="terp_tblheader_Details">Name</para>
1922+ </td>
1923+ <td>
1924+ <para style="terp_tblheader_Details">Partner</para>
1925+ </td>
1926+ <td>
1927+ <para style="terp_tblheader_Details_Right">Amount </para>
1928+ </td>
1929+ </tr>
1930+ </blockTable>
1931+ <section>
1932+ <para style="terp_default_1">[[ repeatIn(statement.line_ids,'line_ids') and ' ' or removeParentNode('blockTable') ]]</para>
1933+ <section>
1934+ <para style="terp_default_1">[[ repeatIn(get_data(statement), 'line_ids')]]</para>
1935+ <blockTable colWidths="131.0,292.0,97.0" style="Table5">
1936+ <tr>
1937+ <td>
1938+ <para style="terp_default_9">[[ line_ids.name ]]</para>
1939+ </td>
1940+ <td>
1941+ <para style="terp_default_9">[[ line_ids.partner_id.name ]]</para>
1942+ </td>
1943+ <td>
1944+ <para style="terp_default_Right_9">[[ formatLang(line_ids.amount, dp='Amount', currency_obj=company.currency_id) ]]</para>
1945+ </td>
1946+ </tr>
1947+ </blockTable>
1948+ </section>
1949+ </section>
1950+ <blockTable colWidths="374.0,49.0,97.0" style="Table7">
1951+ <tr>
1952+ <td>
1953+ <para style="terp_default_8">
1954+ <font color="white"> </font>
1955+ </para>
1956+ </td>
1957+ <td>
1958+ <para style="terp_tblheader_Details">Total :</para>
1959+ </td>
1960+ <td>
1961+ <para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement.line_ids), dp='Amount', currency_obj = company.currency_id) ]]</para>
1962+ </td>
1963+ </tr>
1964+ </blockTable>
1965+ <para style="terp_default_8">
1966+ <font color="white"> </font>
1967+ </para>
1968+ <para style="terp_default_8">
1969+ <font color="white"> </font>
1970+ </para>
1971+ <para style="terp_default_8">
1972+ <font color="white"> </font>
1973+ </para>
1974+ </pto>
1975+ </story>
1976+</document>
1977
1978=== added file 'point_of_sale/report/pos_details.rml.THIS'
1979--- point_of_sale/report/pos_details.rml.THIS 1970-01-01 00:00:00 +0000
1980+++ point_of_sale/report/pos_details.rml.THIS 2014-05-02 07:31:45 +0000
1981@@ -0,0 +1,400 @@
1982+<?xml version="1.0"?>
1983+<document filename="test.pdf">
1984+ <template title="Details of Sales" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
1985+ <pageTemplate id="first">
1986+ <frame id="first" x1="28.0" y1="57.0" width="511" height="728"/>
1987+ </pageTemplate>
1988+ </template>
1989+ <stylesheet>
1990+ <blockTableStyle id="Standard_Outline">
1991+ <blockAlignment value="LEFT"/>
1992+ <blockValign value="TOP"/>
1993+ </blockTableStyle>
1994+ <blockTableStyle id="Table1">
1995+ <blockAlignment value="LEFT"/>
1996+ <blockValign value="TOP"/>
1997+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
1998+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
1999+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
2000+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
2001+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
2002+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
2003+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
2004+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
2005+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
2006+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
2007+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
2008+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
2009+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
2010+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
2011+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
2012+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
2013+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
2014+ </blockTableStyle>
2015+ <blockTableStyle id="Table2">
2016+ <blockAlignment value="LEFT"/>
2017+ <blockValign value="TOP"/>
2018+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
2019+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
2020+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
2021+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
2022+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
2023+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
2024+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
2025+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
2026+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
2027+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
2028+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
2029+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
2030+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
2031+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
2032+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
2033+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
2034+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
2035+ </blockTableStyle>
2036+ <blockTableStyle id="Table4">
2037+ <blockAlignment value="LEFT"/>
2038+ <blockValign value="TOP"/>
2039+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
2040+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
2041+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
2042+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
2043+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
2044+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
2045+ <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
2046+ </blockTableStyle>
2047+ <blockTableStyle id="Table6">
2048+ <blockAlignment value="LEFT"/>
2049+ <blockValign value="TOP"/>
2050+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
2051+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
2052+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
2053+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
2054+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
2055+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
2056+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
2057+ </blockTableStyle>
2058+ <blockTableStyle id="Table3">
2059+ <blockAlignment value="LEFT"/>
2060+ <blockValign value="TOP"/>
2061+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
2062+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
2063+ </blockTableStyle>
2064+ <blockTableStyle id="Table5">
2065+ <blockAlignment value="LEFT"/>
2066+ <blockValign value="TOP"/>
2067+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
2068+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
2069+ </blockTableStyle>
2070+ <blockTableStyle id="Table9">
2071+ <blockAlignment value="LEFT"/>
2072+ <blockValign value="TOP"/>
2073+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
2074+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
2075+ </blockTableStyle>
2076+ <blockTableStyle id="Table11">
2077+ <blockAlignment value="LEFT"/>
2078+ <blockValign value="TOP"/>
2079+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
2080+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
2081+ </blockTableStyle>
2082+ <blockTableStyle id="Table8">
2083+ <blockAlignment value="LEFT"/>
2084+ <blockValign value="TOP"/>
2085+ </blockTableStyle>
2086+ <blockTableStyle id="Table7">
2087+ <blockAlignment value="LEFT"/>
2088+ <blockValign value="TOP"/>
2089+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
2090+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
2091+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,1" stop="0,1"/>
2092+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,1" stop="1,1"/>
2093+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
2094+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,2" stop="0,2"/>
2095+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
2096+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,2"/>
2097+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
2098+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,3" stop="0,3"/>
2099+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
2100+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,3" stop="1,3"/>
2101+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
2102+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,4" stop="0,4"/>
2103+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
2104+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,4" stop="1,4"/>
2105+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
2106+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,5" stop="0,5"/>
2107+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
2108+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,5" stop="1,5"/>
2109+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
2110+ </blockTableStyle>
2111+ <initialize>
2112+ <paraStyle name="all" alignment="justify"/>
2113+ </initialize>
2114+ <paraStyle name="Standard" fontName="Helvetica"/>
2115+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
2116+ <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
2117+ <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
2118+ <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
2119+ <paraStyle name="Index" fontName="Helvetica"/>
2120+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
2121+ <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2122+ <paraStyle name="Table Contents" fontName="Helvetica"/>
2123+ <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
2124+ <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2125+ <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2126+ <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2127+ <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
2128+ <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
2129+ <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
2130+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
2131+ <paraStyle name="Footer" fontName="Helvetica"/>
2132+ <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
2133+ <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
2134+ <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
2135+ <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
2136+ <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
2137+ <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
2138+ <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
2139+ <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
2140+ <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2141+ <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
2142+ <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
2143+ <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2144+ <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
2145+ <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2146+ <images/>
2147+ </stylesheet>
2148+ <story>
2149+ <para style="terp_default_8">
2150+ <font color="white"> </font>
2151+ </para>
2152+ <para style="terp_header_Centre">Details of Sales</para>
2153+ <para style="terp_default_8">
2154+ <font color="white"> </font>
2155+ </para>
2156+ <blockTable colWidths="104.0,104.0,133.0,85.0,86.0" style="Table1">
2157+ <tr>
2158+ <td>
2159+ <para style="terp_tblheader_General_Centre">Company</para>
2160+ </td>
2161+ <td>
2162+ <para style="terp_tblheader_General_Centre">Users</para>
2163+ </td>
2164+ <td>
2165+ <para style="terp_tblheader_General_Centre">Print Date</para>
2166+ </td>
2167+ <td>
2168+ <para style="terp_tblheader_General_Centre">Start Period</para>
2169+ </td>
2170+ <td>
2171+ <para style="terp_tblheader_General_Centre">End Period</para>
2172+ </td>
2173+ </tr>
2174+ </blockTable>
2175+ <blockTable colWidths="104.0,104.0,133.0,85.0,85.0" style="Table2">
2176+ <tr>
2177+ <td>
2178+ <para style="terp_default_Centre_8">[[ company.name ]]</para>
2179+ </td>
2180+ <td>
2181+ <para style="terp_default_Centre_8">[[ get_user_names(data['form']['user_ids']) or 'All' ]]</para>
2182+ </td>
2183+ <td>
2184+ <para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</para>
2185+ </td>
2186+ <td>
2187+ <para style="terp_default_Centre_8">[[ formatLang(data['form']['date_start'],date=True) ]] </para>
2188+ </td>
2189+ <td>
2190+ <para style="terp_default_Centre_8">[[ formatLang(data['form']['date_end'],date=True) ]] </para>
2191+ </td>
2192+ </tr>
2193+ </blockTable>
2194+ <para style="terp_default_8">
2195+ <font color="white"> </font>
2196+ </para>
2197+ <blockTable colWidths="108.0,54.0,159.0,54.0,75.0,30.0,69.0" style="Table4">
2198+ <tr>
2199+ <td>
2200+ <para style="terp_tblheader_Details">Date</para>
2201+ </td>
2202+ <td>
2203+ <para style="terp_tblheader_Details">Order</para>
2204+ </td>
2205+ <td>
2206+ <para style="terp_tblheader_Details">Product</para>
2207+ </td>
2208+ <td>
2209+ <para style="terp_tblheader_Details_Right">Price </para>
2210+ </td>
2211+ <td>
2212+ <para style="terp_tblheader_Details_Centre">Qty</para>
2213+ </td>
2214+ <td>
2215+ <para style="terp_tblheader_Details_Right">Disc(%) </para>
2216+ </td>
2217+ <td>
2218+ <para style="terp_tblheader_Details_Centre">Invoiced </para>
2219+ </td>
2220+ </tr>
2221+ </blockTable>
2222+ <section>
2223+ <para style="terp_default_1">[[ repeatIn(pos_sales_details(data['form']), 'line_ids') ]]</para>
2224+ <blockTable colWidths="108.0,54.0,159.0,54.0,75.0,30.0,69.0" style="Table6">
2225+ <tr>
2226+ <td>
2227+ <para style="terp_default_9">[[ formatLang(line_ids['date_order'],date_time = True) ]]</para>
2228+ </td>
2229+ <td>
2230+ <para style="terp_default_9">[[ line_ids['pos_name'] ]]</para>
2231+ </td>
2232+ <td>
2233+ <para style="terp_default_9">[ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]]</para>
2234+ </td>
2235+ <td>
2236+ <para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit'], dp='Sale Price', currency_obj = company.currency_id) ]]</para>
2237+ </td>
2238+ <td>
2239+ <para style="terp_default_Centre_9">[[ formatLang(line_ids['qty']) ]] [[ line_ids['uom'] ]]</para>
2240+ </td>
2241+ <td>
2242+ <para style="terp_default_Centre_9">[[ formatLang(line_ids['discount'], dp='Sale Price') ]]</para>
2243+ </td>
2244+ <td>
2245+ <para style="terp_default_Centre_9">[[ getinvoice(line_ids['invoice_id']) or removeParentNode('font') ]]</para>
2246+ </td>
2247+ </tr>
2248+ </blockTable>
2249+ </section>
2250+ <para style="terp_default_8">
2251+ <font color="white"> </font>
2252+ </para>
2253+ <blockTable colWidths="256.0,256.0" style="Table3">
2254+ <tr>
2255+ <td>
2256+ <para style="terp_tblheader_Details">Taxes</para>
2257+ </td>
2258+ <td>
2259+ <para style="terp_default_8">
2260+ <font color="white"> </font>
2261+ </para>
2262+ </td>
2263+ </tr>
2264+ </blockTable>
2265+ <section>
2266+ <para style="terp_default_1">[[ repeatIn(gettaxamount(data['form']), 'p')]]</para>
2267+ <blockTable colWidths="256.0,256.0" style="Table5">
2268+ <tr>
2269+ <td>
2270+ <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para>
2271+ </td>
2272+ <td>
2273+ <para style="terp_default_Right_9_Bold">[[ formatLang(p['amount'], currency_obj = company.currency_id) or removeParentNode('tr') ]]</para>
2274+ </td>
2275+ </tr>
2276+ </blockTable>
2277+ <para style="terp_default_1">
2278+ <font color="white"> </font>
2279+ </para>
2280+ </section>
2281+ <para style="terp_default_8">
2282+ <font color="white"> </font>
2283+ </para>
2284+ <blockTable colWidths="257.0,255.0" style="Table9">
2285+ <tr>
2286+ <td>
2287+ <para style="terp_tblheader_Details">Payment</para>
2288+ </td>
2289+ <td>
2290+ <para style="terp_default_8">
2291+ <font color="white"> </font>
2292+ </para>
2293+ </td>
2294+ </tr>
2295+ </blockTable>
2296+ <section>
2297+ <para style="terp_default_1">[[ repeatIn(getpayments(data['form']), 'p') ]]</para>
2298+ <blockTable colWidths="255.0,255.0" style="Table11">
2299+ <tr>
2300+ <td>
2301+ <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para>
2302+ </td>
2303+ <td>
2304+ <para style="terp_default_Right_9_Bold">[[ formatLang(p['sum'], dp='Amount', currency_obj = company.currency_id) or removeParentNode('tr') ]]</para>
2305+ </td>
2306+ </tr>
2307+ </blockTable>
2308+ <para style="terp_default_1">
2309+ <font color="white"> </font>
2310+ </para>
2311+ </section>
2312+ <para style="terp_default_8">
2313+ <font color="white"> </font>
2314+ </para>
2315+ <blockTable colWidths="257.0,255.0" style="Table8">
2316+ <tr>
2317+ <td>
2318+ <para style="terp_tblheader_Details">Summary</para>
2319+ </td>
2320+ <td>
2321+ <para style="terp_default_9">
2322+ <font color="white"> </font>
2323+ </para>
2324+ </td>
2325+ </tr>
2326+ </blockTable>
2327+ <blockTable colWidths="257.0,254.0" style="Table7">
2328+ <tr>
2329+ <td>
2330+ <para style="terp_default_Bold_9">Sales total(Revenue)</para>
2331+ </td>
2332+ <td>
2333+ <para style="terp_default_Right_9_Bold">[[ formatLang(getsalestotal2(), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
2334+ </td>
2335+ </tr>
2336+ <tr>
2337+ <td>
2338+ <para style="terp_default_Bold_9">Qty of product</para>
2339+ </td>
2340+ <td>
2341+ <para style="terp_default_Right_9_Bold">[[ formatLang(getqtytotal2()) ]]</para>
2342+ </td>
2343+ </tr>
2344+ <tr>
2345+ <td>
2346+ <para style="terp_default_Bold_9">Total invoiced</para>
2347+ </td>
2348+ <td>
2349+ <para style="terp_default_Right_9_Bold">[[ formatLang(getsuminvoice2(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
2350+ </td>
2351+ </tr>
2352+ <tr>
2353+ <td>
2354+ <para style="terp_default_Bold_9">Total discount</para>
2355+ </td>
2356+ <td>
2357+ <para style="terp_default_Right_9_Bold">[[ formatLang(getsumdisc(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
2358+ </td>
2359+ </tr>
2360+ <tr>
2361+ <td>
2362+ <para style="terp_default_Bold_9">Total paid</para>
2363+ </td>
2364+ <td>
2365+ <para style="terp_default_Right_9_Bold">[[ formatLang(getpaidtotal2(), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
2366+ </td>
2367+ </tr>
2368+ <tr>
2369+ <td>
2370+ <para style="terp_default_Bold_9">Total of the day</para>
2371+ </td>
2372+ <td>
2373+ <para style="terp_default_Right_9_Bold">[[ formatLang(gettotalofthaday(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
2374+ </td>
2375+ </tr>
2376+ </blockTable>
2377+ <para style="terp_default_8">
2378+ <font color="white"> </font>
2379+ </para>
2380+ </story>
2381+</document>
2382
2383=== modified file 'point_of_sale/static/src/js/models.js'
2384--- point_of_sale/static/src/js/models.js 2014-03-20 16:45:30 +0000
2385+++ point_of_sale/static/src/js/models.js 2014-05-02 07:31:45 +0000
2386@@ -204,7 +204,7 @@
2387 self.currency = currencies[0];
2388
2389 /*
2390- return (new instance.web.Model('decimal.precision')).call('get_precision',[['Account']]);
2391+ return (new instance.web.Model('decimal.precision')).call('get_precision',[['Amount']]);
2392 }).then(function(precision){
2393 self.accounting_precision = precision;
2394 console.log("PRECISION",precision);
2395
2396=== modified file 'procurement/procurement.py'
2397--- procurement/procurement.py 2014-04-24 12:35:38 +0000
2398+++ procurement/procurement.py 2014-05-02 07:31:45 +0000
2399@@ -92,7 +92,7 @@
2400 'date_planned': fields.datetime('Scheduled date', required=True, select=True),
2401 'date_close': fields.datetime('Date Closed'),
2402 'product_id': fields.many2one('product.product', 'Product', required=True, states={'draft':[('readonly',False)]}, readonly=True),
2403- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
2404+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
2405 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, states={'draft':[('readonly',False)]}, readonly=True),
2406 'product_uos_qty': fields.float('UoS Quantity', states={'draft':[('readonly',False)]}, readonly=True),
2407 'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True),
2408
2409=== modified file 'product/pricelist.py'
2410--- product/pricelist.py 2014-03-17 12:01:26 +0000
2411+++ product/pricelist.py 2014-05-02 07:31:45 +0000
2412@@ -432,18 +432,18 @@
2413 'base_pricelist_id': fields.many2one('product.pricelist', 'Other Pricelist'),
2414
2415 'price_surcharge': fields.float('Price Surcharge',
2416- 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.'),
2417- 'price_discount': fields.float('Price Discount', digits=(16,4)),
2418+ digits_compute= dp.get_precision('Price'), help='Specify the fixed amount to add or substract(if negative) to the amount calculated with the discount.'),
2419+ 'price_discount': fields.float('Price Discount', digits_compute=dp.get_precision('Price')),
2420 'price_round': fields.float('Price Rounding',
2421- digits_compute= dp.get_precision('Product Price'),
2422+ digits_compute= dp.get_precision('Price'),
2423 help="Sets the price so that it is a multiple of this value.\n" \
2424 "Rounding is applied after the discount and before the surcharge.\n" \
2425 "To have prices that end in 9.99, set rounding 10, surcharge -0.01" \
2426 ),
2427 'price_min_margin': fields.float('Min. Price Margin',
2428- digits_compute= dp.get_precision('Product Price'), help='Specify the minimum amount of margin over the base price.'),
2429+ digits_compute= dp.get_precision('Price'), help='Specify the minimum amount of margin over the base price.'),
2430 'price_max_margin': fields.float('Max. Price Margin',
2431- digits_compute= dp.get_precision('Product Price'), help='Specify the maximum amount of margin over the base price.'),
2432+ digits_compute= dp.get_precision('Price'), help='Specify the maximum amount of margin over the base price.'),
2433 'company_id': fields.related('price_version_id','company_id',type='many2one',
2434 readonly=True, relation='res.company', string='Company', store=True)
2435 }
2436
2437=== modified file 'product/product.py'
2438--- product/product.py 2014-04-25 12:59:26 +0000
2439+++ product/product.py 2014-05-02 07:31:45 +0000
2440@@ -139,7 +139,7 @@
2441 string='Bigger Ratio',
2442 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category:\n'\
2443 '1 * (this unit) = ratio * (reference unit)', required=True),
2444- 'rounding': fields.float('Rounding Precision', digits_compute=dp.get_precision('Product Unit of Measure'), required=True,
2445+ 'rounding': fields.float('Rounding Precision', digits_compute=dp.get_precision('Quantity'), required=True,
2446 help="The computed quantity will be a multiple of this value. "\
2447 "Use 1.0 for a Unit of Measure that cannot be further split, such as a piece."),
2448 'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."),
2449@@ -371,11 +371,11 @@
2450 'rental': fields.boolean('Can be Rent'),
2451 'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
2452 'public_categ_id': fields.many2one('product.public.category','Public Category', help="Those categories are used to group similar products for public sales (eg.: point of sale, e-commerce)."),
2453- '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."),
2454- 'standard_price': fields.float('Cost Price', digits_compute=dp.get_precision('Product Price'), help="Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user"),
2455+ '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."),
2456+ 'standard_price': fields.float('Cost Price', digits_compute=dp.get_precision('Price'), help="Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user"),
2457 'volume': fields.float('Volume', help="The volume in m3."),
2458- 'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."),
2459- 'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."),
2460+ 'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Weight'), help="The gross weight in Kg."),
2461+ 'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Weight'), help="The net weight in Kg."),
2462 'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True,
2463 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."),
2464 'warranty': fields.float('Warranty'),
2465@@ -389,7 +389,7 @@
2466 '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."),
2467 'uos_id' : fields.many2one('product.uom', 'Unit of Sale',
2468 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.'),
2469- 'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Product UoS'),
2470+ 'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Quantity'),
2471 help='Coefficient to convert default Unit of Measure to Unit of Sale\n'
2472 ' uos = uom * coeff'),
2473 'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'),
2474@@ -646,8 +646,8 @@
2475 'virtual_available': fields.function(_product_virtual_available, type='float', string='Quantity Available'),
2476 'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'),
2477 'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'),
2478- 'price': fields.function(_product_price, fnct_inv=_save_product_lst_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')),
2479- 'lst_price' : fields.function(_product_lst_price, fnct_inv=_save_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Product Price')),
2480+ 'price': fields.function(_product_price, fnct_inv=_save_product_lst_price, type='float', string='Price', digits_compute=dp.get_precision('Price')),
2481+ 'lst_price' : fields.function(_product_lst_price, fnct_inv=_save_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Price')),
2482 'code': fields.function(_product_code, type='char', string='Internal Reference'),
2483 'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),
2484 'default_code' : fields.char('Internal Reference', select=True),
2485@@ -658,8 +658,8 @@
2486 _is_only_child, type='boolean', string='Sole child of the parent template'),
2487 'ean13': fields.char('EAN13 Barcode', size=13, help="International Article Number used for product identification."),
2488 '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."),
2489- 'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Product Price'), help="Price Extra: Extra price for the variant on sale price. eg. 200 price extra, 1000 + 200 = 1200."),
2490- 'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Product Price'), help="Price Margin: Margin in percentage amount on sale price for the variant. eg. 10 price margin, 1000 * 1.1 = 1100."),
2491+ 'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Price'), help="Price Extra: Extra price for the variant on sale price. eg. 200 price extra, 1000 + 200 = 1200."),
2492+ 'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Price'), help="Price Margin: Margin in percentage amount on sale price for the variant. eg. 10 price margin, 1000 * 1.1 = 1100."),
2493 'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
2494 'name_template': fields.related('product_tmpl_id', 'name', string="Template Name", type='char', store={
2495 'product.template': (_get_name_template_ids, ['name'], 10),
2496@@ -874,7 +874,7 @@
2497 _columns = {
2498 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of packaging."),
2499 'name' : fields.text('Description'),
2500- 'qty' : fields.float('Quantity by Package',
2501+ 'qty' : fields.float('Quantity by Package', digits_compute=dp.get_precision('Quantity'),
2502 help="The total number of products you can put by pallet or box."),
2503 'ul' : fields.many2one('product.ul', 'Type of Package', required=True),
2504 'ul_qty' : fields.integer('Package by layer', help='The number of packages by layer'),
2505@@ -883,9 +883,9 @@
2506 'product_id' : fields.many2one('product.product', 'Product', select=1, ondelete='cascade', required=True),
2507 'ean' : fields.char('EAN', size=14, help="The EAN code of the package unit."),
2508 'code' : fields.char('Code', help="The code of the transport unit."),
2509- 'weight': fields.float('Total Package Weight',
2510+ 'weight': fields.float('Total Package Weight', digits_compute=dp.get_precision('Weight'),
2511 help='The weight of a full package, pallet or box.'),
2512- 'weight_ul': fields.float('Empty Package Weight'),
2513+ 'weight_ul': fields.float('Empty Package Weight', digits_compute=dp.get_precision('Weight')),
2514 'height': fields.float('Height', help='The height of the package'),
2515 'width': fields.float('Width', help='The width of the package'),
2516 'length': fields.float('Length', help='The length of the package'),
2517@@ -948,8 +948,8 @@
2518 'product_code': fields.char('Supplier Product Code', help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."),
2519 'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."),
2520 'product_uom': fields.related('product_tmpl_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier Unit of Measure", readonly="1", help="This comes from the product form."),
2521- '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."),
2522- '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."),
2523+ '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."),
2524+ '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."),
2525 'product_tmpl_id' : fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade', select=True, oldname='product_id'),
2526 '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."),
2527 'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'),
2528@@ -1009,7 +1009,7 @@
2529 'name': fields.char('Description'),
2530 'suppinfo_id': fields.many2one('product.supplierinfo', 'Partner Information', required=True, ondelete='cascade'),
2531 '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."),
2532- '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"),
2533+ '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"),
2534 }
2535 _order = 'min_quantity asc'
2536
2537@@ -1017,7 +1017,7 @@
2538 _inherit = 'res.currency'
2539
2540 def _check_main_currency_rounding(self, cr, uid, ids, context=None):
2541- cr.execute('SELECT digits FROM decimal_precision WHERE name like %s',('Account',))
2542+ cr.execute('SELECT digits FROM decimal_precision WHERE name like %s',('Amount',))
2543 digits = cr.fetchone()
2544 if digits and len(digits):
2545 digits = digits[0]
2546@@ -1036,7 +1036,7 @@
2547 _inherit = 'decimal.precision'
2548
2549 def _check_main_currency_rounding(self, cr, uid, ids, context=None):
2550- cr.execute('SELECT id, digits FROM decimal_precision WHERE name like %s',('Account',))
2551+ cr.execute('SELECT id, digits FROM decimal_precision WHERE name like %s',('Amount',))
2552 res = cr.fetchone()
2553 if res and len(res):
2554 account_precision_id, digits = res
2555
2556=== modified file 'product/product_data.xml'
2557--- product/product_data.xml 2014-04-29 10:19:32 +0000
2558+++ product/product_data.xml 2014-05-02 07:31:45 +0000
2559@@ -241,6 +241,22 @@
2560 <field eval="'product.pricelist,'+str(ref('list0'))" name="value"/>
2561 </record>
2562
2563+ <record forcecreate="True" id="decimal_amount" model="decimal.precision">
2564+ <field name="name">Amount</field>
2565+ <field name="digits">2</field>
2566+ </record>
2567+ <record forcecreate="True" id="decimal_weight" model="decimal.precision">
2568+ <field name="name">Weight</field>
2569+ <field name="digits">2</field>
2570+ </record>
2571+ <record forcecreate="True" id="decimal_qty" model="decimal.precision">
2572+ <field name="name">Quantity</field>
2573+ <field name="digits" eval="3"/>
2574+ </record>
2575+ <record forcecreate="True" id="decimal_percentage" model="decimal.precision">
2576+ <field name="name">Percentage</field>
2577+ <field name="digits" eval="3"/>
2578+ </record>
2579
2580 <!--
2581 Product
2582
2583=== modified file 'product/report/product_pricelist.py'
2584--- product/report/product_pricelist.py 2014-04-14 15:52:12 +0000
2585+++ product/report/product_pricelist.py 2014-05-02 07:31:45 +0000
2586@@ -102,7 +102,7 @@
2587 return res
2588
2589 def _get_price(self, pricelist_id, product_id, qty):
2590- sale_price_digits = self.get_digits(dp='Product Price')
2591+ sale_price_digits = self.get_digits(dp='Price')
2592 pricelist = self.pool.get('product.pricelist').browse(self.cr, self.uid, [pricelist_id], context=self.localcontext)[0]
2593 price_dict = self.pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext)
2594 if price_dict[pricelist_id]:
2595
2596=== modified file 'purchase/purchase.py'
2597--- purchase/purchase.py 2014-04-30 14:01:03 +0000
2598+++ purchase/purchase.py 2014-05-02 07:31:45 +0000
2599@@ -205,15 +205,15 @@
2600 'purchase.order.line': (_get_order, ['date_planned'], 10),
2601 }
2602 ),
2603- 'amount_untaxed': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Untaxed Amount',
2604+ 'amount_untaxed': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Untaxed Amount',
2605 store={
2606 'purchase.order.line': (_get_order, None, 10),
2607 }, multi="sums", help="The amount without tax", track_visibility='always'),
2608- 'amount_tax': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Taxes',
2609+ 'amount_tax': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Taxes',
2610 store={
2611 'purchase.order.line': (_get_order, None, 10),
2612 }, multi="sums", help="The tax amount"),
2613- 'amount_total': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Total',
2614+ 'amount_total': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Total',
2615 store={
2616 'purchase.order.line': (_get_order, None, 10),
2617 }, multi="sums",help="The total amount"),
2618@@ -877,15 +877,15 @@
2619
2620 _columns = {
2621 'name': fields.text('Description', required=True),
2622- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
2623+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
2624 'date_planned': fields.date('Scheduled Date', required=True, select=True),
2625 'taxes_id': fields.many2many('account.tax', 'purchase_order_taxe', 'ord_id', 'tax_id', 'Taxes'),
2626 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
2627 'product_id': fields.many2one('product.product', 'Product', domain=[('purchase_ok','=',True)], change_default=True),
2628 'move_ids': fields.one2many('stock.move', 'purchase_line_id', 'Reservation', readonly=True, ondelete='set null'),
2629 'move_dest_id': fields.many2one('stock.move', 'Reservation Destination', ondelete='set null'),
2630- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
2631- 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),
2632+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
2633+ 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Amount')),
2634 'order_id': fields.many2one('purchase.order', 'Order Reference', select=True, required=True, ondelete='cascade'),
2635 'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',),
2636 'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
2637
2638=== modified file 'purchase_requisition/purchase_requisition.py'
2639--- purchase_requisition/purchase_requisition.py 2014-03-25 11:29:09 +0000
2640+++ purchase_requisition/purchase_requisition.py 2014-05-02 07:31:45 +0000
2641@@ -173,7 +173,7 @@
2642 _columns = {
2643 'product_id': fields.many2one('product.product', 'Product' ),
2644 'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure'),
2645- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
2646+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
2647 'requisition_id' : fields.many2one('purchase.requisition','Purchase Requisition', ondelete='cascade'),
2648 'company_id': fields.related('requisition_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
2649 }
2650
2651=== modified file 'report_intrastat/report_intrastat.py'
2652--- report_intrastat/report_intrastat.py 2013-10-27 12:31:04 +0000
2653+++ report_intrastat/report_intrastat.py 2014-05-02 07:31:45 +0000
2654@@ -67,7 +67,7 @@
2655 'code': fields.char('Country code', size=2, readonly=True),
2656 'intrastat_id': fields.many2one('report.intrastat.code', 'Intrastat code', readonly=True),
2657 'weight': fields.float('Weight', readonly=True),
2658- 'value': fields.float('Value', readonly=True, digits_compute=dp.get_precision('Account')),
2659+ 'value': fields.float('Value', readonly=True, digits_compute=dp.get_precision('Amount')),
2660 'type': fields.selection([('import', 'Import'), ('export', 'Export')], 'Type'),
2661 'currency_id': fields.many2one('res.currency', "Currency", readonly=True),
2662 }
2663
2664=== modified file 'sale/sale.py'
2665--- sale/sale.py 2014-04-14 09:03:36 +0000
2666+++ sale/sale.py 2014-05-02 07:31:45 +0000
2667@@ -203,19 +203,19 @@
2668 fnct_search=_invoiced_search, type='boolean', help="It indicates that sales order has at least one invoice."),
2669 'note': fields.text('Terms and conditions'),
2670
2671- 'amount_untaxed': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Account'), string='Untaxed Amount',
2672+ 'amount_untaxed': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Amount'), string='Untaxed Amount',
2673 store={
2674 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
2675 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
2676 },
2677 multi='sums', help="The amount without tax.", track_visibility='always'),
2678- 'amount_tax': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Account'), string='Taxes',
2679+ 'amount_tax': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Amount'), string='Taxes',
2680 store={
2681 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
2682 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
2683 },
2684 multi='sums', help="The tax amount."),
2685- 'amount_total': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Account'), string='Total',
2686+ 'amount_total': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Amount'), string='Total',
2687 store={
2688 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
2689 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
2690@@ -680,17 +680,17 @@
2691 store={
2692 'account.invoice': (_order_lines_from_invoice, ['state'], 10),
2693 'sale.order.line': (lambda self,cr,uid,ids,ctx=None: ids, ['invoice_lines'], 10)}),
2694- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price'), readonly=True, states={'draft': [('readonly', False)]}),
2695+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price'), readonly=True, states={'draft': [('readonly', False)]}),
2696 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},
2697 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."),
2698- 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),
2699+ 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Amount')),
2700 'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft': [('readonly', False)]}),
2701 'address_allotment_id': fields.many2one('res.partner', 'Allotment Partner',help="A partner to whom the particular product needs to be allotted."),
2702- 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product UoS'), required=True, readonly=True, states={'draft': [('readonly', False)]}),
2703+ 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True, readonly=True, states={'draft': [('readonly', False)]}),
2704 'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft': [('readonly', False)]}),
2705- 'product_uos_qty': fields.float('Quantity (UoS)' ,digits_compute= dp.get_precision('Product UoS'), readonly=True, states={'draft': [('readonly', False)]}),
2706+ 'product_uos_qty': fields.float('Quantity (UoS)' ,digits_compute= dp.get_precision('Quantity'), readonly=True, states={'draft': [('readonly', False)]}),
2707 'product_uos': fields.many2one('product.uom', 'Product UoS'),
2708- 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount'), readonly=True, states={'draft': [('readonly', False)]}),
2709+ 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price'), readonly=True, states={'draft': [('readonly', False)]}),
2710 'th_weight': fields.float('Weight', readonly=True, states={'draft': [('readonly', False)]}),
2711 'state': fields.selection([('cancel', 'Cancelled'),('draft', 'Draft'),('confirmed', 'Confirmed'),('exception', 'Exception'),('done', 'Done')], 'Status', required=True, readonly=True,
2712 help='* The \'Draft\' status is set when the related sales order in draft status. \
2713@@ -758,7 +758,7 @@
2714 pu = 0.0
2715 if uosqty:
2716 pu = round(line.price_unit * line.product_uom_qty / uosqty,
2717- self.pool.get('decimal.precision').precision_get(cr, uid, 'Product Price'))
2718+ self.pool.get('decimal.precision').precision_get(cr, uid, 'Price'))
2719 fpos = line.order_id.fiscal_position or False
2720 account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id)
2721 if not account_id:
2722
2723=== modified file 'sale/wizard/sale_make_invoice_advance.py'
2724--- sale/wizard/sale_make_invoice_advance.py 2013-10-27 12:31:04 +0000
2725+++ sale/wizard/sale_make_invoice_advance.py 2014-05-02 07:31:45 +0000
2726@@ -39,7 +39,7 @@
2727 'product_id': fields.many2one('product.product', 'Advance Product',
2728 help="""Select a product of type service which is called 'Advance Product'.
2729 You may have to create it and set it as a default value on this field."""),
2730- 'amount': fields.float('Advance Amount', digits_compute= dp.get_precision('Account'),
2731+ 'amount': fields.float('Advance Amount', digits_compute= dp.get_precision('Amount'),
2732 help="The amount to be invoiced in advance."),
2733 }
2734
2735
2736=== modified file 'stock/product.py'
2737--- stock/product.py 2014-02-12 17:51:41 +0000
2738+++ stock/product.py 2014-05-02 07:31:45 +0000
2739@@ -357,7 +357,7 @@
2740 'reception_count': fields.function(_stock_move_count, string="Reception", type='integer', multi='pickings'),
2741 'delivery_count': fields.function(_stock_move_count, string="Delivery", type='integer', multi='pickings'),
2742 'qty_available': fields.function(_product_available, multi='qty_available',
2743- type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
2744+ type='float', digits_compute=dp.get_precision('Quantity'),
2745 string='Quantity On Hand',
2746 help="Current quantity of products.\n"
2747 "In a context with a single Stock Location, this includes "
2748@@ -370,7 +370,7 @@
2749 "Otherwise, this includes goods stored in any Stock Location "
2750 "with 'internal' type."),
2751 'virtual_available': fields.function(_product_available, multi='qty_available',
2752- type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
2753+ type='float', digits_compute=dp.get_precision('Quantity'),
2754 string='Forecasted Quantity',
2755 help="Forecast quantity (computed as Quantity On Hand "
2756 "- Outgoing + Incoming)\n"
2757@@ -382,7 +382,7 @@
2758 "Otherwise, this includes goods stored in any Stock Location "
2759 "with 'internal' type."),
2760 'incoming_qty': fields.function(_product_available, multi='qty_available',
2761- type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
2762+ type='float', digits_compute=dp.get_precision('Quantity'),
2763 string='Incoming',
2764 help="Quantity of products that are planned to arrive.\n"
2765 "In a context with a single Stock Location, this includes "
2766@@ -393,7 +393,7 @@
2767 "Otherwise, this includes goods arriving to any Stock "
2768 "Location with 'internal' type."),
2769 'outgoing_qty': fields.function(_product_available, multi='qty_available',
2770- type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
2771+ type='float', digits_compute=dp.get_precision('Quantity'),
2772 string='Outgoing',
2773 help="Quantity of products that are planned to leave.\n"
2774 "In a context with a single Stock Location, this includes "
2775
2776=== modified file 'stock/report/lot_overview.rml'
2777--- stock/report/lot_overview.rml 2012-11-29 22:26:45 +0000
2778+++ stock/report/lot_overview.rml 2014-05-02 07:31:45 +0000
2779@@ -181,10 +181,10 @@
2780 <para style="terp_default_Right_9">[[formatLang( p['prod_qty']) ]] [[ p['uom'] ]]</para>
2781 </td>
2782 <td>
2783- <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Account') ]]</para>
2784+ <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Amount') ]]</para>
2785 </td>
2786 <td>
2787- <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Account', currency_obj = o.company_id.currency_id)]]</para>
2788+ <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Amount', currency_obj = o.company_id.currency_id)]]</para>
2789 </td>
2790 </tr>
2791 </blockTable>
2792@@ -198,7 +198,7 @@
2793 <para style="terp_default_Bold_9">Total:</para>
2794 </td>
2795 <td>
2796- <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>
2797+ <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
2798 </td>
2799 </tr>
2800 </blockTable>
2801@@ -215,7 +215,7 @@
2802 </para>
2803 </td>
2804 <td>
2805- <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>
2806+ <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
2807 </td>
2808 </tr>
2809 </blockTable>
2810
2811=== modified file 'stock/report/lot_overview_all.rml'
2812--- stock/report/lot_overview_all.rml 2012-11-29 22:26:45 +0000
2813+++ stock/report/lot_overview_all.rml 2014-05-02 07:31:45 +0000
2814@@ -181,10 +181,10 @@
2815 <para style="terp_default_Right_9">[[formatLang( p['prod_qty']) ]] [[ p['uom'] ]]</para>
2816 </td>
2817 <td>
2818- <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Account') ]]</para>
2819+ <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Amount') ]]</para>
2820 </td>
2821 <td>
2822- <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Account', currency_obj = o.company_id.currency_id)]]</para>
2823+ <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Amount', currency_obj = o.company_id.currency_id)]]</para>
2824 </td>
2825 </tr>
2826 </blockTable>
2827@@ -198,7 +198,7 @@
2828 <para style="terp_default_Bold_9">Total:</para>
2829 </td>
2830 <td>
2831- <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>
2832+ <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
2833 </td>
2834 </tr>
2835 </blockTable>
2836@@ -215,7 +215,7 @@
2837 </para>
2838 </td>
2839 <td>
2840- <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>
2841+ <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
2842 </td>
2843 </tr>
2844 </blockTable>
2845
2846=== modified file 'stock/report/report_stock_move.py'
2847--- stock/report/report_stock_move.py 2014-01-29 13:55:19 +0000
2848+++ stock/report/report_stock_move.py 2014-05-02 07:31:45 +0000
2849@@ -43,9 +43,9 @@
2850 'product_qty_in':fields.integer('In Qty',readonly=True),
2851 'product_qty_out':fields.integer('Out Qty',readonly=True),
2852 'value' : fields.float('Total Value', required=True),
2853- 'day_diff2':fields.float('Lag (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),
2854- 'day_diff1':fields.float('Planned Lead Time (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),
2855- 'day_diff':fields.float('Execution Lead Time (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),
2856+ 'day_diff2':fields.float('Lag (Days)',readonly=True, group_operator="avg"),
2857+ 'day_diff1':fields.float('Planned Lead Time (Days)',readonly=True, group_operator="avg"),
2858+ 'day_diff':fields.float('Execution Lead Time (Days)',readonly=True, group_operator="avg"),
2859 'stock_journal': fields.many2one('stock.journal','Stock Journal', select=True),
2860
2861
2862@@ -129,8 +129,8 @@
2863 'location_id': fields.many2one('stock.location', 'Location', readonly=True),
2864 'prodlot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True),
2865 'company_id': fields.many2one('res.company', 'Company', readonly=True),
2866- 'product_qty':fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True),
2867- 'value' : fields.float('Total Value', digits_compute=dp.get_precision('Account'), required=True),
2868+ 'product_qty':fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), readonly=True),
2869+ 'value' : fields.float('Total Value', digits_compute=dp.get_precision('Amount'), required=True),
2870 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', readonly=True, select=True,
2871 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\'.\
2872 \nThe state is \'Waiting\' if the move is waiting for another one.'),
2873
2874=== modified file 'stock/res_config.py'
2875--- stock/res_config.py 2013-10-27 12:31:04 +0000
2876+++ stock/res_config.py 2014-05-02 07:31:45 +0000
2877@@ -73,12 +73,12 @@
2878 }
2879
2880 def get_default_dp(self, cr, uid, fields, context=None):
2881- dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_stock_weight')
2882+ dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_weight')
2883 return {'decimal_precision': dp.digits}
2884
2885 def set_default_dp(self, cr, uid, ids, context=None):
2886 config = self.browse(cr, uid, ids[0], context)
2887- dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_stock_weight')
2888+ dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_weight')
2889 dp.write({'digits': config.decimal_precision})
2890
2891 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2892
2893=== modified file 'stock/stock.py'
2894--- stock/stock.py 2014-05-01 15:56:33 +0000
2895+++ stock/stock.py 2014-05-02 07:31:45 +0000
2896@@ -204,8 +204,8 @@
2897
2898 'parent_left': fields.integer('Left Parent', select=1),
2899 'parent_right': fields.integer('Right Parent', select=1),
2900- 'stock_real_value': fields.function(_product_value, type='float', string='Real Stock Value', multi="stock", digits_compute=dp.get_precision('Account')),
2901- 'stock_virtual_value': fields.function(_product_value, type='float', string='Virtual Stock Value', multi="stock", digits_compute=dp.get_precision('Account')),
2902+ 'stock_real_value': fields.function(_product_value, type='float', string='Real Stock Value', multi="stock", digits_compute=dp.get_precision('Amount')),
2903+ 'stock_virtual_value': fields.function(_product_value, type='float', string='Virtual Stock Value', multi="stock", digits_compute=dp.get_precision('Amount')),
2904 'company_id': fields.many2one('res.company', 'Company', select=1, help='Let this field empty if this location is shared between all companies'),
2905 'scrap_location': fields.boolean('Scrap Location', help='Check this box to allow using this location to put scrapped/damaged goods.'),
2906 'valuation_in_account_id': fields.many2one('account.account', 'Stock Valuation Account (Incoming)', domain = [('type','=','other')],
2907@@ -1469,7 +1469,7 @@
2908 'date': fields.datetime('Creation Date', required=True),
2909 'stock_available': fields.function(_get_stock, fnct_search=_stock_search, type="float", string="Available", select=True,
2910 help="Current quantity of products with this Serial Number available in company warehouses",
2911- digits_compute=dp.get_precision('Product Unit of Measure')),
2912+ digits_compute=dp.get_precision('Quantity')),
2913 'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'),
2914 'company_id': fields.many2one('res.company', 'Company', select=True),
2915 'move_ids': fields.one2many('stock.move', 'prodlot_id', 'Moves for this serial number', readonly=True),
2916@@ -1608,7 +1608,7 @@
2917 'date_expected': fields.datetime('Scheduled Date', states={'done': [('readonly', True)]},required=True, select=True, help="Scheduled date for the processing of this move"),
2918 'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type','<>','service')],states={'done': [('readonly', True)]}),
2919
2920- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'),
2921+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'),
2922 required=True,states={'done': [('readonly', True)]},
2923 help="This is the quantity of products from an inventory "
2924 "point of view. For moves in the state 'done', this is the "
2925@@ -1619,7 +1619,7 @@
2926 "the product reservation, and should be done with care."
2927 ),
2928 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True,states={'done': [('readonly', True)]}),
2929- 'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Product Unit of Measure'), states={'done': [('readonly', True)]}),
2930+ 'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Quantity'), states={'done': [('readonly', True)]}),
2931 'product_uos': fields.many2one('product.uom', 'Product UOS', states={'done': [('readonly', True)]}),
2932 'product_packaging': fields.many2one('product.packaging', 'Packaging', help="It specifies attributes of packaging like type, quantity of packaging,etc."),
2933
2934@@ -1649,7 +1649,7 @@
2935 "* 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"\
2936 "* Available: When products are reserved, it is set to \'Available\'.\n"\
2937 "* Done: When the shipment is processed, the state is \'Done\'."),
2938- '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)"),
2939+ '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)"),
2940 '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)"),
2941 'company_id': fields.many2one('res.company', 'Company', required=True, select=True),
2942 'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order of", select=True),
2943@@ -2905,7 +2905,7 @@
2944 'location_id': fields.many2one('stock.location', 'Location', required=True),
2945 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
2946 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
2947- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
2948+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
2949 'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True, readonly=True),
2950 'prod_lot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
2951 'state': fields.related('inventory_id','state',type='char',string='Status',readonly=True),
2952
2953=== modified file 'stock/stock_data.xml'
2954--- stock/stock_data.xml 2012-11-29 22:26:45 +0000
2955+++ stock/stock_data.xml 2014-05-02 07:31:45 +0000
2956@@ -151,12 +151,6 @@
2957 <field eval="'stock.location,'+str(location_production)" name="value"/>
2958 </record>
2959
2960-
2961- <record forcecreate="True" id="decimal_shipping_delay" model="decimal.precision">
2962- <field name="name">Shipping Delay</field>
2963- <field name="digits" eval="2"/>
2964- </record>
2965-
2966 <!--
2967 Resource: stock.warehouse
2968 -->
2969
2970=== modified file 'stock/wizard/stock_change_product_qty.py'
2971--- stock/wizard/stock_change_product_qty.py 2014-03-20 18:17:37 +0000
2972+++ stock/wizard/stock_change_product_qty.py 2014-05-02 07:31:45 +0000
2973@@ -29,7 +29,7 @@
2974 _description = "Change Product Quantity"
2975 _columns = {
2976 'product_id' : fields.many2one('product.product', 'Product'),
2977- '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.'),
2978+ '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.'),
2979 'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
2980 'location_id': fields.many2one('stock.location', 'Location', required=True, domain="[('usage', '=', 'internal')]"),
2981 }
2982
2983=== modified file 'stock/wizard/stock_change_standard_price.py'
2984--- stock/wizard/stock_change_standard_price.py 2013-10-27 12:31:04 +0000
2985+++ stock/wizard/stock_change_standard_price.py 2014-05-02 07:31:45 +0000
2986@@ -27,7 +27,7 @@
2987 _name = "stock.change.standard.price"
2988 _description = "Change Standard Price"
2989 _columns = {
2990- 'new_price': fields.float('Price', required=True, digits_compute=dp.get_precision('Product Price'),
2991+ 'new_price': fields.float('Price', required=True, digits_compute=dp.get_precision('Amount'),
2992 help="If cost price is increased, stock variation account will be debited "
2993 "and stock output account will be credited with the value = (difference of amount * quantity available).\n"
2994 "If cost price is decreased, stock variation account will be creadited and stock input account will be debited."),
2995
2996=== modified file 'stock/wizard/stock_move.py'
2997--- stock/wizard/stock_move.py 2013-10-27 12:31:04 +0000
2998+++ stock/wizard/stock_move.py 2014-05-02 07:31:45 +0000
2999@@ -29,7 +29,7 @@
3000
3001 _columns = {
3002 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
3003- 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
3004+ 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
3005 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
3006 'location_id': fields.many2one('stock.location', 'Location', required=True)
3007 }
3008@@ -163,7 +163,7 @@
3009 return res
3010
3011 _columns = {
3012- 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
3013+ 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
3014 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
3015 'product_uom': fields.many2one('product.uom', 'Unit of Measure'),
3016 'line_ids': fields.one2many('stock.move.split.lines', 'wizard_id', 'Serial Numbers'),
3017@@ -259,7 +259,7 @@
3018 _description = "Stock move Split lines"
3019 _columns = {
3020 'name': fields.char('Serial Number', size=64),
3021- 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),
3022+ 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
3023 'wizard_id': fields.many2one('stock.move.split', 'Parent Wizard'),
3024 'wizard_exist_id': fields.many2one('stock.move.split', 'Parent Wizard (for existing lines)'),
3025 'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number'),
3026
3027=== modified file 'stock/wizard/stock_partial_picking.py'
3028--- stock/wizard/stock_partial_picking.py 2014-01-15 21:44:54 +0000
3029+++ stock/wizard/stock_partial_picking.py 2014-05-02 07:31:45 +0000
3030@@ -43,7 +43,7 @@
3031 _rec_name = 'product_id'
3032 _columns = {
3033 'product_id' : fields.many2one('product.product', string="Product", required=True, ondelete='CASCADE'),
3034- 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
3035+ 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Quantity'), required=True),
3036 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True, ondelete='CASCADE'),
3037 'prodlot_id' : fields.many2one('stock.production.lot', 'Serial Number', ondelete='CASCADE'),
3038 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete='CASCADE', domain = [('usage','<>','view')]),
3039@@ -51,7 +51,7 @@
3040 'move_id' : fields.many2one('stock.move', "Move", ondelete='CASCADE'),
3041 'wizard_id' : fields.many2one('stock.partial.picking', string="Wizard", ondelete='CASCADE'),
3042 'update_cost': fields.boolean('Need cost update'),
3043- 'cost' : fields.float("Cost", help="Unit Cost for this product line", digits_compute=dp.get_precision('Product Price')),
3044+ 'cost' : fields.float("Cost", help="Unit Cost for this product line", digits_compute=dp.get_precision('Price')),
3045 'currency' : fields.many2one('res.currency', string="Currency", help="Currency in which Unit cost is expressed", ondelete='CASCADE'),
3046 'tracking': fields.function(_tracking, string='Tracking', type='boolean'),
3047 }
3048
3049=== modified file 'stock/wizard/stock_return_picking.py'
3050--- stock/wizard/stock_return_picking.py 2013-10-27 12:31:04 +0000
3051+++ stock/wizard/stock_return_picking.py 2014-05-02 07:31:45 +0000
3052@@ -31,7 +31,7 @@
3053
3054 _columns = {
3055 'product_id' : fields.many2one('product.product', string="Product", required=True),
3056- 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True),
3057+ 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Quantity'), required=True),
3058 'wizard_id' : fields.many2one('stock.return.picking', string="Wizard"),
3059 'move_id' : fields.many2one('stock.move', "Move"),
3060 'prodlot_id': fields.related('move_id', 'prodlot_id', type='many2one', relation='stock.production.lot', string='Serial Number', readonly=True),
3061
3062=== modified file 'stock/wizard/stock_splitinto.py'
3063--- stock/wizard/stock_splitinto.py 2013-10-27 12:31:04 +0000
3064+++ stock/wizard/stock_splitinto.py 2014-05-02 07:31:45 +0000
3065@@ -27,7 +27,7 @@
3066 _name = "stock.split.into"
3067 _description = "Split into"
3068 _columns = {
3069- 'quantity': fields.float('Quantity',digits_compute=dp.get_precision('Product Unit of Measure')),
3070+ 'quantity': fields.float('Quantity',digits_compute=dp.get_precision('Quantity')),
3071 }
3072 _defaults = {
3073 'quantity': lambda *x: 0,
3074
3075=== modified file 'website_quote/models/order.py'
3076--- website_quote/models/order.py 2014-04-11 14:20:22 +0000
3077+++ website_quote/models/order.py 2014-05-02 07:31:45 +0000
3078@@ -52,9 +52,9 @@
3079 'name': fields.text('Description', required=True, translate=True),
3080 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True),
3081 'website_description': fields.html('Line Description', translate=True),
3082- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
3083- 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount')),
3084- 'product_uom_qty': fields.float('Quantity', required=True, digits_compute= dp.get_precision('Product UoS')),
3085+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
3086+ 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price')),
3087+ 'product_uom_qty': fields.float('Quantity', required=True, digits_compute= dp.get_precision('Quantity')),
3088 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure ', required=True),
3089 }
3090 _defaults = {
3091@@ -116,7 +116,7 @@
3092 'options' : fields.one2many('sale.order.option', 'order_id', 'Optional Products Lines'),
3093 'validity_date': fields.date('Validity Date'),
3094 'amount_undiscounted': fields.function(_get_total, string='Amount Before Discount', type="float",
3095- digits_compute=dp.get_precision('Account'))
3096+ digits_compute=dp.get_precision('Amount'))
3097 }
3098 _defaults = {
3099 'access_token': lambda self, cr, uid, ctx={}: str(uuid.uuid4())
3100@@ -194,10 +194,10 @@
3101 'name': fields.text('Description', required=True, translate=True),
3102 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True),
3103 'website_description': fields.html('Option Description', translate=True),
3104- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
3105- 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount')),
3106+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
3107+ 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price')),
3108 'uom_id': fields.many2one('product.uom', 'Unit of Measure ', required=True),
3109- 'quantity': fields.float('Quantity', required=True, digits_compute= dp.get_precision('Product UoS')),
3110+ 'quantity': fields.float('Quantity', required=True, digits_compute= dp.get_precision('Quantity')),
3111 }
3112 _defaults = {
3113 'quantity': 1,
3114@@ -222,11 +222,11 @@
3115 'name': fields.text('Description', required=True),
3116 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)]),
3117 'website_description': fields.html('Line Description'),
3118- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),
3119- 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount')),
3120+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
3121+ 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price')),
3122 'uom_id': fields.many2one('product.uom', 'Unit of Measure ', required=True),
3123 'quantity': fields.float('Quantity', required=True,
3124- digits_compute= dp.get_precision('Product UoS')),
3125+ digits_compute= dp.get_precision('Quantity')),
3126 }
3127
3128 _defaults = {
3129
3130=== modified file 'website_sale_delivery/models/sale_order.py'
3131--- website_sale_delivery/models/sale_order.py 2014-04-25 15:25:41 +0000
3132+++ website_sale_delivery/models/sale_order.py 2014-05-02 07:31:45 +0000
3133@@ -40,7 +40,7 @@
3134
3135 _columns = {
3136 'amount_delivery': fields.function(
3137- _amount_all_wrapper, type='float', digits_compute=decimal_precision.get_precision('Account'),
3138+ _amount_all_wrapper, type='float', digits_compute=decimal_precision.get_precision('Amount'),
3139 string='Delivery Amount',
3140 store={
3141 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),

Subscribers

People subscribed via source and target branches

to all changes: