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
=== modified file 'account/account.py'
--- account/account.py 2014-04-24 13:45:33 +0000
+++ account/account.py 2014-05-02 07:31:45 +0000
@@ -76,7 +76,7 @@
76 amount = value76 amount = value
77 result = []77 result = []
78 obj_precision = self.pool.get('decimal.precision')78 obj_precision = self.pool.get('decimal.precision')
79 prec = obj_precision.precision_get(cr, uid, 'Account')79 prec = obj_precision.precision_get(cr, uid, 'Amount')
80 for line in pt.line_ids:80 for line in pt.line_ids:
81 if line.value == 'fixed':81 if line.value == 'fixed':
82 amt = round(line.value_amount, prec)82 amt = round(line.value_amount, prec)
@@ -109,7 +109,7 @@
109 ('fixed', 'Fixed Amount')], 'Computation',109 ('fixed', 'Fixed Amount')], 'Computation',
110 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."""),110 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."""),
111111
112 'value_amount': fields.float('Amount To Pay', digits_compute=dp.get_precision('Payment Term'), help="For percent enter a ratio between 0-1."),112 'value_amount': fields.float('Amount To Pay', digits_compute=dp.get_precision('Price'), help="For percent enter a ratio between 0-1."),
113 'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \113 'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \
114 "If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."),114 "If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."),
115 '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)."),115 '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)."),
@@ -467,14 +467,14 @@
467 'child_parent_ids': fields.one2many('account.account','parent_id','Children'),467 'child_parent_ids': fields.one2many('account.account','parent_id','Children'),
468 'child_consol_ids': fields.many2many('account.account', 'account_account_consol_rel', 'child_id', 'parent_id', 'Consolidated Children'),468 'child_consol_ids': fields.many2many('account.account', 'account_account_consol_rel', 'child_id', 'parent_id', 'Consolidated Children'),
469 'child_id': fields.function(_get_child_ids, type='many2many', relation="account.account", string="Child Accounts"),469 'child_id': fields.function(_get_child_ids, type='many2many', relation="account.account", string="Child Accounts"),
470 'balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Balance', multi='balance'),470 'balance': fields.function(__compute, digits_compute=dp.get_precision('Amount'), string='Balance', multi='balance'),
471 'credit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Account'), string='Credit', multi='balance'),471 'credit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Amount'), string='Credit', multi='balance'),
472 'debit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Account'), string='Debit', multi='balance'),472 'debit': fields.function(__compute, fnct_inv=_set_credit_debit, digits_compute=dp.get_precision('Amount'), string='Debit', multi='balance'),
473 'foreign_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Foreign Balance', multi='balance',473 'foreign_balance': fields.function(__compute, digits_compute=dp.get_precision('Amount'), string='Foreign Balance', multi='balance',
474 help="Total amount (in Secondary currency) for transactions held in secondary currency for this account."),474 help="Total amount (in Secondary currency) for transactions held in secondary currency for this account."),
475 'adjusted_balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Adjusted Balance', multi='balance',475 'adjusted_balance': fields.function(__compute, digits_compute=dp.get_precision('Amount'), string='Adjusted Balance', multi='balance',
476 help="Total amount (in Company currency) for transactions held in secondary currency for this account."),476 help="Total amount (in Company currency) for transactions held in secondary currency for this account."),
477 'unrealized_gain_loss': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Unrealized Gain or Loss', multi='balance',477 'unrealized_gain_loss': fields.function(__compute, digits_compute=dp.get_precision('Amount'), string='Unrealized Gain or Loss', multi='balance',
478 help="Value of Loss or Gain due to changes in exchange rate when doing multi-currency transactions."),478 help="Value of Loss or Gain due to changes in exchange rate when doing multi-currency transactions."),
479 'reconcile': fields.boolean('Allow Reconciliation', help="Check this box if this account allows reconciliation of journal items."),479 'reconcile': fields.boolean('Allow Reconciliation', help="Check this box if this account allows reconciliation of journal items."),
480 'exchange_rate': fields.related('currency_id', 'rate', type='float', string='Exchange Rate', digits=(12,6)),480 'exchange_rate': fields.related('currency_id', 'rate', type='float', string='Exchange Rate', digits=(12,6)),
@@ -1240,11 +1240,11 @@
1240 _name: (lambda self, cr,uid,ids,c: ids, ['line_id'], 10),1240 _name: (lambda self, cr,uid,ids,c: ids, ['line_id'], 10),
1241 'account.move.line': (_get_move_from_lines, ['partner_id'],10)1241 'account.move.line': (_get_move_from_lines, ['partner_id'],10)
1242 }),1242 }),
1243 'amount': fields.function(_amount_compute, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount),1243 'amount': fields.function(_amount_compute, string='Amount', digits_compute=dp.get_precision('Amount'), type='float', fnct_search=_search_amount),
1244 'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True),1244 'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True),
1245 'narration':fields.text('Internal Note'),1245 'narration':fields.text('Internal Note'),
1246 'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),1246 'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
1247 '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"),1247 '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"),
1248 }1248 }
12491249
1250 _defaults = {1250 _defaults = {
@@ -1735,7 +1735,7 @@
1735 for rec in record.child_ids:1735 for rec in record.child_ids:
1736 amount += _rec_get(rec) * rec.sign1736 amount += _rec_get(rec) * rec.sign
1737 return amount1737 return amount
1738 res2[record.id] = round(_rec_get(record), obj_precision.precision_get(cr, uid, 'Account'))1738 res2[record.id] = round(_rec_get(record), obj_precision.precision_get(cr, uid, 'Amount'))
1739 return res21739 return res2
17401740
1741 def _sum_year(self, cr, uid, ids, name, args, context=None):1741 def _sum_year(self, cr, uid, ids, name, args, context=None):
@@ -1842,7 +1842,7 @@
18421842
1843def get_precision_tax():1843def get_precision_tax():
1844 def change_digit_tax(cr):1844 def change_digit_tax(cr):
1845 res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')1845 res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Amount')
1846 return (16, res+3)1846 return (16, res+3)
1847 return change_digit_tax1847 return change_digit_tax
18481848
@@ -2086,15 +2086,15 @@
2086 """2086 """
20872087
2088 # By default, for each tax, tax amount will first be computed2088 # By default, for each tax, tax amount will first be computed
2089 # and rounded at the 'Account' decimal precision for each2089 # and rounded at the 'Amount' decimal precision for each
2090 # PO/SO/invoice line and then these rounded amounts will be2090 # PO/SO/invoice line and then these rounded amounts will be
2091 # summed, leading to the total amount for that tax. But, if the2091 # summed, leading to the total amount for that tax. But, if the
2092 # company has tax_calculation_rounding_method = round_globally,2092 # company has tax_calculation_rounding_method = round_globally,
2093 # we still follow the same method, but we use a much larger2093 # we still follow the same method, but we use a much larger
2094 # precision when we round the tax amount for each line (we use2094 # precision when we round the tax amount for each line (we use
2095 # the 'Account' decimal precision + 5), and that way it's like2095 # the 'Amount' decimal precision + 5), and that way it's like
2096 # rounding after the sum of the tax amounts of each line2096 # rounding after the sum of the tax amounts of each line
2097 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')2097 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
2098 tax_compute_precision = precision2098 tax_compute_precision = precision
2099 if taxes and taxes[0].company_id.tax_calculation_rounding_method == 'round_globally':2099 if taxes and taxes[0].company_id.tax_calculation_rounding_method == 'round_globally':
2100 tax_compute_precision += 52100 tax_compute_precision += 5
@@ -2137,7 +2137,7 @@
2137 one tax for each tax id in IDS and their children2137 one tax for each tax id in IDS and their children
2138 """2138 """
2139 if not precision:2139 if not precision:
2140 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')2140 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
2141 res = self._unit_compute(cr, uid, taxes, price_unit, product, partner, quantity)2141 res = self._unit_compute(cr, uid, taxes, price_unit, product, partner, quantity)
2142 total = 0.02142 total = 0.0
2143 for r in res:2143 for r in res:
@@ -2233,7 +2233,7 @@
2233 one tax for each tax id in IDS and their children2233 one tax for each tax id in IDS and their children
2234 """2234 """
2235 if not precision:2235 if not precision:
2236 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')2236 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
2237 res = self._unit_compute_inv(cr, uid, taxes, price_unit, product, partner=None)2237 res = self._unit_compute_inv(cr, uid, taxes, price_unit, product, partner=None)
2238 total = 0.02238 total = 0.0
2239 for r in res:2239 for r in res:
@@ -2362,9 +2362,9 @@
2362 _columns = {2362 _columns = {
2363 'name': fields.char('Name', size=64, required=True),2363 'name': fields.char('Name', size=64, required=True),
2364 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the resources from lower sequences to higher ones."),2364 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the resources from lower sequences to higher ones."),
2365 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Account'), help="The optional quantity on entries."),2365 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), help="The optional quantity on entries."),
2366 'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),2366 'debit': fields.float('Debit', digits_compute=dp.get_precision('Amount')),
2367 'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),2367 'credit': fields.float('Credit', digits_compute=dp.get_precision('Amount')),
2368 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade"),2368 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade"),
2369 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', ondelete="cascade"),2369 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', ondelete="cascade"),
2370 'model_id': fields.many2one('account.model', 'Model', required=True, ondelete="cascade", select=True),2370 'model_id': fields.many2one('account.model', 'Model', required=True, ondelete="cascade", select=True),
23712371
=== modified file 'account/account_analytic_line.py'
--- account/account_analytic_line.py 2013-10-27 12:31:04 +0000
+++ account/account_analytic_line.py 2014-05-02 07:31:45 +0000
@@ -119,7 +119,7 @@
119 # to return a default price for those units119 # to return a default price for those units
120 ctx['uom'] = unit120 ctx['uom'] = unit
121 amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id]121 amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id]
122 prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')122 prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
123 amount = amount_unit * quantity or 0.0123 amount = amount_unit * quantity or 0.0
124 result = round(amount, prec)124 result = round(amount, prec)
125 if not flag:125 if not flag:
126126
=== modified file 'account/account_bank_statement.py'
--- account/account_bank_statement.py 2014-02-10 06:46:42 +0000
+++ account/account_bank_statement.py 2014-05-02 07:31:45 +0000
@@ -103,9 +103,9 @@
103 readonly=True, states={'draft':[('readonly',False)]}),103 readonly=True, states={'draft':[('readonly',False)]}),
104 'period_id': fields.many2one('account.period', 'Period', required=True,104 'period_id': fields.many2one('account.period', 'Period', required=True,
105 states={'confirm':[('readonly', True)]}),105 states={'confirm':[('readonly', True)]}),
106 'balance_start': fields.float('Starting Balance', digits_compute=dp.get_precision('Account'),106 'balance_start': fields.float('Starting Balance', digits_compute=dp.get_precision('Amount'),
107 states={'confirm':[('readonly',True)]}),107 states={'confirm':[('readonly',True)]}),
108 'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Account'),108 'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Amount'),
109 states={'confirm': [('readonly', True)]}, help="Computed using the cash control lines"),109 states={'confirm': [('readonly', True)]}, help="Computed using the cash control lines"),
110 'balance_end': fields.function(_end_balance,110 'balance_end': fields.function(_end_balance,
111 store = {111 store = {
@@ -553,7 +553,7 @@
553 _columns = {553 _columns = {
554 'name': fields.char('Description', required=True),554 'name': fields.char('Description', required=True),
555 'date': fields.date('Date', required=True),555 'date': fields.date('Date', required=True),
556 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),556 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
557 'type': fields.selection([557 'type': fields.selection([
558 ('supplier','Supplier'),558 ('supplier','Supplier'),
559 ('customer','Customer'),559 ('customer','Customer'),
560560
=== modified file 'account/account_cash_statement.py'
--- account/account_cash_statement.py 2014-01-02 11:30:09 +0000
+++ account/account_cash_statement.py 2014-05-02 07:31:45 +0000
@@ -58,11 +58,11 @@
58 return {'value' : {'subtotal_closing' : (pieces * number) or 0.0 }}58 return {'value' : {'subtotal_closing' : (pieces * number) or 0.0 }}
5959
60 _columns = {60 _columns = {
61 'pieces': fields.float('Unit of Currency', digits_compute=dp.get_precision('Account')),61 'pieces': fields.float('Unit of Currency', digits_compute=dp.get_precision('Amount')),
62 'number_opening' : fields.integer('Number of Units', help='Opening Unit Numbers'),62 'number_opening' : fields.integer('Number of Units', help='Opening Unit Numbers'),
63 'number_closing' : fields.integer('Number of Units', help='Closing Unit Numbers'),63 'number_closing' : fields.integer('Number of Units', help='Closing Unit Numbers'),
64 'subtotal_opening': fields.function(_sub_total, string='Opening Subtotal', type='float', digits_compute=dp.get_precision('Account'), multi='subtotal'),64 'subtotal_opening': fields.function(_sub_total, string='Opening Subtotal', type='float', digits_compute=dp.get_precision('Amount'), multi='subtotal'),
65 'subtotal_closing': fields.function(_sub_total, string='Closing Subtotal', type='float', digits_compute=dp.get_precision('Account'), multi='subtotal'),65 'subtotal_closing': fields.function(_sub_total, string='Closing Subtotal', type='float', digits_compute=dp.get_precision('Amount'), multi='subtotal'),
66 'bank_statement_id' : fields.many2one('account.bank.statement', ondelete='cascade'),66 'bank_statement_id' : fields.many2one('account.bank.statement', ondelete='cascade'),
67 }67 }
6868
@@ -349,7 +349,7 @@
349 _name = 'account.journal.cashbox.line'349 _name = 'account.journal.cashbox.line'
350 _rec_name = 'pieces'350 _rec_name = 'pieces'
351 _columns = {351 _columns = {
352 'pieces': fields.float('Values', digits_compute=dp.get_precision('Account')),352 'pieces': fields.float('Values', digits_compute=dp.get_precision('Amount')),
353 'journal_id' : fields.many2one('account.journal', 'Journal', required=True, select=1, ondelete="cascade"),353 'journal_id' : fields.many2one('account.journal', 'Journal', required=True, select=1, ondelete="cascade"),
354 }354 }
355355
356356
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py 2014-04-30 12:50:33 +0000
+++ account/account_invoice.py 2014-05-02 07:31:45 +0000
@@ -273,21 +273,21 @@
273 'tax_line': fields.one2many('account.invoice.tax', 'invoice_id', 'Tax Lines', readonly=True, states={'draft':[('readonly',False)]}),273 'tax_line': fields.one2many('account.invoice.tax', 'invoice_id', 'Tax Lines', readonly=True, states={'draft':[('readonly',False)]}),
274274
275 'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, select=1, ondelete='restrict', help="Link to the automatically generated Journal Items."),275 'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, select=1, ondelete='restrict', help="Link to the automatically generated Journal Items."),
276 'amount_untaxed': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Subtotal', track_visibility='always',276 'amount_untaxed': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Subtotal', track_visibility='always',
277 store={277 store={
278 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),278 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
279 'account.invoice.tax': (_get_invoice_tax, None, 20),279 'account.invoice.tax': (_get_invoice_tax, None, 20),
280 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),280 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
281 },281 },
282 multi='all'),282 multi='all'),
283 'amount_tax': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Tax',283 'amount_tax': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Tax',
284 store={284 store={
285 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),285 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
286 'account.invoice.tax': (_get_invoice_tax, None, 20),286 'account.invoice.tax': (_get_invoice_tax, None, 20),
287 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),287 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
288 },288 },
289 multi='all'),289 multi='all'),
290 'amount_total': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Total',290 'amount_total': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Total',
291 store={291 store={
292 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),292 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
293 'account.invoice.tax': (_get_invoice_tax, None, 20),293 'account.invoice.tax': (_get_invoice_tax, None, 20),
@@ -297,7 +297,7 @@
297 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}, track_visibility='always'),297 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}, track_visibility='always'),
298 'journal_id': fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),298 'journal_id': fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
299 'company_id': fields.many2one('res.company', 'Company', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),299 'company_id': fields.many2one('res.company', 'Company', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),
300 'check_total': fields.float('Verification Total', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),300 'check_total': fields.float('Verification Total', digits_compute=dp.get_precision('Amount'), readonly=True, states={'draft':[('readonly',False)]}),
301 'reconciled': fields.function(_reconciled, string='Paid/Reconciled', type='boolean',301 'reconciled': fields.function(_reconciled, string='Paid/Reconciled', type='boolean',
302 store={302 store={
303 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, None, 50), # Check if we can remove ?303 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, None, 50), # Check if we can remove ?
@@ -307,7 +307,7 @@
307 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',307 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',
308 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)]}),308 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)]}),
309 'move_lines':fields.function(_get_lines, type='many2many', relation='account.move.line', string='Entry Lines'),309 'move_lines':fields.function(_get_lines, type='many2many', relation='account.move.line', string='Entry Lines'),
310 'residual': fields.function(_amount_residual, digits_compute=dp.get_precision('Account'), string='Balance',310 'residual': fields.function(_amount_residual, digits_compute=dp.get_precision('Amount'), string='Balance',
311 store={311 store={
312 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line','move_id'], 50),312 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line','move_id'], 50),
313 'account.invoice.tax': (_get_invoice_tax, None, 50),313 'account.invoice.tax': (_get_invoice_tax, None, 50),
@@ -1360,7 +1360,7 @@
1360 total += (l.debit or 0.0) - (l.credit or 0.0)1360 total += (l.debit or 0.0) - (l.credit or 0.0)
13611361
1362 inv_id, name = self.name_get(cr, uid, [invoice.id], context=context)[0]1362 inv_id, name = self.name_get(cr, uid, [invoice.id], context=context)[0]
1363 if (not round(total,self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))) or writeoff_acc_id:1363 if (not round(total,self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount'))) or writeoff_acc_id:
1364 self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context)1364 self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context)
1365 else:1365 else:
1366 code = invoice.currency_id.symbol1366 code = invoice.currency_id.symbol
@@ -1419,11 +1419,11 @@
1419 'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null', select=True),1419 'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null', select=True),
1420 'product_id': fields.many2one('product.product', 'Product', ondelete='set null', select=True),1420 'product_id': fields.many2one('product.product', 'Product', ondelete='set null', select=True),
1421 '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."),1421 '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."),
1422 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),1422 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
1423 'price_subtotal': fields.function(_amount_line, string='Amount', type="float",1423 'price_subtotal': fields.function(_amount_line, string='Amount', type="float",
1424 digits_compute= dp.get_precision('Account'), store=True),1424 digits_compute= dp.get_precision('Amount'), store=True),
1425 'quantity': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),1425 'quantity': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True),
1426 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount')),1426 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price')),
1427 'invoice_line_tax_id': fields.many2many('account.tax', 'account_invoice_line_tax', 'invoice_line_id', 'tax_id', 'Taxes', domain=[('parent_id','=',False)]),1427 'invoice_line_tax_id': fields.many2many('account.tax', 'account_invoice_line_tax', 'invoice_line_id', 'tax_id', 'Taxes', domain=[('parent_id','=',False)]),
1428 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),1428 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
1429 'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),1429 'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
@@ -1661,14 +1661,14 @@
1661 'name': fields.char('Tax Description', size=64, required=True),1661 'name': fields.char('Tax Description', size=64, required=True),
1662 'account_id': fields.many2one('account.account', 'Tax Account', required=True, domain=[('type','<>','view'),('type','<>','income'), ('type', '<>', 'closed')]),1662 'account_id': fields.many2one('account.account', 'Tax Account', required=True, domain=[('type','<>','view'),('type','<>','income'), ('type', '<>', 'closed')]),
1663 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'),1663 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'),
1664 'base': fields.float('Base', digits_compute=dp.get_precision('Account')),1664 'base': fields.float('Base', digits_compute=dp.get_precision('Amount')),
1665 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),1665 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
1666 'manual': fields.boolean('Manual'),1666 'manual': fields.boolean('Manual'),
1667 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of invoice tax."),1667 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of invoice tax."),
1668 'base_code_id': fields.many2one('account.tax.code', 'Base Code', help="The account basis of the tax declaration."),1668 'base_code_id': fields.many2one('account.tax.code', 'Base Code', help="The account basis of the tax declaration."),
1669 'base_amount': fields.float('Base Code Amount', digits_compute=dp.get_precision('Account')),1669 'base_amount': fields.float('Base Code Amount', digits_compute=dp.get_precision('Amount')),
1670 'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),1670 'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),
1671 'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Account')),1671 'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Amount')),
1672 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),1672 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
1673 'factor_base': fields.function(_count_factor, string='Multipication factor for Base code', type='float', multi="all"),1673 'factor_base': fields.function(_count_factor, string='Multipication factor for Base code', type='float', multi="all"),
1674 'factor_tax': fields.function(_count_factor, string='Multipication factor Tax code', type='float', multi="all")1674 'factor_tax': fields.function(_count_factor, string='Multipication factor Tax code', type='float', multi="all")
16751675
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2014-05-01 15:56:33 +0000
+++ account/account_move_line.py 2014-05-02 07:31:45 +0000
@@ -446,11 +446,11 @@
446446
447 _columns = {447 _columns = {
448 'name': fields.char('Name', size=64, required=True),448 'name': fields.char('Name', size=64, required=True),
449 '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."),449 '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."),
450 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),450 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
451 'product_id': fields.many2one('product.product', 'Product'),451 'product_id': fields.many2one('product.product', 'Product'),
452 'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),452 'debit': fields.float('Debit', digits_compute=dp.get_precision('Amount')),
453 'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),453 'credit': fields.float('Credit', digits_compute=dp.get_precision('Amount')),
454 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2),454 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2),
455 'move_id': fields.many2one('account.move', 'Journal Entry', ondelete="cascade", help="The move of this entry line.", select=2, required=True),455 'move_id': fields.many2one('account.move', 'Journal Entry', ondelete="cascade", help="The move of this entry line.", select=2, required=True),
456 'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Internal Note'),456 'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Internal Note'),
@@ -460,7 +460,7 @@
460 'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),460 'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),
461 'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref', store={461 'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref', store={
462 '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)}),462 '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)}),
463 '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')),463 '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')),
464 '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)."),464 '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)."),
465 '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."),465 '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."),
466 'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),466 'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),
@@ -485,7 +485,7 @@
485 'balance': fields.function(_balance, fnct_search=_balance_search, string='Balance'),485 'balance': fields.function(_balance, fnct_search=_balance_search, string='Balance'),
486 'state': fields.selection([('draft','Unbalanced'), ('valid','Balanced')], 'Status', readonly=True),486 'state': fields.selection([('draft','Unbalanced'), ('valid','Balanced')], 'Status', readonly=True),
487 '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."),487 '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."),
488 '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, "\488 '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, "\
489 "this field will contain the basic amount(without tax)."),489 "this field will contain the basic amount(without tax)."),
490 'invoice': fields.function(_invoice, string='Invoice',490 'invoice': fields.function(_invoice, string='Invoice',
491 type='many2one', relation='account.invoice', fnct_search=_invoice_search),491 type='many2one', relation='account.invoice', fnct_search=_invoice_search),
492492
=== modified file 'account/data/account_data.xml'
--- account/data/account_data.xml 2013-12-18 15:57:15 +0000
+++ account/data/account_data.xml 2014-05-02 07:31:45 +0000
@@ -41,11 +41,6 @@
41 <field eval="account_payment_term_15days" name="payment_id"/>41 <field eval="account_payment_term_15days" name="payment_id"/>
42 </record>42 </record>
4343
44 <record forcecreate="True" id="decimal_payment" model="decimal.precision">
45 <field name="name">Payment Term</field>
46 <field name="digits">6</field>
47 </record>
48
49 <record id="account_payment_term_net" model="account.payment.term">44 <record id="account_payment_term_net" model="account.payment.term">
50 <field name="name">30 Net Days</field>45 <field name="name">30 Net Days</field>
51 <field name="note">30 Net Days</field>46 <field name="note">30 Net Days</field>
5247
=== modified file 'account/report/account_entries_report.py'
--- account/report/account_entries_report.py 2014-04-09 10:30:45 +0000
+++ account/report/account_entries_report.py 2014-05-02 07:31:45 +0000
@@ -41,7 +41,7 @@
41 'year': fields.char('Year', size=4, readonly=True),41 'year': fields.char('Year', size=4, readonly=True),
42 'date': fields.date('Date', size=128, readonly=True),42 'date': fields.date('Date', size=128, readonly=True),
43 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),43 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
44 'amount_currency': fields.float('Amount Currency', digits_compute=dp.get_precision('Account'), readonly=True),44 'amount_currency': fields.float('Amount Currency', digits_compute=dp.get_precision('Amount'), readonly=True),
45 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),45 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
46 ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),46 ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
47 ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),47 ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
4848
=== modified file 'account/report/account_invoice_report.py'
--- account/report/account_invoice_report.py 2014-01-29 16:03:48 +0000
+++ account/report/account_invoice_report.py 2014-05-02 07:31:45 +0000
@@ -69,9 +69,9 @@
69 'company_id': fields.many2one('res.company', 'Company', readonly=True),69 'company_id': fields.many2one('res.company', 'Company', readonly=True),
70 'user_id': fields.many2one('res.users', 'Salesperson', readonly=True),70 'user_id': fields.many2one('res.users', 'Salesperson', readonly=True),
71 'price_total': fields.float('Total Without Tax', readonly=True),71 'price_total': fields.float('Total Without Tax', readonly=True),
72 '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"),72 '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"),
73 'price_average': fields.float('Average Price', readonly=True, group_operator="avg"),73 'price_average': fields.float('Average Price', readonly=True, group_operator="avg"),
74 '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"),74 '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"),
75 'currency_rate': fields.float('Currency Rate', readonly=True),75 'currency_rate': fields.float('Currency Rate', readonly=True),
76 'nbr':fields.integer('# of Lines', readonly=True),76 'nbr':fields.integer('# of Lines', readonly=True),
77 'type': fields.selection([77 'type': fields.selection([
@@ -93,7 +93,7 @@
93 'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True),93 'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True),
94 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),94 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
95 'residual': fields.float('Total Residual', readonly=True),95 'residual': fields.float('Total Residual', readonly=True),
96 'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),96 'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Amount'), multi="_compute_amounts"),
97 'country_id': fields.many2one('res.country', 'Country of the Partner Company'),97 'country_id': fields.many2one('res.country', 'Country of the Partner Company'),
98 }98 }
99 _order = 'date desc'99 _order = 'date desc'
100100
=== modified file 'account/report/account_treasury_report.py'
--- account/report/account_treasury_report.py 2013-10-27 12:31:04 +0000
+++ account/report/account_treasury_report.py 2014-05-02 07:31:45 +0000
@@ -47,8 +47,8 @@
47 'credit': fields.float('Credit', readonly=True),47 'credit': fields.float('Credit', readonly=True),
48 'balance': fields.float('Balance', readonly=True),48 'balance': fields.float('Balance', readonly=True),
49 'date': fields.date('Beginning of Period Date', readonly=True),49 'date': fields.date('Beginning of Period Date', readonly=True),
50 'starting_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Account'), string='Starting Balance', multi='balance'),50 'starting_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Amount'), string='Starting Balance', multi='balance'),
51 'ending_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Account'), string='Ending Balance', multi='balance'),51 'ending_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Amount'), string='Ending Balance', multi='balance'),
52 'company_id': fields.many2one('res.company', 'Company', readonly=True),52 'company_id': fields.many2one('res.company', 'Company', readonly=True),
53 }53 }
5454
5555
=== modified file 'account/res_config.py'
--- account/res_config.py 2014-04-23 11:40:53 +0000
+++ account/res_config.py 2014-05-02 07:31:45 +0000
@@ -340,12 +340,12 @@
340 fiscalyear.create_period3(cr, uid, [fiscalyear_id])340 fiscalyear.create_period3(cr, uid, [fiscalyear_id])
341341
342 def get_default_dp(self, cr, uid, fields, context=None):342 def get_default_dp(self, cr, uid, fields, context=None):
343 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')343 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_amount')
344 return {'decimal_precision': dp.digits}344 return {'decimal_precision': dp.digits}
345345
346 def set_default_dp(self, cr, uid, ids, context=None):346 def set_default_dp(self, cr, uid, ids, context=None):
347 config = self.browse(cr, uid, ids[0], context)347 config = self.browse(cr, uid, ids[0], context)
348 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')348 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_amount')
349 dp.write({'digits': config.decimal_precision})349 dp.write({'digits': config.decimal_precision})
350350
351 def onchange_analytic_accounting(self, cr, uid, ids, analytic_accounting, context=None):351 def onchange_analytic_accounting(self, cr, uid, ids, analytic_accounting, context=None):
352352
=== modified file 'account/test/price_accuracy00.yml'
--- account/test/price_accuracy00.yml 2012-11-29 22:26:45 +0000
+++ account/test/price_accuracy00.yml 2014-05-02 07:31:45 +0000
@@ -6,7 +6,7 @@
6 Given the price accuracy for the account module is configured with two6 Given the price accuracy for the account module is configured with two
7 digits7 digits
8- 8-
9 !record {model: decimal.precision, id: product.decimal_account}:9 !record {model: decimal.precision, id: product.decimal_amount}:
10 digits: 210 digits: 2
11- 11-
12 And we have a tax defined12 And we have a tax defined
@@ -61,7 +61,7 @@
61- 61-
62 Then, I change the precision of numbers to 3 digits.62 Then, I change the precision of numbers to 3 digits.
63- 63-
64 !record {model: decimal.precision, id: product.decimal_account}:64 !record {model: decimal.precision, id: product.decimal_amount}:
65 digits: 365 digits: 3
66- 66-
67 And I create another invoice with the same content.67 And I create another invoice with the same content.
6868
=== modified file 'account/views/report_generalledger.xml'
--- account/views/report_generalledger.xml 2014-03-27 18:25:20 +0000
+++ account/views/report_generalledger.xml 2014-05-02 07:31:45 +0000
@@ -87,16 +87,16 @@
87 <span t-esc="childrenaccount['name']"/>87 <span t-esc="childrenaccount['name']"/>
88 </td>88 </td>
89 <td class="text-right">89 <td class="text-right">
90 <span t-esc="formatLang(sum_debit_account(childrenaccount), digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>90 <span t-esc="formatLang(sum_debit_account(childrenaccount), digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
91 </td>91 </td>
92 <td class="text-right">92 <td class="text-right">
93 <span t-esc="formatLang(sum_credit_account(childrenaccount), digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>93 <span t-esc="formatLang(sum_credit_account(childrenaccount), digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
94 </td>94 </td>
95 <td class="text-right">95 <td class="text-right">
96 <span t-esc="formatLang(sum_balance_account(childrenaccount), digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>96 <span t-esc="formatLang(sum_balance_account(childrenaccount), digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
97 </td>97 </td>
98 <td class="text-right" t-if="data['form']['amount_currency']">98 <td class="text-right" t-if="data['form']['amount_currency']">
99 <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 ''"/>99 <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 ''"/>
100 </td>100 </td>
101 </tr>101 </tr>
102 <tr t-foreach="lines(childrenaccount)" t-as="line">102 <tr t-foreach="lines(childrenaccount)" t-as="line">
@@ -108,13 +108,13 @@
108 <td><span t-esc="line['lname']"/></td>108 <td><span t-esc="line['lname']"/></td>
109 <td><span t-esc="line['line_corresp'].replace(',',', ')"/></td>109 <td><span t-esc="line['line_corresp'].replace(',',', ')"/></td>
110 <td class="text-right">110 <td class="text-right">
111 <span t-esc="formatLang(line['debit'], digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>111 <span t-esc="formatLang(line['debit'], digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
112 </td>112 </td>
113 <td class="text-right">113 <td class="text-right">
114 <span t-esc="formatLang(line['credit'], digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>114 <span t-esc="formatLang(line['credit'], digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
115 </td>115 </td>
116 <td class="text-right">116 <td class="text-right">
117 <span t-esc="formatLang(line['progress'], digits=get_digits(dp='Account'), currency_obj=res_company.currency_id)"/>117 <span t-esc="formatLang(line['progress'], digits=get_digits(dp='Amount'), currency_obj=res_company.currency_id)"/>
118 </td>118 </td>
119 <td class="text-right" t-if="data['form']['amount_currency']">119 <td class="text-right" t-if="data['form']['amount_currency']">
120 <span t-esc="formatLang(line['amount_currency'], currency_obj=res_company.currency_id) if line['amount_currency'] > 0.00 else ''"/>120 <span t-esc="formatLang(line['amount_currency'], currency_obj=res_company.currency_id) if line['amount_currency'] > 0.00 else ''"/>
121121
=== modified file 'account/wizard/account_reconcile.py'
--- account/wizard/account_reconcile.py 2014-01-29 18:47:03 +0000
+++ account/wizard/account_reconcile.py 2014-05-02 07:31:45 +0000
@@ -34,9 +34,9 @@
34 _description = 'Account move line reconcile'34 _description = 'Account move line reconcile'
35 _columns = {35 _columns = {
36 'trans_nbr': fields.integer('# of Transaction', readonly=True),36 'trans_nbr': fields.integer('# of Transaction', readonly=True),
37 'credit': fields.float('Credit amount', readonly=True, digits_compute=dp.get_precision('Account')),37 'credit': fields.float('Credit amount', readonly=True, digits_compute=dp.get_precision('Amount')),
38 'debit': fields.float('Debit amount', readonly=True, digits_compute=dp.get_precision('Account')),38 'debit': fields.float('Debit amount', readonly=True, digits_compute=dp.get_precision('Amount')),
39 'writeoff': fields.float('Write-Off amount', readonly=True, digits_compute=dp.get_precision('Account')),39 'writeoff': fields.float('Write-Off amount', readonly=True, digits_compute=dp.get_precision('Amount')),
40 }40 }
4141
42 def default_get(self, cr, uid, fields, context=None):42 def default_get(self, cr, uid, fields, context=None):
@@ -65,7 +65,7 @@
65 credit += line.credit65 credit += line.credit
66 debit += line.debit66 debit += line.debit
67 account_id = line.account_id.id67 account_id = line.account_id.id
68 precision = self.pool['decimal.precision'].precision_get(cr, uid, 'Account')68 precision = self.pool['decimal.precision'].precision_get(cr, uid, 'Amount')
69 writeoff = float_round(debit-credit, precision_digits=precision)69 writeoff = float_round(debit-credit, precision_digits=precision)
70 credit = float_round(credit, precision_digits=precision)70 credit = float_round(credit, precision_digits=precision)
71 debit = float_round(debit, precision_digits=precision)71 debit = float_round(debit, precision_digits=precision)
7272
=== modified file 'account/wizard/pos_box.py'
--- account/wizard/pos_box.py 2013-12-27 15:35:17 +0000
+++ account/wizard/pos_box.py 2014-05-02 07:31:45 +0000
@@ -9,7 +9,7 @@
9 # Attention, we don't set a domain, because there is a journal_type key 9 # Attention, we don't set a domain, because there is a journal_type key
10 # in the context of the action10 # in the context of the action
11 'amount' : fields.float('Amount',11 'amount' : fields.float('Amount',
12 digits_compute = dp.get_precision('Account'),12 digits_compute = dp.get_precision('Amount'),
13 required=True),13 required=True),
14 }14 }
1515
1616
=== modified file 'account_analytic_analysis/account_analytic_analysis.py'
--- account_analytic_analysis/account_analytic_analysis.py 2014-04-29 11:27:38 +0000
+++ account_analytic_analysis/account_analytic_analysis.py 2014-05-02 07:31:45 +0000
@@ -49,10 +49,10 @@
49 'product_id': fields.many2one('product.product','Product',required=True),49 'product_id': fields.many2one('product.product','Product',required=True),
50 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),50 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
51 'name': fields.text('Description', required=True),51 'name': fields.text('Description', required=True),
52 'quantity': fields.float('Quantity', required=True),52 'quantity': fields.float('Quantity', required=True, digits_compute=dp.get_precision('Quantity')),
53 'uom_id': fields.many2one('product.uom', 'Unit of Measure',required=True),53 'uom_id': fields.many2one('product.uom', 'Unit of Measure',required=True),
54 'price_unit': fields.float('Unit Price', required=True),54 'price_unit': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Price')),
55 'price_subtotal': fields.function(_amount_line, string='Sub Total', type="float",digits_compute= dp.get_precision('Account')),55 'price_subtotal': fields.function(_amount_line, string='Sub Total', type="float",digits_compute= dp.get_precision('Amount')),
56 }56 }
57 _defaults = {57 _defaults = {
58 'quantity' : 1,58 'quantity' : 1,
@@ -453,16 +453,16 @@
453 }),453 }),
454 'ca_invoiced': fields.function(_ca_invoiced_calc, type='float', string='Invoiced Amount',454 'ca_invoiced': fields.function(_ca_invoiced_calc, type='float', string='Invoiced Amount',
455 help="Total customer invoiced amount for this account.",455 help="Total customer invoiced amount for this account.",
456 digits_compute=dp.get_precision('Account')),456 digits_compute=dp.get_precision('Amount')),
457 'total_cost': fields.function(_total_cost_calc, type='float', string='Total Costs',457 'total_cost': fields.function(_total_cost_calc, type='float', string='Total Costs',
458 help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets.",458 help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets.",
459 digits_compute=dp.get_precision('Account')),459 digits_compute=dp.get_precision('Amount')),
460 'ca_to_invoice': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Uninvoiced Amount',460 'ca_to_invoice': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Uninvoiced Amount',
461 help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs.",461 help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs.",
462 digits_compute=dp.get_precision('Account')),462 digits_compute=dp.get_precision('Amount')),
463 'ca_theorical': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Theoretical Revenue',463 'ca_theorical': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Theoretical Revenue',
464 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.",464 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.",
465 digits_compute=dp.get_precision('Account')),465 digits_compute=dp.get_precision('Amount')),
466 'hours_quantity': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Total Worked Time',466 'hours_quantity': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Total Worked Time',
467 help="Number of time you spent on the analytic account (from timesheet). It computes quantities on all journal of type 'general'."),467 help="Number of time you spent on the analytic account (from timesheet). It computes quantities on all journal of type 'general'."),
468 'last_invoice_date': fields.function(_analysis_all, multi='analytic_analysis', type='date', string='Last Invoice Date',468 'last_invoice_date': fields.function(_analysis_all, multi='analytic_analysis', type='date', string='Last Invoice Date',
@@ -485,19 +485,19 @@
485 help="Sum of timesheet lines invoiced for this contract."),485 help="Sum of timesheet lines invoiced for this contract."),
486 'remaining_ca': fields.function(_remaining_ca_calc, type='float', string='Remaining Revenue',486 'remaining_ca': fields.function(_remaining_ca_calc, type='float', string='Remaining Revenue',
487 help="Computed using the formula: Max Invoice Price - Invoiced Amount.",487 help="Computed using the formula: Max Invoice Price - Invoiced Amount.",
488 digits_compute=dp.get_precision('Account')),488 digits_compute=dp.get_precision('Amount')),
489 'revenue_per_hour': fields.function(_revenue_per_hour_calc, type='float', string='Revenue per Time (real)',489 'revenue_per_hour': fields.function(_revenue_per_hour_calc, type='float', string='Revenue per Time (real)',
490 help="Computed using the formula: Invoiced Amount / Total Time",490 help="Computed using the formula: Invoiced Amount / Total Time",
491 digits_compute=dp.get_precision('Account')),491 digits_compute=dp.get_precision('Amount')),
492 'real_margin': fields.function(_real_margin_calc, type='float', string='Real Margin',492 'real_margin': fields.function(_real_margin_calc, type='float', string='Real Margin',
493 help="Computed using the formula: Invoiced Amount - Total Costs.",493 help="Computed using the formula: Invoiced Amount - Total Costs.",
494 digits_compute=dp.get_precision('Account')),494 digits_compute=dp.get_precision('Amount')),
495 'theorical_margin': fields.function(_theorical_margin_calc, type='float', string='Theoretical Margin',495 'theorical_margin': fields.function(_theorical_margin_calc, type='float', string='Theoretical Margin',
496 help="Computed using the formula: Theoretical Revenue - Total Costs",496 help="Computed using the formula: Theoretical Revenue - Total Costs",
497 digits_compute=dp.get_precision('Account')),497 digits_compute=dp.get_precision('Amount')),
498 'real_margin_rate': fields.function(_real_margin_rate_calc, type='float', string='Real Margin Rate (%)',498 'real_margin_rate': fields.function(_real_margin_rate_calc, type='float', string='Real Margin Rate (%)',
499 help="Computes using the formula: (Real Margin / Total Costs) * 100.",499 help="Computes using the formula: (Real Margin / Total Costs) * 100.",
500 digits_compute=dp.get_precision('Account')),500 digits_compute=dp.get_precision('Amount')),
501 'fix_price_invoices' : fields.boolean('Fixed Price'),501 'fix_price_invoices' : fields.boolean('Fixed Price'),
502 'invoice_on_timesheets' : fields.boolean("On Timesheets"),502 'invoice_on_timesheets' : fields.boolean("On Timesheets"),
503 'month_ids': fields.function(_analysis_all, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'),503 'month_ids': fields.function(_analysis_all, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'),
504504
=== modified file 'account_asset/account_asset.py'
--- account_asset/account_asset.py 2014-04-10 11:04:24 +0000
+++ account_asset/account_asset.py 2014-05-02 07:31:45 +0000
@@ -242,7 +242,7 @@
242 'account_move_line_ids': fields.one2many('account.move.line', 'asset_id', 'Entries', readonly=True, states={'draft':[('readonly',False)]}),242 'account_move_line_ids': fields.one2many('account.move.line', 'asset_id', 'Entries', readonly=True, states={'draft':[('readonly',False)]}),
243 'name': fields.char('Asset Name', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),243 'name': fields.char('Asset Name', size=64, required=True, readonly=True, states={'draft':[('readonly',False)]}),
244 'code': fields.char('Reference', size=32, readonly=True, states={'draft':[('readonly',False)]}),244 'code': fields.char('Reference', size=32, readonly=True, states={'draft':[('readonly',False)]}),
245 'purchase_value': fields.float('Gross Value', required=True, readonly=True, states={'draft':[('readonly',False)]}),245 'purchase_value': fields.float('Gross Value', required=True, digits_compute=dp.get_precision('Amount'), readonly=True, states={'draft':[('readonly',False)]}),
246 'currency_id': fields.many2one('res.currency','Currency',required=True, readonly=True, states={'draft':[('readonly',False)]}),246 'currency_id': fields.many2one('res.currency','Currency',required=True, readonly=True, states={'draft':[('readonly',False)]}),
247 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),247 'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
248 'note': fields.text('Note'),248 'note': fields.text('Note'),
@@ -263,7 +263,7 @@
263 '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"),263 '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"),
264 'method_end': fields.date('Ending Date', readonly=True, states={'draft':[('readonly',False)]}),264 'method_end': fields.date('Ending Date', readonly=True, states={'draft':[('readonly',False)]}),
265 'method_progress_factor': fields.float('Degressive Factor', readonly=True, states={'draft':[('readonly',False)]}),265 'method_progress_factor': fields.float('Degressive Factor', readonly=True, states={'draft':[('readonly',False)]}),
266 'value_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual Value'),266 'value_residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Amount'), string='Residual Value'),
267 'method_time': fields.selection([('number','Number of Depreciations'),('end','Ending Date')], 'Time Method', required=True, readonly=True, states={'draft':[('readonly',False)]},267 'method_time': fields.selection([('number','Number of Depreciations'),('end','Ending Date')], 'Time Method', required=True, readonly=True, states={'draft':[('readonly',False)]},
268 help="Choose the method to use to compute the dates and number of depreciation lines.\n"\268 help="Choose the method to use to compute the dates and number of depreciation lines.\n"\
269 " * Number of Depreciations: Fix the number of depreciation lines and the time between 2 depreciations.\n" \269 " * Number of Depreciations: Fix the number of depreciation lines and the time between 2 depreciations.\n" \
@@ -271,7 +271,7 @@
271 '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'),271 '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'),
272 'history_ids': fields.one2many('account.asset.history', 'asset_id', 'History', readonly=True),272 'history_ids': fields.one2many('account.asset.history', 'asset_id', 'History', readonly=True),
273 'depreciation_line_ids': fields.one2many('account.asset.depreciation.line', 'asset_id', 'Depreciation Lines', readonly=True, states={'draft':[('readonly',False)],'open':[('readonly',False)]}),273 'depreciation_line_ids': fields.one2many('account.asset.depreciation.line', 'asset_id', 'Depreciation Lines', readonly=True, states={'draft':[('readonly',False)],'open':[('readonly',False)]}),
274 '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)]}),274 '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)]}),
275 }275 }
276 _defaults = {276 _defaults = {
277 'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'account.asset.code'),277 'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'account.asset.code'),
@@ -377,9 +377,9 @@
377 'sequence': fields.integer('Sequence', required=True),377 'sequence': fields.integer('Sequence', required=True),
378 'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True, ondelete='cascade'),378 'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True, ondelete='cascade'),
379 'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),379 'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),
380 'amount': fields.float('Current Depreciation', digits_compute=dp.get_precision('Account'), required=True),380 'amount': fields.float('Current Depreciation', digits_compute=dp.get_precision('Amount'), required=True),
381 'remaining_value': fields.float('Next Period Depreciation', digits_compute=dp.get_precision('Account'),required=True),381 'remaining_value': fields.float('Next Period Depreciation', digits_compute=dp.get_precision('Amount'), required=True),
382 'depreciated_value': fields.float('Amount Already Depreciated', required=True),382 'depreciated_value': fields.float('Amount Already Depreciated', digits_compute=dp.get_precision('Amount'), required=True),
383 'depreciation_date': fields.date('Depreciation Date', select=1),383 'depreciation_date': fields.date('Depreciation Date', select=1),
384 'move_id': fields.many2one('account.move', 'Depreciation Entry'),384 'move_id': fields.many2one('account.move', 'Depreciation Entry'),
385 'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True)385 'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True)
386386
=== modified file 'account_bank_statement_extensions/account_bank_statement.py'
--- account_bank_statement_extensions/account_bank_statement.py 2013-10-27 12:31:04 +0000
+++ account_bank_statement_extensions/account_bank_statement.py 2014-05-02 07:31:45 +0000
@@ -71,7 +71,7 @@
71 ('coda', 'CODA'),71 ('coda', 'CODA'),
72 ('manual', 'Manual'),72 ('manual', 'Manual'),
73 ], 'Type', required=True),73 ], 'Type', required=True),
74 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),74 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
75 'bank_statement_line_ids': fields.one2many('account.bank.statement.line', 'globalisation_id', 'Bank Statement Lines'),75 'bank_statement_line_ids': fields.one2many('account.bank.statement.line', 'globalisation_id', 'Bank Statement Lines'),
76 }76 }
77 _rec_name = 'code'77 _rec_name = 'code'
7878
=== modified file 'account_budget/account_budget.py'
--- account_budget/account_budget.py 2014-04-11 14:28:00 +0000
+++ account_budget/account_budget.py 2014-05-02 07:31:45 +0000
@@ -193,9 +193,9 @@
193 'date_from': fields.date('Start Date', required=True),193 'date_from': fields.date('Start Date', required=True),
194 'date_to': fields.date('End Date', required=True),194 'date_to': fields.date('End Date', required=True),
195 'paid_date': fields.date('Paid Date'),195 'paid_date': fields.date('Paid Date'),
196 'planned_amount':fields.float('Planned Amount', required=True, digits_compute=dp.get_precision('Account')),196 'planned_amount':fields.float('Planned Amount', required=True, digits_compute=dp.get_precision('Amount')),
197 'practical_amount':fields.function(_prac, string='Practical Amount', type='float', digits_compute=dp.get_precision('Account')),197 'practical_amount':fields.function(_prac, string='Practical Amount', type='float', digits_compute=dp.get_precision('Amount')),
198 'theoritical_amount':fields.function(_theo, string='Theoretical Amount', type='float', digits_compute=dp.get_precision('Account')),198 'theoritical_amount':fields.function(_theo, string='Theoretical Amount', type='float', digits_compute=dp.get_precision('Amount')),
199 'percentage':fields.function(_perc, string='Percentage', type='float'),199 'percentage':fields.function(_perc, string='Percentage', type='float'),
200 'company_id': fields.related('crossovered_budget_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)200 'company_id': fields.related('crossovered_budget_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
201 }201 }
202202
=== modified file 'account_budget/views/report_analyticaccountbudget.xml'
--- account_budget/views/report_analyticaccountbudget.xml 2014-03-27 18:25:20 +0000
+++ account_budget/views/report_analyticaccountbudget.xml 2014-05-02 07:31:45 +0000
@@ -38,24 +38,24 @@
38 <t t-foreach="funct(o, data['form'])" t-as="line">38 <t t-foreach="funct(o, data['form'])" t-as="line">
39 <tr t-if="line['status'] == 1">39 <tr t-if="line['status'] == 1">
40 <td><strong t-esc="line['name']"/></td>40 <td><strong t-esc="line['name']"/></td>
41 <td class="text-right"><strong t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>41 <td class="text-right"><strong t-esc="formatLang(line['theo'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
42 <td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>42 <td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
43 <td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>43 <td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
44 <td class="text-right"><strong t-esc="formatLang(line['perc'], digits=2)"/> %</td>44 <td class="text-right"><strong t-esc="formatLang(line['perc'], digits=2)"/> %</td>
45 </tr>45 </tr>
46 <tr t-if="line['status'] != 1">46 <tr t-if="line['status'] != 1">
47 <td><span style="color: white;" t-esc="'.....'*(line['status'] - 1)"/><span t-esc="line['name']"/></td>47 <td><span style="color: white;" t-esc="'.....'*(line['status'] - 1)"/><span t-esc="line['name']"/></td>
48 <td class="text-right"><span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>48 <td class="text-right"><span t-esc="formatLang(line['theo'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
49 <td class="text-right"><span t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>49 <td class="text-right"><span t-esc="formatLang(line['pln'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
50 <td class="text-right"><span t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>50 <td class="text-right"><span t-esc="formatLang(line['prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
51 <td class="text-right"><span t-esc="formatLang(line['perc'],digits=2)"/> %</td>51 <td class="text-right"><span t-esc="formatLang(line['perc'],digits=2)"/> %</td>
52 </tr>52 </tr>
53 </t>53 </t>
54 <tr t-foreach="funct_total(data['form'])" t-as="tot">54 <tr t-foreach="funct_total(data['form'])" t-as="tot">
55 <td><strong>Total:</strong></td>55 <td><strong>Total:</strong></td>
56 <td class="text-right"><strong t-esc="formatLang(tot['tot_theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>56 <td class="text-right"><strong t-esc="formatLang(tot['tot_theo'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
57 <td class="text-right"><strong t-esc="formatLang(tot['tot_pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>57 <td class="text-right"><strong t-esc="formatLang(tot['tot_pln'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
58 <td class="text-right"><strong t-esc="formatLang(tot['tot_prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>58 <td class="text-right"><strong t-esc="formatLang(tot['tot_prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
59 <td class="text-right"><strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %</td>59 <td class="text-right"><strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %</td>
60 </tr>60 </tr>
61 </tbody>61 </tbody>
6262
=== modified file 'account_budget/views/report_budget.xml'
--- account_budget/views/report_budget.xml 2014-03-27 18:25:20 +0000
+++ account_budget/views/report_budget.xml 2014-05-02 07:31:45 +0000
@@ -44,26 +44,26 @@
44 <tr>44 <tr>
45 <td><strong t-esc="line['name']"/></td>45 <td><strong t-esc="line['name']"/></td>
46 <td class="text-right">46 <td class="text-right">
47 <strong t-esc="formatLang(line['theo'], dp='Account', currency_obj = res_company.currency_id)"/>47 <strong t-esc="formatLang(line['theo'], dp='Amount', currency_obj = res_company.currency_id)"/>
48 </td>48 </td>
49 <td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>49 <td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
50 <td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>50 <td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
51 <td class="text-right"><strong t-esc="formatLang(line['perc'],digits=2)"/> %</td>51 <td class="text-right"><strong t-esc="formatLang(line['perc'],digits=2)"/> %</td>
52 </tr>52 </tr>
53 </t>53 </t>
54 <tr t-if="line['status'] != 1">54 <tr t-if="line['status'] != 1">
55 <td><span style="color: white;" t-esc="'.....'*(line['status'] - 1)"/><span t-esc="line['name']"/></td>55 <td><span style="color: white;" t-esc="'.....'*(line['status'] - 1)"/><span t-esc="line['name']"/></td>
56 <td class="text-right"><span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>56 <td class="text-right"><span t-esc="formatLang(line['theo'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
57 <td class="text-right"><span t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>57 <td class="text-right"><span t-esc="formatLang(line['pln'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
58 <td class="text-right"><span t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>58 <td class="text-right"><span t-esc="formatLang(line['prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
59 <td class="text-right"><span t-esc="formatLang(line['perc'],digits=2)"/> % </td>59 <td class="text-right"><span t-esc="formatLang(line['perc'],digits=2)"/> % </td>
60 </tr>60 </tr>
61 </t>61 </t>
62 <tr t-foreach="funct_total(data['form'])" t-as="tot">62 <tr t-foreach="funct_total(data['form'])" t-as="tot">
63 <td><strong>Total:</strong></td>63 <td><strong>Total:</strong></td>
64 <td class="text-right"><strong t-esc="formatLang(tot['tot_theo'], dp='Account', currency_obj = res_company.currency_id)"/></td>64 <td class="text-right"><strong t-esc="formatLang(tot['tot_theo'], dp='Amount', currency_obj = res_company.currency_id)"/></td>
65 <td class="text-right"><strong t-esc="formatLang(tot['tot_pln'], dp='Account', currency_obj = res_company.currency_id)"/></td>65 <td class="text-right"><strong t-esc="formatLang(tot['tot_pln'], dp='Amount', currency_obj = res_company.currency_id)"/></td>
66 <td class="text-right"><strong t-esc="formatLang(tot['tot_prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>66 <td class="text-right"><strong t-esc="formatLang(tot['tot_prac'], dp='Amount', currency_obj=res_company.currency_id)"/></td>
67 <td class="text-right"><strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %</td>67 <td class="text-right"><strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %</td>
68 </tr>68 </tr>
69 </tbody>69 </tbody>
7070
=== modified file 'account_budget/views/report_crossoveredbudget.xml'
--- account_budget/views/report_crossoveredbudget.xml 2014-03-27 18:25:20 +0000
+++ account_budget/views/report_crossoveredbudget.xml 2014-05-02 07:31:45 +0000
@@ -41,13 +41,13 @@
41 <span t-esc="line['name']"/>41 <span t-esc="line['name']"/>
42 </td>42 </td>
43 <td class="text-right">43 <td class="text-right">
44 <span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/>44 <span t-esc="formatLang(line['theo'], dp='Amount', currency_obj=res_company.currency_id)"/>
45 </td>45 </td>
46 <td class="text-right">46 <td class="text-right">
47 <span t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/>47 <span t-esc="formatLang(line['pln'], dp='Amount', currency_obj=res_company.currency_id)"/>
48 </td>48 </td>
49 <td class="text-right">49 <td class="text-right">
50 <span t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/>50 <span t-esc="formatLang(line['prac'], dp='Amount', currency_obj=res_company.currency_id)"/>
51 </td>51 </td>
52 <td class="text-center">52 <td class="text-center">
53 <span t-esc="formatLang(line['perc'],digits=2)"/> %53 <span t-esc="formatLang(line['perc'],digits=2)"/> %
@@ -58,13 +58,13 @@
58 <strong>Total:</strong>58 <strong>Total:</strong>
59 </td>59 </td>
60 <td class="text-right">60 <td class="text-right">
61 <strong t-esc="formatLang(tot['tot_theo'], dp='Account', currency_obj=res_company.currency_id)"/>61 <strong t-esc="formatLang(tot['tot_theo'], dp='Amount', currency_obj=res_company.currency_id)"/>
62 </td>62 </td>
63 <td class="text-right">63 <td class="text-right">
64 <strong t-esc="formatLang(tot['tot_pln'], dp='Account', currency_obj=res_company.currency_id)"/>64 <strong t-esc="formatLang(tot['tot_pln'], dp='Amount', currency_obj=res_company.currency_id)"/>
65 </td>65 </td>
66 <td class="text-right">66 <td class="text-right">
67 <strong t-esc="formatLang(tot['tot_prac'], dp='Account', currency_obj=res_company.currency_id)"/>67 <strong t-esc="formatLang(tot['tot_prac'], dp='Amount', currency_obj=res_company.currency_id)"/>
68 </td>68 </td>
69 <td class="text-center">69 <td class="text-center">
70 <strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %70 <strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %
7171
=== modified file 'account_followup/account_followup.py'
--- account_followup/account_followup.py 2014-04-22 10:38:02 +0000
+++ account_followup/account_followup.py 2014-05-02 07:31:45 +0000
@@ -272,7 +272,7 @@
272272
273 total = reduce(lambda x, y: x+y['balance'], currency_dict['line'], 0.00)273 total = reduce(lambda x, y: x+y['balance'], currency_dict['line'], 0.00)
274274
275 total = rml_parse.formatLang(total, dp='Account', currency_obj=currency)275 total = rml_parse.formatLang(total, dp='Amount', currency_obj=currency)
276 followup_table += '''<tr> </tr>276 followup_table += '''<tr> </tr>
277 </table>277 </table>
278 <center>''' + _("Amount due") + ''' : %s </center>''' % (total)278 <center>''' + _("Amount due") + ''' : %s </center>''' % (total)
279279
=== modified file 'account_followup/wizard/account_followup_print.py'
--- account_followup/wizard/account_followup_print.py 2014-04-02 16:40:53 +0000
+++ account_followup/wizard/account_followup_print.py 2014-05-02 07:31:45 +0000
@@ -25,6 +25,7 @@
25from openerp import tools25from openerp import tools
26from openerp.osv import fields, osv26from openerp.osv import fields, osv
27from openerp.tools.translate import _27from openerp.tools.translate import _
28import openerp.addons.decimal_precision as dp
2829
29class account_followup_stat_by_partner(osv.osv):30class account_followup_stat_by_partner(osv.osv):
30 _name = "account_followup.stat.by.partner"31 _name = "account_followup.stat.by.partner"
@@ -38,7 +39,7 @@
38 'date_followup':fields.date('Latest follow-up', readonly=True),39 'date_followup':fields.date('Latest follow-up', readonly=True),
39 'max_followup_id': fields.many2one('account_followup.followup.line',40 'max_followup_id': fields.many2one('account_followup.followup.line',
40 'Max Follow Up Level', readonly=True, ondelete="cascade"),41 'Max Follow Up Level', readonly=True, ondelete="cascade"),
41 'balance':fields.float('Balance', readonly=True),42 'balance':fields.float('Balance', readonly=True, digits_compute=dp.get_precision('Amount')),
42 'company_id': fields.many2one('res.company', 'Company', readonly=True),43 'company_id': fields.many2one('res.company', 'Company', readonly=True),
43 }44 }
4445
4546
=== modified file 'account_payment/account_payment.py'
--- account_payment/account_payment.py 2013-10-27 12:31:04 +0000
+++ account_payment/account_payment.py 2014-05-02 07:31:45 +0000
@@ -23,6 +23,7 @@
23import time23import time
2424
25from openerp.osv import fields, osv25from openerp.osv import fields, osv
26from openerp.addons.decimal_precision import decimal_precision as dp
2627
27_logger = logging.getLogger(__name__)28_logger = logging.getLogger(__name__)
2829
@@ -96,7 +97,7 @@
96 ('done', 'Done')], 'Status', select=True,97 ('done', 'Done')], 'Status', select=True,
97 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\'.'),98 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\'.'),
98 'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),99 'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),
99 'total': fields.function(_total, string="Total", type='float'),100 'total': fields.function(_total, string="Total", type='float', digits_compute= dp.get_precision('Amount')),
100 'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done': [('readonly', True)]}),101 'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done': [('readonly', True)]}),
101 'date_prefered': fields.selection([102 'date_prefered': fields.selection([
102 ('now', 'Directly'),103 ('now', 'Directly'),
@@ -307,7 +308,7 @@
307 '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 ?'"),308 '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 ?'"),
308 'communication2': fields.char('Communication 2', size=64, help='The successor message of Communication.'),309 'communication2': fields.char('Communication 2', size=64, help='The successor message of Communication.'),
309 '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.'),310 '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.'),
310 'amount_currency': fields.float('Amount in Partner Currency', digits=(16, 2),311 'amount_currency': fields.float('Amount in Partner Currency', digits_compute= dp.get_precision('Amount'),
311 required=True, help='Payment amount in the partner currency'),312 required=True, help='Payment amount in the partner currency'),
312 'currency': fields.many2one('res.currency','Partner Currency', required=True),313 'currency': fields.many2one('res.currency','Partner Currency', required=True),
313 'company_currency': fields.many2one('res.currency', 'Company Currency', readonly=True),314 'company_currency': fields.many2one('res.currency', 'Company Currency', readonly=True),
314315
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py 2014-05-01 15:56:33 +0000
+++ account_voucher/account_voucher.py 2014-05-02 07:31:45 +0000
@@ -357,8 +357,8 @@
357 \n* The \'Pro-forma\' when voucher is in Pro-forma status,voucher does not have an voucher number. \357 \n* The \'Pro-forma\' when voucher is in Pro-forma status,voucher does not have an voucher number. \
358 \n* The \'Posted\' status is used when user create voucher,a voucher number is generated and voucher entries are created in account \358 \n* The \'Posted\' status is used when user create voucher,a voucher number is generated and voucher entries are created in account \
359 \n* The \'Cancelled\' status is used when user cancel voucher.'),359 \n* The \'Cancelled\' status is used when user cancel voucher.'),
360 'amount': fields.float('Total', digits_compute=dp.get_precision('Account'), required=True, readonly=True, states={'draft':[('readonly',False)]}),360 'amount': fields.float('Total', digits_compute=dp.get_precision('Amount'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
361 'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),361 'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Amount'), readonly=True, states={'draft':[('readonly',False)]}),
362 'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),362 'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),
363 'number': fields.char('Number', size=32, readonly=True,),363 'number': fields.char('Number', size=32, readonly=True,),
364 'move_id':fields.many2one('account.move', 'Account Entry'),364 'move_id':fields.many2one('account.move', 'Account Entry'),
@@ -380,7 +380,7 @@
380 'writeoff_acc_id': fields.many2one('account.account', 'Counterpart Account', readonly=True, states={'draft': [('readonly', False)]}),380 'writeoff_acc_id': fields.many2one('account.account', 'Counterpart Account', readonly=True, states={'draft': [('readonly', False)]}),
381 'comment': fields.char('Counterpart Comment', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}),381 'comment': fields.char('Counterpart Comment', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}),
382 'analytic_id': fields.many2one('account.analytic.account','Write-Off Analytic Account', readonly=True, states={'draft': [('readonly', False)]}),382 'analytic_id': fields.many2one('account.analytic.account','Write-Off Analytic Account', readonly=True, states={'draft': [('readonly', False)]}),
383 '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."),383 '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."),
384 'payment_rate_currency_id': fields.many2one('res.currency', 'Payment Rate Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),384 'payment_rate_currency_id': fields.many2one('res.currency', 'Payment Rate Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
385 'payment_rate': fields.float('Exchange Rate', digits=(12,6), required=True, readonly=True, states={'draft': [('readonly', False)]},385 'payment_rate': fields.float('Exchange Rate', digits=(12,6), required=True, readonly=True, states={'draft': [('readonly', False)]},
386 help='The specific rate that will be used, in this voucher, between the selected currency (in \'Payment Rate Currency\' field) and the voucher currency.'),386 help='The specific rate that will be used, in this voucher, between the selected currency (in \'Payment Rate Currency\' field) and the voucher currency.'),
@@ -1187,7 +1187,7 @@
1187 ctx.update({1187 ctx.update({
1188 'voucher_special_currency_rate': voucher_currency.rate * voucher.payment_rate ,1188 'voucher_special_currency_rate': voucher_currency.rate * voucher.payment_rate ,
1189 'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False,})1189 'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False,})
1190 prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')1190 prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
1191 for line in voucher.line_ids:1191 for line in voucher.line_ids:
1192 #create one move line per voucher line where amount is not 0.01192 #create one move line per voucher line where amount is not 0.0
1193 # AND (second part of the clause) only if the original move line was not having debit = credit = 0 (which is a legal value)1193 # AND (second part of the clause) only if the original move line was not having debit = credit = 0 (which is a legal value)
@@ -1487,16 +1487,16 @@
1487 'name':fields.char('Description', size=256),1487 'name':fields.char('Description', size=256),
1488 'account_id':fields.many2one('account.account','Account', required=True),1488 'account_id':fields.many2one('account.account','Account', required=True),
1489 'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'),1489 'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'),
1490 'untax_amount':fields.float('Untax Amount'),1490 'untax_amount':fields.float('Untax Amount', digits_compute=dp.get_precision('Amount')),
1491 'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')),1491 'amount':fields.float('Amount', digits_compute=dp.get_precision('Amount')),
1492 'reconcile': fields.boolean('Full Reconcile'),1492 'reconcile': fields.boolean('Full Reconcile'),
1493 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'),1493 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'),
1494 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),1494 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
1495 'move_line_id': fields.many2one('account.move.line', 'Journal Item'),1495 'move_line_id': fields.many2one('account.move.line', 'Journal Item'),
1496 'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1),1496 'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1),
1497 'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),1497 'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),
1498 'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True, digits_compute=dp.get_precision('Account')),1498 'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True, digits_compute=dp.get_precision('Amount')),
1499 'amount_unreconciled': fields.function(_compute_balance, multi='dc', type='float', string='Open Balance', store=True, digits_compute=dp.get_precision('Account')),1499 'amount_unreconciled': fields.function(_compute_balance, multi='dc', type='float', string='Open Balance', store=True, digits_compute=dp.get_precision('Amount')),
1500 'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True, readonly=True),1500 'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True, readonly=True),
1501 'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency', readonly=True),1501 'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency', readonly=True),
1502 }1502 }
15031503
=== modified file 'analytic/analytic.py'
--- analytic/analytic.py 2014-04-01 12:36:57 +0000
+++ analytic/analytic.py 2014-05-02 07:31:45 +0000
@@ -185,9 +185,9 @@
185 'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'),185 'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'),
186 'child_complete_ids': fields.function(_child_compute, relation='account.analytic.account', string="Account Hierarchy", type='many2many'),186 'child_complete_ids': fields.function(_child_compute, relation='account.analytic.account', string="Account Hierarchy", type='many2many'),
187 'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'),187 'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'),
188 'balance': fields.function(_debit_credit_bal_qtty, type='float', string='Balance', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),188 'balance': fields.function(_debit_credit_bal_qtty, type='float', string='Balance', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Amount')),
189 'debit': fields.function(_debit_credit_bal_qtty, type='float', string='Debit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),189 'debit': fields.function(_debit_credit_bal_qtty, type='float', string='Debit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Amount')),
190 'credit': fields.function(_debit_credit_bal_qtty, type='float', string='Credit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),190 'credit': fields.function(_debit_credit_bal_qtty, type='float', string='Credit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Amount')),
191 'quantity': fields.function(_debit_credit_bal_qtty, type='float', string='Quantity', multi='debit_credit_bal_qtty'),191 'quantity': fields.function(_debit_credit_bal_qtty, type='float', string='Quantity', multi='debit_credit_bal_qtty'),
192 '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.)'),192 '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.)'),
193 'partner_id': fields.many2one('res.partner', 'Customer'),193 'partner_id': fields.many2one('res.partner', 'Customer'),
@@ -316,7 +316,7 @@
316 _columns = {316 _columns = {
317 'name': fields.char('Description', size=256, required=True),317 'name': fields.char('Description', size=256, required=True),
318 'date': fields.date('Date', required=True, select=True),318 'date': fields.date('Date', required=True, select=True),
319 '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')),319 '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')),
320 'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),320 'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
321 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='restrict', select=True, domain=[('type','<>','view')]),321 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='restrict', select=True, domain=[('type','<>','view')]),
322 'user_id': fields.many2one('res.users', 'User'),322 'user_id': fields.many2one('res.users', 'User'),
323323
=== modified file 'analytic_contract_hr_expense/analytic_contract_hr_expense.py'
--- analytic_contract_hr_expense/analytic_contract_hr_expense.py 2014-04-01 12:36:57 +0000
+++ analytic_contract_hr_expense/analytic_contract_hr_expense.py 2014-05-02 07:31:45 +0000
@@ -112,7 +112,7 @@
112 'est_expenses': fields.float('Estimation of Expenses to Invoice'),112 'est_expenses': fields.float('Estimation of Expenses to Invoice'),
113 'ca_invoiced': fields.function(_ca_invoiced_calc, type='float', string='Invoiced Amount',113 'ca_invoiced': fields.function(_ca_invoiced_calc, type='float', string='Invoiced Amount',
114 help="Total customer invoiced amount for this account.",114 help="Total customer invoiced amount for this account.",
115 digits_compute=dp.get_precision('Account')),115 digits_compute=dp.get_precision('Amount')),
116 }116 }
117117
118 def on_change_template(self, cr, uid, id, template_id, date_start=False, context=None):118 def on_change_template(self, cr, uid, id, template_id, date_start=False, context=None):
119119
=== modified file 'analytic_user_function/analytic_user_function.py'
--- analytic_user_function/analytic_user_function.py 2014-04-09 16:31:32 +0000
+++ analytic_user_function/analytic_user_function.py 2014-05-02 07:31:45 +0000
@@ -32,7 +32,7 @@
32 'product_id': fields.many2one("product.product", "Service", required=True,),32 'product_id': fields.many2one("product.product", "Service", required=True,),
33 'account_id': fields.many2one("account.analytic.account", "Analytic Account", required=True,),33 'account_id': fields.many2one("account.analytic.account", "Analytic Account", required=True,),
34 'uom_id': fields.related("product_id", "uom_id", relation="product.uom", string="Unit of Measure", type="many2one", readonly=True),34 'uom_id': fields.related("product_id", "uom_id", relation="product.uom", string="Unit of Measure", type="many2one", readonly=True),
35 'price': fields.float('Price', digits_compute=dp.get_precision('Product Price'), help="Price per hour for this user.", required=True),35 'price': fields.float('Price', digits_compute=dp.get_precision('Price'), help="Price per hour for this user.", required=True),
36 }36 }
37 def onchange_user_product_id(self, cr, uid, ids, user_id, product_id, context=None):37 def onchange_user_product_id(self, cr, uid, ids, user_id, product_id, context=None):
38 if not user_id:38 if not user_id:
3939
=== modified file 'decimal_precision/__openerp__.py'
--- decimal_precision/__openerp__.py 2012-11-29 22:26:45 +0000
+++ decimal_precision/__openerp__.py 2014-05-02 07:31:45 +0000
@@ -33,6 +33,7 @@
33 'category' : 'Hidden/Dependency',33 'category' : 'Hidden/Dependency',
34 'data': [34 'data': [
35 'decimal_precision_view.xml',35 'decimal_precision_view.xml',
36 'decimal_precision_data.xml',
36 'security/ir.model.access.csv',37 'security/ir.model.access.csv',
37 ],38 ],
38 'demo': [],39 'demo': [],
3940
=== added file 'decimal_precision/decimal_precision_data.xml'
--- decimal_precision/decimal_precision_data.xml 1970-01-01 00:00:00 +0000
+++ decimal_precision/decimal_precision_data.xml 2014-05-02 07:31:45 +0000
@@ -0,0 +1,12 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data noupdate="1">
4
5 <!-- Decimal Precision -->
6 <record forcecreate="True" id="decimal_price" model="decimal.precision">
7 <field name="name">Price</field>
8 <field name="digits">2</field>
9 </record>
10
11 </data>
12</openerp>
0\ No newline at end of file13\ No newline at end of file
114
=== modified file 'delivery/delivery.py'
--- delivery/delivery.py 2014-05-01 15:56:33 +0000
+++ delivery/delivery.py 2014-05-02 07:31:45 +0000
@@ -235,8 +235,8 @@
235 'max_value': fields.float('Maximum Value', required=True),235 'max_value': fields.float('Maximum Value', required=True),
236 'price_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Price Type', required=True),236 'price_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Price Type', required=True),
237 'variable_factor': fields.selection([('weight','Weight'),('volume','Volume'),('wv','Weight * Volume'), ('price','Price')], 'Variable Factor', required=True),237 'variable_factor': fields.selection([('weight','Weight'),('volume','Volume'),('wv','Weight * Volume'), ('price','Price')], 'Variable Factor', required=True),
238 'list_price': fields.float('Sale Price', digits_compute= dp.get_precision('Product Price'), required=True),238 'list_price': fields.float('Sale Price', digits_compute= dp.get_precision('Price'), required=True),
239 'standard_price': fields.float('Cost Price', digits_compute= dp.get_precision('Product Price'), required=True),239 'standard_price': fields.float('Cost Price', digits_compute= dp.get_precision('Price'), required=True),
240 }240 }
241 _defaults = {241 _defaults = {
242 'type': lambda *args: 'weight',242 'type': lambda *args: 'weight',
243243
=== modified file 'delivery/stock.py'
--- delivery/stock.py 2013-11-27 15:32:57 +0000
+++ delivery/stock.py 2014-05-02 07:31:45 +0000
@@ -54,12 +54,12 @@
54 _columns = {54 _columns = {
55 'carrier_id':fields.many2one("delivery.carrier","Carrier"),55 'carrier_id':fields.many2one("delivery.carrier","Carrier"),
56 'volume': fields.float('Volume'),56 'volume': fields.float('Volume'),
57 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',57 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
58 store={58 store={
59 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),59 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
60 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),60 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
61 }),61 }),
62 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',62 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
63 store={63 store={
64 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),64 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
65 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),65 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
@@ -167,11 +167,11 @@
167 return res167 return res
168168
169 _columns = {169 _columns = {
170 'weight': fields.function(_cal_move_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight',170 'weight': fields.function(_cal_move_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_move_weight',
171 store={171 store={
172 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20),172 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20),
173 }),173 }),
174 'weight_net': fields.function(_cal_move_weight, type='float', string='Net weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight',174 'weight_net': fields.function(_cal_move_weight, type='float', string='Net weight', digits_compute= dp.get_precision('Weight'), multi='_cal_move_weight',
175 store={175 store={
176 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20),176 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20),
177 }),177 }),
@@ -203,12 +203,12 @@
203 _columns = {203 _columns = {
204 'carrier_id':fields.many2one("delivery.carrier","Carrier"),204 'carrier_id':fields.many2one("delivery.carrier","Carrier"),
205 'volume': fields.float('Volume'),205 'volume': fields.float('Volume'),
206 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',206 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
207 store={207 store={
208 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),208 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
209 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),209 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
210 }),210 }),
211 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',211 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
212 store={212 store={
213 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),213 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
214 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),214 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
@@ -230,12 +230,12 @@
230 _columns = {230 _columns = {
231 'carrier_id':fields.many2one("delivery.carrier","Carrier"),231 'carrier_id':fields.many2one("delivery.carrier","Carrier"),
232 'volume': fields.float('Volume'),232 'volume': fields.float('Volume'),
233 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',233 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
234 store={234 store={
235 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),235 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
236 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),236 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
237 }),237 }),
238 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',238 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
239 store={239 store={
240 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),240 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
241 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),241 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
242242
=== modified file 'hr_contract/hr_contract.py'
--- hr_contract/hr_contract.py 2013-10-27 12:31:04 +0000
+++ hr_contract/hr_contract.py 2014-05-02 07:31:45 +0000
@@ -21,6 +21,7 @@
21import time21import time
2222
23from openerp.osv import fields, osv23from openerp.osv import fields, osv
24import openerp.addons.decimal_precision as dp
2425
25class hr_employee(osv.osv):26class hr_employee(osv.osv):
26 _name = "hr.employee"27 _name = "hr.employee"
@@ -71,7 +72,7 @@
71 'trial_date_start': fields.date('Trial Start Date'),72 'trial_date_start': fields.date('Trial Start Date'),
72 'trial_date_end': fields.date('Trial End Date'),73 'trial_date_end': fields.date('Trial End Date'),
73 'working_hours': fields.many2one('resource.calendar','Working Schedule'),74 'working_hours': fields.many2one('resource.calendar','Working Schedule'),
74 'wage': fields.float('Wage', digits=(16,2), required=True, help="Basic Salary of the employee"),75 'wage': fields.float('Wage', digits_compute=dp.get_precision('Amount'), required=True, help="Basic Salary of the employee"),
75 'advantages': fields.text('Advantages'),76 'advantages': fields.text('Advantages'),
76 'notes': fields.text('Notes'),77 'notes': fields.text('Notes'),
77 'permit_no': fields.char('Work Permit No', size=256, required=False, readonly=False),78 'permit_no': fields.char('Work Permit No', size=256, required=False, readonly=False),
7879
=== modified file 'hr_expense/hr_expense.py'
--- hr_expense/hr_expense.py 2014-03-10 14:36:00 +0000
+++ hr_expense/hr_expense.py 2014-05-02 07:31:45 +0000
@@ -77,7 +77,7 @@
77 'account_move_id': fields.many2one('account.move', 'Ledger Posting'),77 'account_move_id': fields.many2one('account.move', 'Ledger Posting'),
78 'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),78 'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),
79 'note': fields.text('Note'),79 'note': fields.text('Note'),
80 'amount': fields.function(_amount, string='Total Amount', digits_compute=dp.get_precision('Account'), 80 'amount': fields.function(_amount, string='Total Amount', digits_compute=dp.get_precision('Amount'),
81 store={81 store={
82 'hr.expense.line': (_get_expense_from_line, ['unit_amount','unit_quantity'], 10)82 'hr.expense.line': (_get_expense_from_line, ['unit_amount','unit_quantity'], 10)
83 }),83 }),
@@ -418,9 +418,9 @@
418 'name': fields.char('Expense Note', size=128, required=True),418 'name': fields.char('Expense Note', size=128, required=True),
419 'date_value': fields.date('Date', required=True),419 'date_value': fields.date('Date', required=True),
420 'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),420 'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),
421 'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Account')),421 'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Amount')),
422 'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Product Price')),422 'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Price')),
423 'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Product Unit of Measure')),423 'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Quantity')),
424 'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),424 'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),
425 'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True),425 'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True),
426 'description': fields.text('Description'),426 'description': fields.text('Description'),
427427
=== modified file 'hr_expense/report/hr_expense_report.py'
--- hr_expense/report/hr_expense_report.py 2013-10-27 12:31:04 +0000
+++ hr_expense/report/hr_expense_report.py 2014-05-02 07:31:45 +0000
@@ -47,11 +47,11 @@
47 'company_id':fields.many2one('res.company', 'Company', readonly=True),47 'company_id':fields.many2one('res.company', 'Company', readonly=True),
48 'user_id':fields.many2one('res.users', 'Validation User', readonly=True),48 'user_id':fields.many2one('res.users', 'Validation User', readonly=True),
49 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),49 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
50 'price_total':fields.float('Total Price', readonly=True, digits_compute=dp.get_precision('Account')),50 'price_total':fields.float('Total Price', readonly=True, digits_compute=dp.get_precision('Amount')),
51 'delay_valid':fields.float('Delay to Valid', readonly=True),51 'delay_valid':fields.float('Delay to Valid', readonly=True),
52 'delay_confirm':fields.float('Delay to Confirm', readonly=True),52 'delay_confirm':fields.float('Delay to Confirm', readonly=True),
53 'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True),53 'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True),
54 'price_average':fields.float('Average Price', readonly=True, digits_compute=dp.get_precision('Account')),54 'price_average':fields.float('Average Price', readonly=True, digits_compute=dp.get_precision('Amount')),
55 'nbr':fields.integer('# of Lines', readonly=True),55 'nbr':fields.integer('# of Lines', readonly=True),
56 'no_of_products':fields.integer('# of Products', readonly=True),56 'no_of_products':fields.integer('# of Products', readonly=True),
57 'no_of_account':fields.integer('# of Accounts', readonly=True),57 'no_of_account':fields.integer('# of Accounts', readonly=True),
5858
=== modified file 'hr_payroll/hr_payroll.py'
--- hr_payroll/hr_payroll.py 2014-04-03 15:59:04 +0000
+++ hr_payroll/hr_payroll.py 2014-05-02 07:31:45 +0000
@@ -750,7 +750,7 @@
750 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade', select=True),750 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade', select=True),
751 'sequence': fields.integer('Sequence', required=True, select=True),751 'sequence': fields.integer('Sequence', required=True, select=True),
752 'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"),752 'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"),
753 '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."),753 '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."),
754 'contract_id': fields.many2one('hr.contract', 'Contract', required=True, help="The contract for which applied this input"),754 'contract_id': fields.many2one('hr.contract', 'Contract', required=True, help="The contract for which applied this input"),
755 }755 }
756 _order = 'payslip_id, sequence'756 _order = 'payslip_id, sequence'
@@ -783,8 +783,8 @@
783 ('fix','Fixed Amount'),783 ('fix','Fixed Amount'),
784 ('code','Python Code'),784 ('code','Python Code'),
785 ],'Amount Type', select=True, required=True, help="The computation method for the rule amount."),785 ],'Amount Type', select=True, required=True, help="The computation method for the rule amount."),
786 'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Payroll'),),786 'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Amount'),),
787 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Payroll Rate'), help='For example, enter 50.0 to apply a percentage of 50%'),787 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Amount'), help='For example, enter 50.0 to apply a percentage of 50%'),
788 'amount_python_compute':fields.text('Python Code'),788 'amount_python_compute':fields.text('Python Code'),
789 'amount_percentage_base':fields.char('Percentage based on',size=1024, required=False, readonly=False, help='result will be affected to a variable'),789 'amount_percentage_base':fields.char('Percentage based on',size=1024, required=False, readonly=False, help='result will be affected to a variable'),
790 'child_ids':fields.one2many('hr.salary.rule', 'parent_rule_id', 'Child Salary Rule'),790 'child_ids':fields.one2many('hr.salary.rule', 'parent_rule_id', 'Child Salary Rule'),
@@ -933,10 +933,10 @@
933 'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True),933 'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True),
934 'employee_id':fields.many2one('hr.employee', 'Employee', required=True),934 'employee_id':fields.many2one('hr.employee', 'Employee', required=True),
935 'contract_id':fields.many2one('hr.contract', 'Contract', required=True, select=True),935 'contract_id':fields.many2one('hr.contract', 'Contract', required=True, select=True),
936 'rate': fields.float('Rate (%)', digits_compute=dp.get_precision('Payroll Rate')),936 'rate': fields.float('Rate (%)', digits_compute=dp.get_precision('Price')),
937 'amount': fields.float('Amount', digits_compute=dp.get_precision('Payroll')),937 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
938 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Payroll')),938 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
939 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Payroll'),store=True ),939 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Amount'),store=True ),
940 }940 }
941941
942 _defaults = {942 _defaults = {
@@ -974,7 +974,7 @@
974974
975 _columns = {975 _columns = {
976 'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True),976 'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True),
977 '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."),977 '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."),
978 }978 }
979979
980980
981981
=== modified file 'hr_payroll/hr_payroll_data.xml'
--- hr_payroll/hr_payroll_data.xml 2012-06-20 13:04:49 +0000
+++ hr_payroll/hr_payroll_data.xml 2014-05-02 07:31:45 +0000
@@ -67,7 +67,6 @@
67 <field name="register_id" ref="contrib_register_employees"/>67 <field name="register_id" ref="contrib_register_employees"/>
68 </record>68 </record>
6969
70
71 <!-- Salary Structure -->70 <!-- Salary Structure -->
7271
73 <record id="structure_base" model="hr.payroll.structure">72 <record id="structure_base" model="hr.payroll.structure">
@@ -77,18 +76,5 @@
77 <field name="company_id" ref="base.main_company"/>76 <field name="company_id" ref="base.main_company"/>
78 </record>77 </record>
7978
80 <!-- Decimal Precision -->
81
82 <record forcecreate="True" id="decimal_payroll" model="decimal.precision">
83 <field name="name">Payroll</field>
84 <field name="digits">2</field>
85 </record>
86
87 <record forcecreate="True" id="decimal_payroll_rate" model="decimal.precision">
88 <field name="name">Payroll Rate</field>
89 <field name="digits">4</field>
90 </record>
91
92
93 </data>79 </data>
94</openerp>80</openerp>
9581
=== modified file 'hr_recruitment/report/hr_recruitment_report.py'
--- hr_recruitment/report/hr_recruitment_report.py 2014-01-27 09:23:08 +0000
+++ hr_recruitment/report/hr_recruitment_report.py 2014-05-02 07:31:45 +0000
@@ -43,10 +43,10 @@
43 'type_id': fields.many2one('hr.recruitment.degree', 'Degree'),43 'type_id': fields.many2one('hr.recruitment.degree', 'Degree'),
44 'department_id': fields.many2one('hr.department','Department',readonly=True),44 'department_id': fields.many2one('hr.department','Department',readonly=True),
45 'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'),45 'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'),
46 'salary_prop' : fields.float("Salary Proposed", digits_compute=dp.get_precision('Account')),46 'salary_prop' : fields.float("Salary Proposed", digits_compute=dp.get_precision('Amount')),
47 'salary_prop_avg' : fields.float("Avg. Proposed Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),47 'salary_prop_avg' : fields.float("Avg. Proposed Salary", group_operator="avg", digits_compute=dp.get_precision('Amount')),
48 'salary_exp' : fields.float("Salary Expected", digits_compute=dp.get_precision('Account')),48 'salary_exp' : fields.float("Salary Expected", digits_compute=dp.get_precision('Amount')),
49 'salary_exp_avg' : fields.float("Avg. Expected Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),49 'salary_exp_avg' : fields.float("Avg. Expected Salary", group_operator="avg", digits_compute=dp.get_precision('Amount')),
50 'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),50 'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),
51 'available': fields.float("Availability"),51 'available': fields.float("Availability"),
52 'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",52 'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",
5353
=== modified file 'hr_timesheet_invoice/report/report_analytic.py'
--- hr_timesheet_invoice/report/report_analytic.py 2013-10-27 12:31:04 +0000
+++ hr_timesheet_invoice/report/report_analytic.py 2014-05-02 07:31:45 +0000
@@ -71,8 +71,8 @@
71 'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),71 'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
72 'product_uom_id':fields.many2one('product.uom', 'Unit of Measure', readonly=True),72 'product_uom_id':fields.many2one('product.uom', 'Unit of Measure', readonly=True),
73 'unit_amount': fields.float('Units', readonly=True),73 'unit_amount': fields.float('Units', readonly=True),
74 'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Product Price')),74 'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Price')),
75 'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Account')),75 'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Amount')),
76 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),76 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
77 ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),77 ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
78 }78 }
7979
=== modified file 'hr_timesheet_sheet/report/hr_timesheet_report.py'
--- hr_timesheet_sheet/report/hr_timesheet_report.py 2014-01-27 13:03:51 +0000
+++ hr_timesheet_sheet/report/hr_timesheet_report.py 2014-05-02 07:31:45 +0000
@@ -37,7 +37,7 @@
37 'user_id': fields.many2one('res.users', 'User',readonly=True),37 'user_id': fields.many2one('res.users', 'User',readonly=True),
38 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),38 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
39 'company_id': fields.many2one('res.company', 'Company',readonly=True),39 'company_id': fields.many2one('res.company', 'Company',readonly=True),
40 'cost': fields.float('Cost',readonly=True, digits_compute=dp.get_precision('Account')),40 'cost': fields.float('Cost',readonly=True, digits_compute=dp.get_precision('Amount')),
41 'quantity': fields.float('Time',readonly=True),41 'quantity': fields.float('Time',readonly=True),
42 }42 }
4343
4444
=== modified file 'l10n_be_hr_payroll/l10n_be_hr_payroll.py'
--- l10n_be_hr_payroll/l10n_be_hr_payroll.py 2013-10-27 12:31:04 +0000
+++ l10n_be_hr_payroll/l10n_be_hr_payroll.py 2014-05-02 07:31:45 +0000
@@ -27,16 +27,16 @@
27 _inherit = 'hr.contract'27 _inherit = 'hr.contract'
2828
29 _columns = {29 _columns = {
30 'travel_reimbursement_amount': fields.float('Reimbursement of travel expenses', digits_compute=dp.get_precision('Payroll')),30 'travel_reimbursement_amount': fields.float('Reimbursement of travel expenses', digits_compute=dp.get_precision('Price')),
31 'car_company_amount': fields.float('Company car employer', digits_compute=dp.get_precision('Payroll')),31 'car_company_amount': fields.float('Company car employer', digits_compute=dp.get_precision('Price')),
32 'car_employee_deduction': fields.float('Company Car Deduction for Worker', digits_compute=dp.get_precision('Payroll')),32 'car_employee_deduction': fields.float('Company Car Deduction for Worker', digits_compute=dp.get_precision('Price')),
33 'misc_onss_deduction': fields.float('Miscellaneous exempt ONSS ', digits_compute=dp.get_precision('Payroll')),33 'misc_onss_deduction': fields.float('Miscellaneous exempt ONSS ', digits_compute=dp.get_precision('Price')),
34 'meal_voucher_amount': fields.float('Check Value Meal ', digits_compute=dp.get_precision('Payroll')),34 'meal_voucher_amount': fields.float('Check Value Meal ', digits_compute=dp.get_precision('Price')),
35 'meal_voucher_employee_deduction': fields.float('Check Value Meal - by worker ', digits_compute=dp.get_precision('Payroll')),35 'meal_voucher_employee_deduction': fields.float('Check Value Meal - by worker ', digits_compute=dp.get_precision('Price')),
36 'insurance_employee_deduction': fields.float('Insurance Group - by worker ', digits_compute=dp.get_precision('Payroll')),36 'insurance_employee_deduction': fields.float('Insurance Group - by worker ', digits_compute=dp.get_precision('Price')),
37 'misc_advantage_amount': fields.float('Benefits of various nature ', digits_compute=dp.get_precision('Payroll')),37 'misc_advantage_amount': fields.float('Benefits of various nature ', digits_compute=dp.get_precision('Price')),
38 'additional_net_amount': fields.float('Net supplements', digits_compute=dp.get_precision('Payroll')),38 'additional_net_amount': fields.float('Net supplements', digits_compute=dp.get_precision('Price')),
39 'retained_net_amount': fields.float('Net retained ', digits_compute=dp.get_precision('Payroll')),39 'retained_net_amount': fields.float('Net retained ', digits_compute=dp.get_precision('Price')),
40 }40 }
4141
4242
4343
=== modified file 'l10n_br/account.py'
--- l10n_br/account.py 2013-10-27 12:31:04 +0000
+++ l10n_br/account.py 2014-05-02 07:31:45 +0000
@@ -93,7 +93,7 @@
93def get_precision_tax():93def get_precision_tax():
94 def change_digit_tax(cr):94 def change_digit_tax(cr):
95 decimal_precision = openerp.registry(cr.dbname)['decimal.precision']95 decimal_precision = openerp.registry(cr.dbname)['decimal.precision']
96 res = decimal_precision.precision_get(cr, 1, 'Account')96 res = decimal_precision.precision_get(cr, 1, 'Amount')
97 return (16, res+2)97 return (16, res+2)
98 return change_digit_tax98 return change_digit_tax
9999
100100
=== modified file 'l10n_fr_hr_payroll/l10n_fr_hr_payroll.py'
--- l10n_fr_hr_payroll/l10n_fr_hr_payroll.py 2013-10-27 12:31:04 +0000
+++ l10n_fr_hr_payroll/l10n_fr_hr_payroll.py 2014-05-02 07:31:45 +0000
@@ -27,9 +27,9 @@
27 _inherit = 'res.company'27 _inherit = 'res.company'
2828
29 _columns = {29 _columns = {
30 'plafond_secu': fields.float('Plafond de la Securite Sociale', digits_compute=dp.get_precision('Payroll')),30 'plafond_secu': fields.float('Plafond de la Securite Sociale', digits_compute=dp.get_precision('Price')),
31 'nombre_employes': fields.integer('Nombre d\'employes'),31 'nombre_employes': fields.integer('Nombre d\'employes'),
32 'cotisation_prevoyance': fields.float('Cotisation Patronale Prevoyance', digits_compute=dp.get_precision('Payroll')),32 'cotisation_prevoyance': fields.float('Cotisation Patronale Prevoyance', digits_compute=dp.get_precision('Price')),
33 'org_ss': fields.char('Organisme de securite sociale', size=64),33 'org_ss': fields.char('Organisme de securite sociale', size=64),
34 'conv_coll': fields.char('Convention collective', size=64),34 'conv_coll': fields.char('Convention collective', size=64),
35 }35 }
3636
=== modified file 'l10n_in_hr_payroll/l10n_in_hr_payroll.py'
--- l10n_in_hr_payroll/l10n_in_hr_payroll.py 2013-10-27 12:31:04 +0000
+++ l10n_in_hr_payroll/l10n_in_hr_payroll.py 2014-05-02 07:31:45 +0000
@@ -40,12 +40,12 @@
40 _description = 'HR Contract'40 _description = 'HR Contract'
4141
42 _columns = {42 _columns = {
43 'tds': fields.float('TDS', digits_compute=dp.get_precision('Payroll'), help="Amount for Tax Deduction at Source"),43 'tds': fields.float('TDS', digits_compute=dp.get_precision('Price'), help="Amount for Tax Deduction at Source"),
44 'driver_salay': fields.boolean('Driver Salary', help="Check this box if you provide allowance for driver"),44 'driver_salay': fields.boolean('Driver Salary', help="Check this box if you provide allowance for driver"),
45 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'), help="Deduction towards company provided medical insurance"),45 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Price'), help="Deduction towards company provided medical insurance"),
46 '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(%)"),46 '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(%)"),
47 '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(%)"),47 '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(%)"),
48 'supplementary_allowance': fields.float('Supplementary Allowance', digits_compute=dp.get_precision('Payroll')),48 'supplementary_allowance': fields.float('Supplementary Allowance', digits_compute=dp.get_precision('Price')),
49 }49 }
5050
5151
@@ -235,7 +235,7 @@
235 'name': fields.char('Bank Account No.', size=25, required=True),235 'name': fields.char('Bank Account No.', size=25, required=True),
236 'ifsc_code': fields.char('IFSC Code', size=16),236 'ifsc_code': fields.char('IFSC Code', size=16),
237 'employee_id': fields.many2one('hr.employee', 'Employee', required=True),237 'employee_id': fields.many2one('hr.employee', 'Employee', required=True),
238 'bysal': fields.float('By Salary', digits_compute=dp.get_precision('Payroll')),238 'bysal': fields.float('By Salary', digits_compute=dp.get_precision('Price')),
239 'debit_credit': fields.char('C/D', size=3, required=False),239 'debit_credit': fields.char('C/D', size=3, required=False),
240 'company_id': fields.related('advice_id', 'company_id', type='many2one', required=False, relation='res.company', string='Company', store=True),240 'company_id': fields.related('advice_id', 'company_id', type='many2one', required=False, relation='res.company', string='Company', store=True),
241 'ifsc': fields.related('advice_id', 'neft', type='boolean', string='IFSC'),241 'ifsc': fields.related('advice_id', 'neft', type='boolean', string='IFSC'),
242242
=== modified file 'lunch/lunch.py'
--- lunch/lunch.py 2013-10-27 12:31:04 +0000
+++ lunch/lunch.py 2014-05-02 07:31:45 +0000
@@ -435,7 +435,7 @@
435 'name': fields.char('Product', required=True, size=64),435 'name': fields.char('Product', required=True, size=64),
436 'category_id': fields.many2one('lunch.product.category', 'Category', required=True),436 'category_id': fields.many2one('lunch.product.category', 'Category', required=True),
437 'description': fields.text('Description', size=256),437 'description': fields.text('Description', size=256),
438 'price': fields.float('Price', digits=(16,2)), #TODO: use decimal precision of 'Account', move it from product to decimal_precision438 'price': fields.float('Price', digits=(16,2)), #TODO: use decimal precision of 'Amount', move it from product to decimal_precision
439 'supplier': fields.many2one('res.partner', 'Supplier'),439 'supplier': fields.many2one('res.partner', 'Supplier'),
440 }440 }
441441
442442
=== modified file 'marketing_campaign/marketing_campaign.py'
--- marketing_campaign/marketing_campaign.py 2013-11-27 15:32:57 +0000
+++ marketing_campaign/marketing_campaign.py 2014-05-02 07:31:45 +0000
@@ -120,7 +120,7 @@
120 'Status',),120 'Status',),
121 'activity_ids': fields.one2many('marketing.campaign.activity',121 'activity_ids': fields.one2many('marketing.campaign.activity',
122 'campaign_id', 'Activities'),122 'campaign_id', 'Activities'),
123 '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')),123 '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')),
124 }124 }
125125
126 _defaults = {126 _defaults = {
@@ -433,8 +433,8 @@
433 'from_ids': fields.one2many('marketing.campaign.transition',433 'from_ids': fields.one2many('marketing.campaign.transition',
434 'activity_to_id',434 'activity_to_id',
435 'Previous Activities'),435 'Previous Activities'),
436 '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')),436 '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')),
437 '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')),437 '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')),
438 'signal': fields.char('Signal', size=128,438 'signal': fields.char('Signal', size=128,
439 help='An activity with a signal can be called programmatically. Be careful, the workitem is always created when a signal is sent'),439 help='An activity with a signal can be called programmatically. Be careful, the workitem is always created when a signal is sent'),
440 'keep_if_condition_not_met': fields.boolean("Don't Delete Workitems",440 'keep_if_condition_not_met': fields.boolean("Don't Delete Workitems",
441441
=== modified file 'marketing_campaign/report/campaign_analysis.py'
--- marketing_campaign/report/campaign_analysis.py 2013-10-27 12:31:04 +0000
+++ marketing_campaign/report/campaign_analysis.py 2014-05-02 07:31:45 +0000
@@ -63,8 +63,8 @@
63 'country_id': fields.related('partner_id', 'country_id',63 'country_id': fields.related('partner_id', 'country_id',
64 type='many2one', relation='res.country',string='Country'),64 type='many2one', relation='res.country',string='Country'),
65 'total_cost' : fields.function(_total_cost, string='Cost',65 'total_cost' : fields.function(_total_cost, string='Cost',
66 type="float", digits_compute=dp.get_precision('Account')),66 type="float", digits_compute=dp.get_precision('Amount')),
67 'revenue': fields.float('Revenue', readonly=True, digits_compute=dp.get_precision('Account')),67 'revenue': fields.float('Revenue', readonly=True, digits_compute=dp.get_precision('Amount')),
68 'count' : fields.integer('# of Actions', readonly=True),68 'count' : fields.integer('# of Actions', readonly=True),
69 'state': fields.selection([('todo', 'To Do'),69 'state': fields.selection([('todo', 'To Do'),
70 ('exception', 'Exception'), ('done', 'Done'),70 ('exception', 'Exception'), ('done', 'Done'),
7171
=== modified file 'membership/membership.py'
--- membership/membership.py 2013-10-27 12:31:04 +0000
+++ membership/membership.py 2014-05-02 07:31:45 +0000
@@ -146,7 +146,7 @@
146 'date_to': fields.date('To', readonly=True),146 'date_to': fields.date('To', readonly=True),
147 'date_cancel': fields.date('Cancel date'),147 'date_cancel': fields.date('Cancel date'),
148 'date': fields.date('Join Date', help="Date on which member has joined the membership"),148 'date': fields.date('Join Date', help="Date on which member has joined the membership"),
149 'member_price': fields.float('Membership Fee', digits_compute= dp.get_precision('Product Price'), required=True, help='Amount for the membership'),149 'member_price': fields.float('Membership Fee', digits_compute= dp.get_precision('Price'), required=True, help='Amount for the membership'),
150 'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True),150 'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True),
151 'account_invoice_id': fields.related('account_invoice_line', 'invoice_id', type='many2one', relation='account.invoice', string='Invoice', readonly=True),151 'account_invoice_id': fields.related('account_invoice_line', 'invoice_id', type='many2one', relation='account.invoice', string='Invoice', readonly=True),
152 'state': fields.function(_state,152 'state': fields.function(_state,
153153
=== modified file 'membership/report/report_membership.py'
--- membership/report/report_membership.py 2013-10-27 12:31:04 +0000
+++ membership/report/report_membership.py 2014-05-02 07:31:45 +0000
@@ -53,8 +53,8 @@
53 'num_waiting': fields.integer('# Waiting', readonly=True),53 'num_waiting': fields.integer('# Waiting', readonly=True),
54 'num_invoiced': fields.integer('# Invoiced', readonly=True),54 'num_invoiced': fields.integer('# Invoiced', readonly=True),
55 'num_paid': fields.integer('# Paid', readonly=True),55 'num_paid': fields.integer('# Paid', readonly=True),
56 'tot_pending': fields.float('Pending Amount', digits_compute= dp.get_precision('Account'), readonly=True),56 'tot_pending': fields.float('Pending Amount', digits_compute= dp.get_precision('Amount'), readonly=True),
57 'tot_earned': fields.float('Earned Amount', digits_compute= dp.get_precision('Account'), readonly=True),57 'tot_earned': fields.float('Earned Amount', digits_compute= dp.get_precision('Amount'), readonly=True),
58 'partner_id': fields.many2one('res.partner', 'Member', readonly=True),58 'partner_id': fields.many2one('res.partner', 'Member', readonly=True),
59 'associate_member_id': fields.many2one('res.partner', 'Associate Member', readonly=True),59 'associate_member_id': fields.many2one('res.partner', 'Associate Member', readonly=True),
60 'membership_id': fields.many2one('product.product', 'Membership Product', readonly=True),60 'membership_id': fields.many2one('product.product', 'Membership Product', readonly=True),
6161
=== modified file 'membership/wizard/membership_invoice.py'
--- membership/wizard/membership_invoice.py 2013-10-27 12:31:04 +0000
+++ membership/wizard/membership_invoice.py 2014-05-02 07:31:45 +0000
@@ -29,7 +29,7 @@
29 _description = "Membership Invoice"29 _description = "Membership Invoice"
30 _columns = {30 _columns = {
31 'product_id': fields.many2one('product.product','Membership', required=True),31 'product_id': fields.many2one('product.product','Membership', required=True),
32 'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Product Price'), required=True),32 'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Price'), required=True),
33 }33 }
34 def onchange_product(self, cr, uid, ids, product_id=False):34 def onchange_product(self, cr, uid, ids, product_id=False):
35 """This function returns value of product's member price based on product id.35 """This function returns value of product's member price based on product id.
3636
=== modified file 'mrp/mrp.py'
--- mrp/mrp.py 2014-03-11 14:52:05 +0000
+++ mrp/mrp.py 2014-05-02 07:31:45 +0000
@@ -202,9 +202,9 @@
202 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bills of material."),202 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bills of material."),
203 'position': fields.char('Internal Reference', size=64, help="Reference to a position in an external plan."),203 'position': fields.char('Internal Reference', size=64, help="Reference to a position in an external plan."),
204 'product_id': fields.many2one('product.product', 'Product', required=True),204 'product_id': fields.many2one('product.product', 'Product', required=True),
205 'product_uos_qty': fields.float('Product UOS Qty'),205 'product_uos_qty': fields.float('Product UOS Qty', digits_compute= dp.get_precision('Quantity')),
206 '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."),206 '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."),
207 'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Product Unit of Measure')),207 'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Quantity')),
208 '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"),208 '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"),
209 'product_rounding': fields.float('Product Rounding', help="Rounding applied on the product quantity."),209 'product_rounding': fields.float('Product Rounding', help="Rounding applied on the product quantity."),
210 'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% within the production process."),210 'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% within the production process."),
@@ -448,9 +448,9 @@
448 select=True, readonly=True, states=dict.fromkeys(['draft', 'confirmed'], [('readonly', False)])),448 select=True, readonly=True, states=dict.fromkeys(['draft', 'confirmed'], [('readonly', False)])),
449449
450 'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft': [('readonly', False)]}),450 'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft': [('readonly', False)]}),
451 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, readonly=True, states={'draft':[('readonly',False)]}),451 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Quantity'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
452 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, readonly=True, states={'draft': [('readonly', False)]}),452 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, readonly=True, states={'draft': [('readonly', False)]}),
453 'product_uos_qty': fields.float('Product UoS Quantity', readonly=True, states={'draft': [('readonly', False)]}),453 'product_uos_qty': fields.float('Product UoS Quantity', digits_compute= dp.get_precision('Quantity'), readonly=True, states={'draft': [('readonly', False)]}),
454 'product_uos': fields.many2one('product.uom', 'Product UoS', readonly=True, states={'draft': [('readonly', False)]}),454 'product_uos': fields.many2one('product.uom', 'Product UoS', readonly=True, states={'draft': [('readonly', False)]}),
455 'progress': fields.function(_get_progress, type='float',455 'progress': fields.function(_get_progress, type='float',
456 string='Production progress'),456 string='Production progress'),
@@ -1102,9 +1102,9 @@
1102 _columns = {1102 _columns = {
1103 'name': fields.char('Name', size=64, required=True),1103 'name': fields.char('Name', size=64, required=True),
1104 'product_id': fields.many2one('product.product', 'Product', required=True),1104 'product_id': fields.many2one('product.product', 'Product', required=True),
1105 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),1105 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
1106 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),1106 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
1107 'product_uos_qty': fields.float('Product UOS Quantity'),1107 'product_uos_qty': fields.float('Product UOS Quantity', digits_compute= dp.get_precision('Quantity')),
1108 'product_uos': fields.many2one('product.uom', 'Product UOS'),1108 'product_uos': fields.many2one('product.uom', 'Product UOS'),
1109 'production_id': fields.many2one('mrp.production', 'Production Order', select=True),1109 'production_id': fields.many2one('mrp.production', 'Production Order', select=True),
1110 }1110 }
11111111
=== modified file 'mrp/report/price.py'
--- mrp/report/price.py 2014-01-06 13:57:00 +0000
+++ mrp/report/price.py 2014-05-02 07:31:45 +0000
@@ -140,7 +140,7 @@
140 </row>140 </row>
141 """ % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Unit of Measure'), _('Supplier Price per Unit of Measure'))141 """ % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Unit of Measure'), _('Supplier Price per Unit of Measure'))
142142
143 purchase_price_digits = rml_obj.get_digits(dp='Product Price')143 purchase_price_digits = rml_obj.get_digits(dp='Price')
144144
145 for product in product_pool.browse(cr, uid, ids, context=context):145 for product in product_pool.browse(cr, uid, ids, context=context):
146 product_uom_name = to_xml(product.uom_id.name)146 product_uom_name = to_xml(product.uom_id.name)
147147
=== modified file 'mrp/wizard/change_production_qty.py'
--- mrp/wizard/change_production_qty.py 2013-10-27 12:31:04 +0000
+++ mrp/wizard/change_production_qty.py 2014-05-02 07:31:45 +0000
@@ -28,7 +28,7 @@
28 _description = 'Change Quantity of Products'28 _description = 'Change Quantity of Products'
2929
30 _columns = {30 _columns = {
31 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),31 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Quantity'), required=True),
32 }32 }
3333
34 def default_get(self, cr, uid, fields, context=None):34 def default_get(self, cr, uid, fields, context=None):
3535
=== modified file 'mrp/wizard/mrp_product_produce.py'
--- mrp/wizard/mrp_product_produce.py 2013-10-27 12:31:04 +0000
+++ mrp/wizard/mrp_product_produce.py 2014-05-02 07:31:45 +0000
@@ -27,7 +27,7 @@
27 _description = "Product Produce"27 _description = "Product Produce"
2828
29 _columns = {29 _columns = {
30 'product_qty': fields.float('Select Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),30 'product_qty': fields.float('Select Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
31 'mode': fields.selection([('consume_produce', 'Consume & Produce'),31 'mode': fields.selection([('consume_produce', 'Consume & Produce'),
32 ('consume', 'Consume Only')], 'Mode', required=True,32 ('consume', 'Consume Only')], 'Mode', required=True,
33 help="'Consume only' mode will only consume the products with the quantity selected.\n"33 help="'Consume only' mode will only consume the products with the quantity selected.\n"
3434
=== modified file 'mrp_byproduct/mrp_byproduct.py'
--- mrp_byproduct/mrp_byproduct.py 2013-11-27 15:32:57 +0000
+++ mrp_byproduct/mrp_byproduct.py 2014-05-02 07:31:45 +0000
@@ -29,7 +29,7 @@
29 _description = 'Byproduct'29 _description = 'Byproduct'
30 _columns={30 _columns={
31 'product_id': fields.many2one('product.product', 'Product', required=True),31 'product_id': fields.many2one('product.product', 'Product', required=True),
32 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),32 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Quantity'), required=True),
33 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),33 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
34 '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.\34 '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.\
35 '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.\35 '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.\
3636
=== modified file 'mrp_operations/report/mrp_workorder_analysis.py'
--- mrp_operations/report/mrp_workorder_analysis.py 2014-01-29 14:30:55 +0000
+++ mrp_operations/report/mrp_workorder_analysis.py 2014-05-02 07:31:45 +0000
@@ -31,7 +31,7 @@
31 'nbr': fields.integer('# of Lines', readonly=True),31 'nbr': fields.integer('# of Lines', readonly=True),
32 'date': fields.date('Date', readonly=True),32 'date': fields.date('Date', readonly=True),
33 'product_id': fields.many2one('product.product', 'Product', readonly=True),33 'product_id': fields.many2one('product.product', 'Product', readonly=True),
34 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True),34 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Quantity'), readonly=True),
35 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')],'Status', readonly=True),35 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')],'Status', readonly=True),
36 'total_hours': fields.float('Total Hours', readonly=True),36 'total_hours': fields.float('Total Hours', readonly=True),
37 'total_cycles': fields.float('Total Cycles', readonly=True),37 'total_cycles': fields.float('Total Cycles', readonly=True),
3838
=== modified file 'mrp_repair/mrp_repair.py'
--- mrp_repair/mrp_repair.py 2014-04-01 19:03:08 +0000
+++ mrp_repair/mrp_repair.py 2014-05-02 07:31:45 +0000
@@ -160,19 +160,19 @@
160 '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)]}),160 '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)]}),
161 'invoiced': fields.boolean('Invoiced', readonly=True),161 'invoiced': fields.boolean('Invoiced', readonly=True),
162 'repaired': fields.boolean('Repaired', readonly=True),162 'repaired': fields.boolean('Repaired', readonly=True),
163 'amount_untaxed': fields.function(_amount_untaxed, string='Untaxed Amount',163 'amount_untaxed': fields.function(_amount_untaxed, string='Untaxed Amount', digits_compute=dp.get_precision('Amount'),
164 store={164 store={
165 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations', 'fees_lines'], 10),165 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations', 'fees_lines'], 10),
166 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),166 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
167 'mrp.repair.fee': (_get_fee_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),167 'mrp.repair.fee': (_get_fee_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
168 }),168 }),
169 'amount_tax': fields.function(_amount_tax, string='Taxes',169 'amount_tax': fields.function(_amount_tax, string='Taxes', digits_compute=dp.get_precision('Amount'),
170 store={170 store={
171 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations', 'fees_lines'], 10),171 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations', 'fees_lines'], 10),
172 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),172 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
173 'mrp.repair.fee': (_get_fee_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),173 'mrp.repair.fee': (_get_fee_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
174 }),174 }),
175 'amount_total': fields.function(_amount_total, string='Total',175 'amount_total': fields.function(_amount_total, string='Total', digits_compute=dp.get_precision('Amount'),
176 store={176 store={
177 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations', 'fees_lines'], 10),177 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations', 'fees_lines'], 10),
178 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),178 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
@@ -641,10 +641,10 @@
641 'to_invoice': fields.boolean('To Invoice'),641 'to_invoice': fields.boolean('To Invoice'),
642 'product_id': fields.many2one('product.product', 'Product', required=True),642 'product_id': fields.many2one('product.product', 'Product', required=True),
643 'invoiced': fields.boolean('Invoiced',readonly=True),643 'invoiced': fields.boolean('Invoiced',readonly=True),
644 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),644 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
645 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),645 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Amount')),
646 'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),646 'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),
647 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),647 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True),
648 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),648 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
649 'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number',domain="[('product_id','=',product_id)]"),649 'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number',domain="[('product_id','=',product_id)]"),
650 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),650 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
@@ -734,10 +734,10 @@
734 'repair_id': fields.many2one('mrp.repair', 'Repair Order Reference', required=True, ondelete='cascade', select=True),734 'repair_id': fields.many2one('mrp.repair', 'Repair Order Reference', required=True, ondelete='cascade', select=True),
735 'name': fields.char('Description', size=64, select=True,required=True),735 'name': fields.char('Description', size=64, select=True,required=True),
736 'product_id': fields.many2one('product.product', 'Product'),736 'product_id': fields.many2one('product.product', 'Product'),
737 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),737 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True),
738 'price_unit': fields.float('Unit Price', required=True),738 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Price'), required=True),
739 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),739 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
740 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),740 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Amount')),
741 'tax_id': fields.many2many('account.tax', 'repair_fee_line_tax', 'repair_fee_line_id', 'tax_id', 'Taxes'),741 'tax_id': fields.many2many('account.tax', 'repair_fee_line_tax', 'repair_fee_line_id', 'tax_id', 'Taxes'),
742 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),742 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
743 'to_invoice': fields.boolean('To Invoice'),743 'to_invoice': fields.boolean('To Invoice'),
744744
=== modified file 'payment/models/payment_acquirer.py'
--- payment/models/payment_acquirer.py 2014-04-16 12:10:55 +0000
+++ payment/models/payment_acquirer.py 2014-05-02 07:31:45 +0000
@@ -269,7 +269,7 @@
269269
270 def _wrap_payment_block(self, cr, uid, html_block, amount, currency_id, context=None):270 def _wrap_payment_block(self, cr, uid, html_block, amount, currency_id, context=None):
271 payment_header = _('Pay safely online')271 payment_header = _('Pay safely online')
272 amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))272 amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount'))
273 currency = self.pool['res.currency'].browse(cr, uid, currency_id, context=context)273 currency = self.pool['res.currency'].browse(cr, uid, currency_id, context=context)
274 currency_str = currency.symbol or currency.name274 currency_str = currency.symbol or currency.name
275 amount = u"%s %s" % ((currency_str, amount_str) if currency.position == 'before' else (amount_str, currency_str))275 amount = u"%s %s" % ((currency_str, amount_str) if currency.position == 'before' else (amount_str, currency_str))
276276
=== modified file 'point_of_sale/point_of_sale.py'
--- point_of_sale/point_of_sale.py 2014-04-14 12:35:29 +0000
+++ point_of_sale/point_of_sale.py 2014-05-02 07:31:45 +0000
@@ -247,13 +247,13 @@
247247
248 'cash_register_balance_end_real' : fields.related('cash_register_id', 'balance_end_real',248 'cash_register_balance_end_real' : fields.related('cash_register_id', 'balance_end_real',
249 type='float',249 type='float',
250 digits_compute=dp.get_precision('Account'),250 digits_compute=dp.get_precision('Amount'),
251 string="Ending Balance",251 string="Ending Balance",
252 help="Total of closing cash control lines.",252 help="Total of closing cash control lines.",
253 readonly=True),253 readonly=True),
254 'cash_register_balance_start' : fields.related('cash_register_id', 'balance_start',254 'cash_register_balance_start' : fields.related('cash_register_id', 'balance_start',
255 type='float',255 type='float',
256 digits_compute=dp.get_precision('Account'),256 digits_compute=dp.get_precision('Amount'),
257 string="Starting Balance",257 string="Starting Balance",
258 help="Total of opening cash control lines.",258 help="Total of opening cash control lines.",
259 readonly=True),259 readonly=True),
@@ -263,7 +263,7 @@
263 help="Total of all paid sale orders"),263 help="Total of all paid sale orders"),
264 'cash_register_balance_end' : fields.related('cash_register_id', 'balance_end',264 'cash_register_balance_end' : fields.related('cash_register_id', 'balance_end',
265 type='float',265 type='float',
266 digits_compute=dp.get_precision('Account'),266 digits_compute=dp.get_precision('Amount'),
267 string="Theoretical Closing Balance",267 string="Theoretical Closing Balance",
268 help="Sum of opening balance and transactions.",268 help="Sum of opening balance and transactions.",
269 readonly=True),269 readonly=True),
@@ -646,10 +646,10 @@
646 'warehouse_id': fields.related('session_id', 'config_id', 'warehouse_id', relation='stock.warehouse', type='many2one', string='Warehouse', store=True, readonly=True),646 'warehouse_id': fields.related('session_id', 'config_id', 'warehouse_id', relation='stock.warehouse', type='many2one', string='Warehouse', store=True, readonly=True),
647 'date_order': fields.datetime('Order Date', readonly=True, select=True),647 'date_order': fields.datetime('Order Date', readonly=True, select=True),
648 '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."),648 '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."),
649 'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Account'), multi='all'),649 'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Amount'), multi='all'),
650 'amount_total': fields.function(_amount_all, string='Total', multi='all'),650 'amount_total': fields.function(_amount_all, string='Total', digits_compute=dp.get_precision('Amount'), multi='all'),
651 'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, digits_compute=dp.get_precision('Account'), multi='all'),651 'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, digits_compute=dp.get_precision('Amount'), multi='all'),
652 'amount_return': fields.function(_amount_all, 'Returned', digits_compute=dp.get_precision('Account'), multi='all'),652 'amount_return': fields.function(_amount_all, 'Returned', digits_compute=dp.get_precision('Amount'), multi='all'),
653 'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True),653 'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True),
654 'statement_ids': fields.one2many('account.bank.statement.line', 'pos_statement_id', 'Payments', states={'draft': [('readonly', False)]}, readonly=True),654 'statement_ids': fields.one2many('account.bank.statement.line', 'pos_statement_id', 'Payments', states={'draft': [('readonly', False)]}, readonly=True),
655 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),655 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),
@@ -1246,11 +1246,11 @@
1246 'name': fields.char('Line No', size=32, required=True),1246 'name': fields.char('Line No', size=32, required=True),
1247 'notice': fields.char('Discount Notice', size=128),1247 'notice': fields.char('Discount Notice', size=128),
1248 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True, change_default=True),1248 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True, change_default=True),
1249 'price_unit': fields.float(string='Unit Price', digits_compute=dp.get_precision('Account')),1249 'price_unit': fields.float(string='Unit Price', digits_compute=dp.get_precision('Price')),
1250 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoS')),1250 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
1251 'price_subtotal': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal w/o Tax', store=True),1251 'price_subtotal': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal w/o Tax', store=True),
1252 'price_subtotal_incl': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal', store=True),1252 'price_subtotal_incl': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal', store=True),
1253 'discount': fields.float('Discount (%)', digits_compute=dp.get_precision('Account')),1253 'discount': fields.float('Discount (%)', digits_compute=dp.get_precision('Price')),
1254 'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'),1254 'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'),
1255 'create_date': fields.datetime('Creation Date', readonly=True),1255 'create_date': fields.datetime('Creation Date', readonly=True),
1256 }1256 }
12571257
=== added file 'point_of_sale/report/account_statement.rml.THIS'
--- point_of_sale/report/account_statement.rml.THIS 1970-01-01 00:00:00 +0000
+++ point_of_sale/report/account_statement.rml.THIS 2014-05-02 07:31:45 +0000
@@ -0,0 +1,285 @@
1<?xml version="1.0"?>
2<document filename="test.pdf">
3 <template title="Statement" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
4 <pageTemplate id="first">
5 <frame id="first" x1="36.0" y1="57.0" width="520" height="728"/>
6 </pageTemplate>
7 </template>
8 <stylesheet>
9 <blockTableStyle id="Standard_Outline">
10 <blockAlignment value="LEFT"/>
11 <blockValign value="TOP"/>
12 </blockTableStyle>
13 <blockTableStyle id="Table1">
14 <blockAlignment value="LEFT"/>
15 <blockValign value="TOP"/>
16 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
17 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
18 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
19 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
20 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
21 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
22 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
23 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
24 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
25 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
26 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
27 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
28 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
29 </blockTableStyle>
30 <blockTableStyle id="Table2">
31 <blockAlignment value="LEFT"/>
32 <blockValign value="TOP"/>
33 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
34 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
35 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
36 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
37 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
38 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
39 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
40 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
41 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
42 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
43 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
44 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
45 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
46 </blockTableStyle>
47 <blockTableStyle id="Table3">
48 <blockAlignment value="LEFT"/>
49 <blockValign value="TOP"/>
50 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
51 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
52 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
53 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
54 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
55 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
56 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
57 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
58 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
59 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
60 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
61 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
62 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
63 </blockTableStyle>
64 <blockTableStyle id="Table4">
65 <blockAlignment value="LEFT"/>
66 <blockValign value="TOP"/>
67 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
68 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
69 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
70 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
71 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
72 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
73 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
74 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
75 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
76 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
77 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
78 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
79 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
80 </blockTableStyle>
81 <blockTableStyle id="Table9">
82 <blockAlignment value="LEFT"/>
83 <blockValign value="TOP"/>
84 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
85 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
86 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
87 </blockTableStyle>
88 <blockTableStyle id="Table5">
89 <blockAlignment value="LEFT"/>
90 <blockValign value="TOP"/>
91 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
92 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
93 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
94 </blockTableStyle>
95 <blockTableStyle id="Table7">
96 <blockAlignment value="LEFT"/>
97 <blockValign value="TOP"/>
98 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
99 <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
100 </blockTableStyle>
101 <initialize>
102 <paraStyle name="all" alignment="justify"/>
103 </initialize>
104 <paraStyle name="Standard" fontName="Helvetica"/>
105 <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
106 <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
107 <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
108 <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
109 <paraStyle name="Index" fontName="Helvetica"/>
110 <paraStyle name="Table Contents" fontName="Helvetica"/>
111 <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
112 <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
113 <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
114 <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
115 <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
116 <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
117 <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
118 <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
119 <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
120 <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
121 <paraStyle name="Footer" fontName="Helvetica"/>
122 <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
123 <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
124 <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
125 <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
126 <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
127 <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
128 <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
129 <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
130 <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
131 <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
132 <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
133 <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
134 <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
135 <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
136 <images/>
137 </stylesheet>
138 <story>
139 <pto>
140 <pto_header>
141 <blockTable colWidths="131.0,292.0,97.0" style="Table9">
142 <tr>
143 <td>
144 <para style="terp_tblheader_Details">Name</para>
145 </td>
146 <td>
147 <para style="terp_tblheader_Details">Partner</para>
148 </td>
149 <td>
150 <para style="terp_tblheader_Details_Right">Amount </para>
151 </td>
152 </tr>
153 </blockTable>
154 </pto_header>
155 <para style="terp_default_8">[[ repeatIn(objects,'statement') ]]</para>
156 <para style="terp_header_Centre">Statement</para>
157 <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table1">
158 <tr>
159 <td>
160 <para style="terp_tblheader_General_Centre">Statement Name</para>
161 </td>
162 <td>
163 <para style="terp_tblheader_General_Centre">Journal</para>
164 </td>
165 <td>
166 <para style="terp_tblheader_General_Centre">Company</para>
167 </td>
168 <td>
169 <para style="terp_tblheader_General_Centre">User</para>
170 </td>
171 </tr>
172 </blockTable>
173 <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table2">
174 <tr>
175 <td>
176 <para style="terp_default_Centre_8">[[ statement.name ]]</para>
177 </td>
178 <td>
179 <para style="terp_default_Centre_8">[[ statement.journal_id.name ]]</para>
180 </td>
181 <td>
182 <para style="terp_default_Centre_8">[[ statement.company_id.name ]]</para>
183 </td>
184 <td>
185 <para style="terp_default_Centre_8">[[ statement.user_id.name ]]</para>
186 </td>
187 </tr>
188 </blockTable>
189 <para style="terp_default_8">
190 <font color="white"> </font>
191 </para>
192 <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table3">
193 <tr>
194 <td>
195 <para style="terp_tblheader_General_Centre">Opening Date</para>
196 </td>
197 <td>
198 <para style="terp_tblheader_General_Centre">Closing Date</para>
199 </td>
200 <td>
201 <para style="terp_tblheader_General_Centre">Starting Balance</para>
202 </td>
203 <td>
204 <para style="terp_tblheader_General_Centre">Ending Balance</para>
205 </td>
206 </tr>
207 </blockTable>
208 <blockTable colWidths="130.0,130.0,130.0,130.0" style="Table4">
209 <tr>
210 <td>
211 <para style="terp_default_Centre_8">[[ formatLang(statement.date,date=True) ]]</para>
212 </td>
213 <td>
214 <para style="terp_default_Centre_8">[[ formatLang(statement.closing_date,date_time=True)]]</para>
215 </td>
216 <td>
217 <para style="terp_default_Centre_8">[[ formatLang(statement.balance_start, dp='Amount', currency_obj = company.currency_id) ]]</para>
218 </td>
219 <td>
220 <para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real, dp='Amount', currency_obj = company.currency_id) ]]</para>
221 </td>
222 </tr>
223 </blockTable>
224 <para style="terp_default_8">
225 <font color="white"> </font>
226 </para>
227 <blockTable colWidths="131.0,292.0,97.0" style="Table9">
228 <tr>
229 <td>
230 <para style="terp_tblheader_Details">Name</para>
231 </td>
232 <td>
233 <para style="terp_tblheader_Details">Partner</para>
234 </td>
235 <td>
236 <para style="terp_tblheader_Details_Right">Amount </para>
237 </td>
238 </tr>
239 </blockTable>
240 <section>
241 <para style="terp_default_1">[[ repeatIn(statement.line_ids,'line_ids') and ' ' or removeParentNode('blockTable') ]]</para>
242 <section>
243 <para style="terp_default_1">[[ repeatIn(get_data(statement), 'line_ids')]]</para>
244 <blockTable colWidths="131.0,292.0,97.0" style="Table5">
245 <tr>
246 <td>
247 <para style="terp_default_9">[[ line_ids.name ]]</para>
248 </td>
249 <td>
250 <para style="terp_default_9">[[ line_ids.partner_id.name ]]</para>
251 </td>
252 <td>
253 <para style="terp_default_Right_9">[[ formatLang(line_ids.amount, dp='Amount', currency_obj=company.currency_id) ]]</para>
254 </td>
255 </tr>
256 </blockTable>
257 </section>
258 </section>
259 <blockTable colWidths="374.0,49.0,97.0" style="Table7">
260 <tr>
261 <td>
262 <para style="terp_default_8">
263 <font color="white"> </font>
264 </para>
265 </td>
266 <td>
267 <para style="terp_tblheader_Details">Total :</para>
268 </td>
269 <td>
270 <para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement.line_ids), dp='Amount', currency_obj = company.currency_id) ]]</para>
271 </td>
272 </tr>
273 </blockTable>
274 <para style="terp_default_8">
275 <font color="white"> </font>
276 </para>
277 <para style="terp_default_8">
278 <font color="white"> </font>
279 </para>
280 <para style="terp_default_8">
281 <font color="white"> </font>
282 </para>
283 </pto>
284 </story>
285</document>
0286
=== added file 'point_of_sale/report/pos_details.rml.THIS'
--- point_of_sale/report/pos_details.rml.THIS 1970-01-01 00:00:00 +0000
+++ point_of_sale/report/pos_details.rml.THIS 2014-05-02 07:31:45 +0000
@@ -0,0 +1,400 @@
1<?xml version="1.0"?>
2<document filename="test.pdf">
3 <template title="Details of Sales" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
4 <pageTemplate id="first">
5 <frame id="first" x1="28.0" y1="57.0" width="511" height="728"/>
6 </pageTemplate>
7 </template>
8 <stylesheet>
9 <blockTableStyle id="Standard_Outline">
10 <blockAlignment value="LEFT"/>
11 <blockValign value="TOP"/>
12 </blockTableStyle>
13 <blockTableStyle id="Table1">
14 <blockAlignment value="LEFT"/>
15 <blockValign value="TOP"/>
16 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
17 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
18 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
19 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
20 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
21 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
22 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
23 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
24 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
25 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
26 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
27 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
28 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
29 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
30 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
31 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
32 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
33 </blockTableStyle>
34 <blockTableStyle id="Table2">
35 <blockAlignment value="LEFT"/>
36 <blockValign value="TOP"/>
37 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
38 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
39 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
40 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
41 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
42 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
43 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
44 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
45 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
46 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
47 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
48 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
49 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
50 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
51 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="4,0" stop="4,-1"/>
52 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
53 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
54 </blockTableStyle>
55 <blockTableStyle id="Table4">
56 <blockAlignment value="LEFT"/>
57 <blockValign value="TOP"/>
58 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
59 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
60 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
61 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
62 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
63 <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
64 <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
65 </blockTableStyle>
66 <blockTableStyle id="Table6">
67 <blockAlignment value="LEFT"/>
68 <blockValign value="TOP"/>
69 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
70 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
71 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
72 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
73 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
74 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
75 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
76 </blockTableStyle>
77 <blockTableStyle id="Table3">
78 <blockAlignment value="LEFT"/>
79 <blockValign value="TOP"/>
80 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
81 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
82 </blockTableStyle>
83 <blockTableStyle id="Table5">
84 <blockAlignment value="LEFT"/>
85 <blockValign value="TOP"/>
86 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
87 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
88 </blockTableStyle>
89 <blockTableStyle id="Table9">
90 <blockAlignment value="LEFT"/>
91 <blockValign value="TOP"/>
92 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
93 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
94 </blockTableStyle>
95 <blockTableStyle id="Table11">
96 <blockAlignment value="LEFT"/>
97 <blockValign value="TOP"/>
98 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
99 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
100 </blockTableStyle>
101 <blockTableStyle id="Table8">
102 <blockAlignment value="LEFT"/>
103 <blockValign value="TOP"/>
104 </blockTableStyle>
105 <blockTableStyle id="Table7">
106 <blockAlignment value="LEFT"/>
107 <blockValign value="TOP"/>
108 <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
109 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
110 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,1" stop="0,1"/>
111 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,1" stop="1,1"/>
112 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
113 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,2" stop="0,2"/>
114 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
115 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,2"/>
116 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
117 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,3" stop="0,3"/>
118 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
119 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,3" stop="1,3"/>
120 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
121 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,4" stop="0,4"/>
122 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
123 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,4" stop="1,4"/>
124 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
125 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,5" stop="0,5"/>
126 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
127 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,5" stop="1,5"/>
128 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
129 </blockTableStyle>
130 <initialize>
131 <paraStyle name="all" alignment="justify"/>
132 </initialize>
133 <paraStyle name="Standard" fontName="Helvetica"/>
134 <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
135 <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
136 <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
137 <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
138 <paraStyle name="Index" fontName="Helvetica"/>
139 <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
140 <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
141 <paraStyle name="Table Contents" fontName="Helvetica"/>
142 <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
143 <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
144 <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
145 <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
146 <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
147 <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
148 <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
149 <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
150 <paraStyle name="Footer" fontName="Helvetica"/>
151 <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
152 <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
153 <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
154 <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
155 <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
156 <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
157 <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
158 <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
159 <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
160 <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
161 <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
162 <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
163 <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
164 <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
165 <images/>
166 </stylesheet>
167 <story>
168 <para style="terp_default_8">
169 <font color="white"> </font>
170 </para>
171 <para style="terp_header_Centre">Details of Sales</para>
172 <para style="terp_default_8">
173 <font color="white"> </font>
174 </para>
175 <blockTable colWidths="104.0,104.0,133.0,85.0,86.0" style="Table1">
176 <tr>
177 <td>
178 <para style="terp_tblheader_General_Centre">Company</para>
179 </td>
180 <td>
181 <para style="terp_tblheader_General_Centre">Users</para>
182 </td>
183 <td>
184 <para style="terp_tblheader_General_Centre">Print Date</para>
185 </td>
186 <td>
187 <para style="terp_tblheader_General_Centre">Start Period</para>
188 </td>
189 <td>
190 <para style="terp_tblheader_General_Centre">End Period</para>
191 </td>
192 </tr>
193 </blockTable>
194 <blockTable colWidths="104.0,104.0,133.0,85.0,85.0" style="Table2">
195 <tr>
196 <td>
197 <para style="terp_default_Centre_8">[[ company.name ]]</para>
198 </td>
199 <td>
200 <para style="terp_default_Centre_8">[[ get_user_names(data['form']['user_ids']) or 'All' ]]</para>
201 </td>
202 <td>
203 <para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</para>
204 </td>
205 <td>
206 <para style="terp_default_Centre_8">[[ formatLang(data['form']['date_start'],date=True) ]] </para>
207 </td>
208 <td>
209 <para style="terp_default_Centre_8">[[ formatLang(data['form']['date_end'],date=True) ]] </para>
210 </td>
211 </tr>
212 </blockTable>
213 <para style="terp_default_8">
214 <font color="white"> </font>
215 </para>
216 <blockTable colWidths="108.0,54.0,159.0,54.0,75.0,30.0,69.0" style="Table4">
217 <tr>
218 <td>
219 <para style="terp_tblheader_Details">Date</para>
220 </td>
221 <td>
222 <para style="terp_tblheader_Details">Order</para>
223 </td>
224 <td>
225 <para style="terp_tblheader_Details">Product</para>
226 </td>
227 <td>
228 <para style="terp_tblheader_Details_Right">Price </para>
229 </td>
230 <td>
231 <para style="terp_tblheader_Details_Centre">Qty</para>
232 </td>
233 <td>
234 <para style="terp_tblheader_Details_Right">Disc(%) </para>
235 </td>
236 <td>
237 <para style="terp_tblheader_Details_Centre">Invoiced </para>
238 </td>
239 </tr>
240 </blockTable>
241 <section>
242 <para style="terp_default_1">[[ repeatIn(pos_sales_details(data['form']), 'line_ids') ]]</para>
243 <blockTable colWidths="108.0,54.0,159.0,54.0,75.0,30.0,69.0" style="Table6">
244 <tr>
245 <td>
246 <para style="terp_default_9">[[ formatLang(line_ids['date_order'],date_time = True) ]]</para>
247 </td>
248 <td>
249 <para style="terp_default_9">[[ line_ids['pos_name'] ]]</para>
250 </td>
251 <td>
252 <para style="terp_default_9">[ [[ line_ids['code'] ]] ] [[ line_ids['name'] ]]</para>
253 </td>
254 <td>
255 <para style="terp_default_Right_9">[[ formatLang(line_ids['price_unit'], dp='Sale Price', currency_obj = company.currency_id) ]]</para>
256 </td>
257 <td>
258 <para style="terp_default_Centre_9">[[ formatLang(line_ids['qty']) ]] [[ line_ids['uom'] ]]</para>
259 </td>
260 <td>
261 <para style="terp_default_Centre_9">[[ formatLang(line_ids['discount'], dp='Sale Price') ]]</para>
262 </td>
263 <td>
264 <para style="terp_default_Centre_9">[[ getinvoice(line_ids['invoice_id']) or removeParentNode('font') ]]</para>
265 </td>
266 </tr>
267 </blockTable>
268 </section>
269 <para style="terp_default_8">
270 <font color="white"> </font>
271 </para>
272 <blockTable colWidths="256.0,256.0" style="Table3">
273 <tr>
274 <td>
275 <para style="terp_tblheader_Details">Taxes</para>
276 </td>
277 <td>
278 <para style="terp_default_8">
279 <font color="white"> </font>
280 </para>
281 </td>
282 </tr>
283 </blockTable>
284 <section>
285 <para style="terp_default_1">[[ repeatIn(gettaxamount(data['form']), 'p')]]</para>
286 <blockTable colWidths="256.0,256.0" style="Table5">
287 <tr>
288 <td>
289 <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para>
290 </td>
291 <td>
292 <para style="terp_default_Right_9_Bold">[[ formatLang(p['amount'], currency_obj = company.currency_id) or removeParentNode('tr') ]]</para>
293 </td>
294 </tr>
295 </blockTable>
296 <para style="terp_default_1">
297 <font color="white"> </font>
298 </para>
299 </section>
300 <para style="terp_default_8">
301 <font color="white"> </font>
302 </para>
303 <blockTable colWidths="257.0,255.0" style="Table9">
304 <tr>
305 <td>
306 <para style="terp_tblheader_Details">Payment</para>
307 </td>
308 <td>
309 <para style="terp_default_8">
310 <font color="white"> </font>
311 </para>
312 </td>
313 </tr>
314 </blockTable>
315 <section>
316 <para style="terp_default_1">[[ repeatIn(getpayments(data['form']), 'p') ]]</para>
317 <blockTable colWidths="255.0,255.0" style="Table11">
318 <tr>
319 <td>
320 <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para>
321 </td>
322 <td>
323 <para style="terp_default_Right_9_Bold">[[ formatLang(p['sum'], dp='Amount', currency_obj = company.currency_id) or removeParentNode('tr') ]]</para>
324 </td>
325 </tr>
326 </blockTable>
327 <para style="terp_default_1">
328 <font color="white"> </font>
329 </para>
330 </section>
331 <para style="terp_default_8">
332 <font color="white"> </font>
333 </para>
334 <blockTable colWidths="257.0,255.0" style="Table8">
335 <tr>
336 <td>
337 <para style="terp_tblheader_Details">Summary</para>
338 </td>
339 <td>
340 <para style="terp_default_9">
341 <font color="white"> </font>
342 </para>
343 </td>
344 </tr>
345 </blockTable>
346 <blockTable colWidths="257.0,254.0" style="Table7">
347 <tr>
348 <td>
349 <para style="terp_default_Bold_9">Sales total(Revenue)</para>
350 </td>
351 <td>
352 <para style="terp_default_Right_9_Bold">[[ formatLang(getsalestotal2(), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
353 </td>
354 </tr>
355 <tr>
356 <td>
357 <para style="terp_default_Bold_9">Qty of product</para>
358 </td>
359 <td>
360 <para style="terp_default_Right_9_Bold">[[ formatLang(getqtytotal2()) ]]</para>
361 </td>
362 </tr>
363 <tr>
364 <td>
365 <para style="terp_default_Bold_9">Total invoiced</para>
366 </td>
367 <td>
368 <para style="terp_default_Right_9_Bold">[[ formatLang(getsuminvoice2(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
369 </td>
370 </tr>
371 <tr>
372 <td>
373 <para style="terp_default_Bold_9">Total discount</para>
374 </td>
375 <td>
376 <para style="terp_default_Right_9_Bold">[[ formatLang(getsumdisc(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
377 </td>
378 </tr>
379 <tr>
380 <td>
381 <para style="terp_default_Bold_9">Total paid</para>
382 </td>
383 <td>
384 <para style="terp_default_Right_9_Bold">[[ formatLang(getpaidtotal2(), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
385 </td>
386 </tr>
387 <tr>
388 <td>
389 <para style="terp_default_Bold_9">Total of the day</para>
390 </td>
391 <td>
392 <para style="terp_default_Right_9_Bold">[[ formatLang(gettotalofthaday(data['form']), dp='Sale Price', currency_obj = company.currency_id) ]]</para>
393 </td>
394 </tr>
395 </blockTable>
396 <para style="terp_default_8">
397 <font color="white"> </font>
398 </para>
399 </story>
400</document>
0401
=== modified file 'point_of_sale/static/src/js/models.js'
--- point_of_sale/static/src/js/models.js 2014-03-20 16:45:30 +0000
+++ point_of_sale/static/src/js/models.js 2014-05-02 07:31:45 +0000
@@ -204,7 +204,7 @@
204 self.currency = currencies[0];204 self.currency = currencies[0];
205205
206 /*206 /*
207 return (new instance.web.Model('decimal.precision')).call('get_precision',[['Account']]);207 return (new instance.web.Model('decimal.precision')).call('get_precision',[['Amount']]);
208 }).then(function(precision){208 }).then(function(precision){
209 self.accounting_precision = precision;209 self.accounting_precision = precision;
210 console.log("PRECISION",precision);210 console.log("PRECISION",precision);
211211
=== modified file 'procurement/procurement.py'
--- procurement/procurement.py 2014-04-24 12:35:38 +0000
+++ procurement/procurement.py 2014-05-02 07:31:45 +0000
@@ -92,7 +92,7 @@
92 'date_planned': fields.datetime('Scheduled date', required=True, select=True),92 'date_planned': fields.datetime('Scheduled date', required=True, select=True),
93 'date_close': fields.datetime('Date Closed'),93 'date_close': fields.datetime('Date Closed'),
94 'product_id': fields.many2one('product.product', 'Product', required=True, states={'draft':[('readonly',False)]}, readonly=True),94 'product_id': fields.many2one('product.product', 'Product', required=True, states={'draft':[('readonly',False)]}, readonly=True),
95 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, states={'draft':[('readonly',False)]}, readonly=True),95 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
96 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, states={'draft':[('readonly',False)]}, readonly=True),96 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, states={'draft':[('readonly',False)]}, readonly=True),
97 'product_uos_qty': fields.float('UoS Quantity', states={'draft':[('readonly',False)]}, readonly=True),97 'product_uos_qty': fields.float('UoS Quantity', states={'draft':[('readonly',False)]}, readonly=True),
98 'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True),98 'product_uos': fields.many2one('product.uom', 'Product UoS', states={'draft':[('readonly',False)]}, readonly=True),
9999
=== modified file 'product/pricelist.py'
--- product/pricelist.py 2014-03-17 12:01:26 +0000
+++ product/pricelist.py 2014-05-02 07:31:45 +0000
@@ -432,18 +432,18 @@
432 'base_pricelist_id': fields.many2one('product.pricelist', 'Other Pricelist'),432 'base_pricelist_id': fields.many2one('product.pricelist', 'Other Pricelist'),
433433
434 'price_surcharge': fields.float('Price Surcharge',434 'price_surcharge': fields.float('Price Surcharge',
435 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.'),435 digits_compute= dp.get_precision('Price'), help='Specify the fixed amount to add or substract(if negative) to the amount calculated with the discount.'),
436 'price_discount': fields.float('Price Discount', digits=(16,4)),436 'price_discount': fields.float('Price Discount', digits_compute=dp.get_precision('Price')),
437 'price_round': fields.float('Price Rounding',437 'price_round': fields.float('Price Rounding',
438 digits_compute= dp.get_precision('Product Price'),438 digits_compute= dp.get_precision('Price'),
439 help="Sets the price so that it is a multiple of this value.\n" \439 help="Sets the price so that it is a multiple of this value.\n" \
440 "Rounding is applied after the discount and before the surcharge.\n" \440 "Rounding is applied after the discount and before the surcharge.\n" \
441 "To have prices that end in 9.99, set rounding 10, surcharge -0.01" \441 "To have prices that end in 9.99, set rounding 10, surcharge -0.01" \
442 ),442 ),
443 'price_min_margin': fields.float('Min. Price Margin',443 'price_min_margin': fields.float('Min. Price Margin',
444 digits_compute= dp.get_precision('Product Price'), help='Specify the minimum amount of margin over the base price.'),444 digits_compute= dp.get_precision('Price'), help='Specify the minimum amount of margin over the base price.'),
445 'price_max_margin': fields.float('Max. Price Margin',445 'price_max_margin': fields.float('Max. Price Margin',
446 digits_compute= dp.get_precision('Product Price'), help='Specify the maximum amount of margin over the base price.'),446 digits_compute= dp.get_precision('Price'), help='Specify the maximum amount of margin over the base price.'),
447 'company_id': fields.related('price_version_id','company_id',type='many2one',447 'company_id': fields.related('price_version_id','company_id',type='many2one',
448 readonly=True, relation='res.company', string='Company', store=True)448 readonly=True, relation='res.company', string='Company', store=True)
449 }449 }
450450
=== modified file 'product/product.py'
--- product/product.py 2014-04-25 12:59:26 +0000
+++ product/product.py 2014-05-02 07:31:45 +0000
@@ -139,7 +139,7 @@
139 string='Bigger Ratio',139 string='Bigger Ratio',
140 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category:\n'\140 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category:\n'\
141 '1 * (this unit) = ratio * (reference unit)', required=True),141 '1 * (this unit) = ratio * (reference unit)', required=True),
142 'rounding': fields.float('Rounding Precision', digits_compute=dp.get_precision('Product Unit of Measure'), required=True,142 'rounding': fields.float('Rounding Precision', digits_compute=dp.get_precision('Quantity'), required=True,
143 help="The computed quantity will be a multiple of this value. "\143 help="The computed quantity will be a multiple of this value. "\
144 "Use 1.0 for a Unit of Measure that cannot be further split, such as a piece."),144 "Use 1.0 for a Unit of Measure that cannot be further split, such as a piece."),
145 'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."),145 'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."),
@@ -371,11 +371,11 @@
371 'rental': fields.boolean('Can be Rent'),371 'rental': fields.boolean('Can be Rent'),
372 'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),372 'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
373 '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)."),373 '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)."),
374 '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."),374 '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."),
375 '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"),375 '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"),
376 'volume': fields.float('Volume', help="The volume in m3."),376 'volume': fields.float('Volume', help="The volume in m3."),
377 'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."),377 'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Weight'), help="The gross weight in Kg."),
378 'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."),378 'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Weight'), help="The net weight in Kg."),
379 'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True,379 'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True,
380 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."),380 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."),
381 'warranty': fields.float('Warranty'),381 'warranty': fields.float('Warranty'),
@@ -389,7 +389,7 @@
389 '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."),389 '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."),
390 'uos_id' : fields.many2one('product.uom', 'Unit of Sale',390 'uos_id' : fields.many2one('product.uom', 'Unit of Sale',
391 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.'),391 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.'),
392 'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Product UoS'),392 'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Quantity'),
393 help='Coefficient to convert default Unit of Measure to Unit of Sale\n'393 help='Coefficient to convert default Unit of Measure to Unit of Sale\n'
394 ' uos = uom * coeff'),394 ' uos = uom * coeff'),
395 'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'),395 'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'),
@@ -646,8 +646,8 @@
646 'virtual_available': fields.function(_product_virtual_available, type='float', string='Quantity Available'),646 'virtual_available': fields.function(_product_virtual_available, type='float', string='Quantity Available'),
647 'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'),647 'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'),
648 'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'),648 'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'),
649 'price': fields.function(_product_price, fnct_inv=_save_product_lst_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')),649 'price': fields.function(_product_price, fnct_inv=_save_product_lst_price, type='float', string='Price', digits_compute=dp.get_precision('Price')),
650 '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')),650 'lst_price' : fields.function(_product_lst_price, fnct_inv=_save_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Price')),
651 'code': fields.function(_product_code, type='char', string='Internal Reference'),651 'code': fields.function(_product_code, type='char', string='Internal Reference'),
652 'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),652 'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),
653 'default_code' : fields.char('Internal Reference', select=True),653 'default_code' : fields.char('Internal Reference', select=True),
@@ -658,8 +658,8 @@
658 _is_only_child, type='boolean', string='Sole child of the parent template'),658 _is_only_child, type='boolean', string='Sole child of the parent template'),
659 'ean13': fields.char('EAN13 Barcode', size=13, help="International Article Number used for product identification."),659 'ean13': fields.char('EAN13 Barcode', size=13, help="International Article Number used for product identification."),
660 '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."),660 '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."),
661 '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."),661 '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."),
662 '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."),662 '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."),
663 'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),663 'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
664 'name_template': fields.related('product_tmpl_id', 'name', string="Template Name", type='char', store={664 'name_template': fields.related('product_tmpl_id', 'name', string="Template Name", type='char', store={
665 'product.template': (_get_name_template_ids, ['name'], 10),665 'product.template': (_get_name_template_ids, ['name'], 10),
@@ -874,7 +874,7 @@
874 _columns = {874 _columns = {
875 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of packaging."),875 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of packaging."),
876 'name' : fields.text('Description'),876 'name' : fields.text('Description'),
877 'qty' : fields.float('Quantity by Package',877 'qty' : fields.float('Quantity by Package', digits_compute=dp.get_precision('Quantity'),
878 help="The total number of products you can put by pallet or box."),878 help="The total number of products you can put by pallet or box."),
879 'ul' : fields.many2one('product.ul', 'Type of Package', required=True),879 'ul' : fields.many2one('product.ul', 'Type of Package', required=True),
880 'ul_qty' : fields.integer('Package by layer', help='The number of packages by layer'),880 'ul_qty' : fields.integer('Package by layer', help='The number of packages by layer'),
@@ -883,9 +883,9 @@
883 'product_id' : fields.many2one('product.product', 'Product', select=1, ondelete='cascade', required=True),883 'product_id' : fields.many2one('product.product', 'Product', select=1, ondelete='cascade', required=True),
884 'ean' : fields.char('EAN', size=14, help="The EAN code of the package unit."),884 'ean' : fields.char('EAN', size=14, help="The EAN code of the package unit."),
885 'code' : fields.char('Code', help="The code of the transport unit."),885 'code' : fields.char('Code', help="The code of the transport unit."),
886 'weight': fields.float('Total Package Weight',886 'weight': fields.float('Total Package Weight', digits_compute=dp.get_precision('Weight'),
887 help='The weight of a full package, pallet or box.'),887 help='The weight of a full package, pallet or box.'),
888 'weight_ul': fields.float('Empty Package Weight'),888 'weight_ul': fields.float('Empty Package Weight', digits_compute=dp.get_precision('Weight')),
889 'height': fields.float('Height', help='The height of the package'),889 'height': fields.float('Height', help='The height of the package'),
890 'width': fields.float('Width', help='The width of the package'),890 'width': fields.float('Width', help='The width of the package'),
891 'length': fields.float('Length', help='The length of the package'),891 'length': fields.float('Length', help='The length of the package'),
@@ -948,8 +948,8 @@
948 '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."),948 '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."),
949 'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."),949 'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."),
950 '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."),950 '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."),
951 '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."),951 '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."),
952 '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."),952 '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."),
953 'product_tmpl_id' : fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade', select=True, oldname='product_id'),953 'product_tmpl_id' : fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade', select=True, oldname='product_id'),
954 '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."),954 '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."),
955 'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'),955 'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'),
@@ -1009,7 +1009,7 @@
1009 'name': fields.char('Description'),1009 'name': fields.char('Description'),
1010 'suppinfo_id': fields.many2one('product.supplierinfo', 'Partner Information', required=True, ondelete='cascade'),1010 'suppinfo_id': fields.many2one('product.supplierinfo', 'Partner Information', required=True, ondelete='cascade'),
1011 '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."),1011 '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."),
1012 '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"),1012 '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"),
1013 }1013 }
1014 _order = 'min_quantity asc'1014 _order = 'min_quantity asc'
10151015
@@ -1017,7 +1017,7 @@
1017 _inherit = 'res.currency'1017 _inherit = 'res.currency'
10181018
1019 def _check_main_currency_rounding(self, cr, uid, ids, context=None):1019 def _check_main_currency_rounding(self, cr, uid, ids, context=None):
1020 cr.execute('SELECT digits FROM decimal_precision WHERE name like %s',('Account',))1020 cr.execute('SELECT digits FROM decimal_precision WHERE name like %s',('Amount',))
1021 digits = cr.fetchone()1021 digits = cr.fetchone()
1022 if digits and len(digits):1022 if digits and len(digits):
1023 digits = digits[0]1023 digits = digits[0]
@@ -1036,7 +1036,7 @@
1036 _inherit = 'decimal.precision'1036 _inherit = 'decimal.precision'
10371037
1038 def _check_main_currency_rounding(self, cr, uid, ids, context=None):1038 def _check_main_currency_rounding(self, cr, uid, ids, context=None):
1039 cr.execute('SELECT id, digits FROM decimal_precision WHERE name like %s',('Account',))1039 cr.execute('SELECT id, digits FROM decimal_precision WHERE name like %s',('Amount',))
1040 res = cr.fetchone()1040 res = cr.fetchone()
1041 if res and len(res):1041 if res and len(res):
1042 account_precision_id, digits = res1042 account_precision_id, digits = res
10431043
=== modified file 'product/product_data.xml'
--- product/product_data.xml 2014-04-29 10:19:32 +0000
+++ product/product_data.xml 2014-05-02 07:31:45 +0000
@@ -241,6 +241,22 @@
241 <field eval="'product.pricelist,'+str(ref('list0'))" name="value"/>241 <field eval="'product.pricelist,'+str(ref('list0'))" name="value"/>
242 </record>242 </record>
243243
244 <record forcecreate="True" id="decimal_amount" model="decimal.precision">
245 <field name="name">Amount</field>
246 <field name="digits">2</field>
247 </record>
248 <record forcecreate="True" id="decimal_weight" model="decimal.precision">
249 <field name="name">Weight</field>
250 <field name="digits">2</field>
251 </record>
252 <record forcecreate="True" id="decimal_qty" model="decimal.precision">
253 <field name="name">Quantity</field>
254 <field name="digits" eval="3"/>
255 </record>
256 <record forcecreate="True" id="decimal_percentage" model="decimal.precision">
257 <field name="name">Percentage</field>
258 <field name="digits" eval="3"/>
259 </record>
244260
245 <!--261 <!--
246 Product262 Product
247263
=== modified file 'product/report/product_pricelist.py'
--- product/report/product_pricelist.py 2014-04-14 15:52:12 +0000
+++ product/report/product_pricelist.py 2014-05-02 07:31:45 +0000
@@ -102,7 +102,7 @@
102 return res102 return res
103103
104 def _get_price(self, pricelist_id, product_id, qty):104 def _get_price(self, pricelist_id, product_id, qty):
105 sale_price_digits = self.get_digits(dp='Product Price')105 sale_price_digits = self.get_digits(dp='Price')
106 pricelist = self.pool.get('product.pricelist').browse(self.cr, self.uid, [pricelist_id], context=self.localcontext)[0]106 pricelist = self.pool.get('product.pricelist').browse(self.cr, self.uid, [pricelist_id], context=self.localcontext)[0]
107 price_dict = self.pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext)107 price_dict = self.pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext)
108 if price_dict[pricelist_id]:108 if price_dict[pricelist_id]:
109109
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py 2014-04-30 14:01:03 +0000
+++ purchase/purchase.py 2014-05-02 07:31:45 +0000
@@ -205,15 +205,15 @@
205 'purchase.order.line': (_get_order, ['date_planned'], 10),205 'purchase.order.line': (_get_order, ['date_planned'], 10),
206 }206 }
207 ),207 ),
208 'amount_untaxed': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Untaxed Amount',208 'amount_untaxed': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Untaxed Amount',
209 store={209 store={
210 'purchase.order.line': (_get_order, None, 10),210 'purchase.order.line': (_get_order, None, 10),
211 }, multi="sums", help="The amount without tax", track_visibility='always'),211 }, multi="sums", help="The amount without tax", track_visibility='always'),
212 'amount_tax': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Taxes',212 'amount_tax': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Taxes',
213 store={213 store={
214 'purchase.order.line': (_get_order, None, 10),214 'purchase.order.line': (_get_order, None, 10),
215 }, multi="sums", help="The tax amount"),215 }, multi="sums", help="The tax amount"),
216 'amount_total': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Total',216 'amount_total': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Total',
217 store={217 store={
218 'purchase.order.line': (_get_order, None, 10),218 'purchase.order.line': (_get_order, None, 10),
219 }, multi="sums",help="The total amount"),219 }, multi="sums",help="The total amount"),
@@ -877,15 +877,15 @@
877877
878 _columns = {878 _columns = {
879 'name': fields.text('Description', required=True),879 'name': fields.text('Description', required=True),
880 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),880 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
881 'date_planned': fields.date('Scheduled Date', required=True, select=True),881 'date_planned': fields.date('Scheduled Date', required=True, select=True),
882 'taxes_id': fields.many2many('account.tax', 'purchase_order_taxe', 'ord_id', 'tax_id', 'Taxes'),882 'taxes_id': fields.many2many('account.tax', 'purchase_order_taxe', 'ord_id', 'tax_id', 'Taxes'),
883 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),883 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
884 'product_id': fields.many2one('product.product', 'Product', domain=[('purchase_ok','=',True)], change_default=True),884 'product_id': fields.many2one('product.product', 'Product', domain=[('purchase_ok','=',True)], change_default=True),
885 'move_ids': fields.one2many('stock.move', 'purchase_line_id', 'Reservation', readonly=True, ondelete='set null'),885 'move_ids': fields.one2many('stock.move', 'purchase_line_id', 'Reservation', readonly=True, ondelete='set null'),
886 'move_dest_id': fields.many2one('stock.move', 'Reservation Destination', ondelete='set null'),886 'move_dest_id': fields.many2one('stock.move', 'Reservation Destination', ondelete='set null'),
887 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),887 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
888 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),888 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Amount')),
889 'order_id': fields.many2one('purchase.order', 'Order Reference', select=True, required=True, ondelete='cascade'),889 'order_id': fields.many2one('purchase.order', 'Order Reference', select=True, required=True, ondelete='cascade'),
890 'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',),890 'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',),
891 'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),891 'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
892892
=== modified file 'purchase_requisition/purchase_requisition.py'
--- purchase_requisition/purchase_requisition.py 2014-03-25 11:29:09 +0000
+++ purchase_requisition/purchase_requisition.py 2014-05-02 07:31:45 +0000
@@ -173,7 +173,7 @@
173 _columns = {173 _columns = {
174 'product_id': fields.many2one('product.product', 'Product' ),174 'product_id': fields.many2one('product.product', 'Product' ),
175 'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure'),175 'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure'),
176 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),176 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
177 'requisition_id' : fields.many2one('purchase.requisition','Purchase Requisition', ondelete='cascade'),177 'requisition_id' : fields.many2one('purchase.requisition','Purchase Requisition', ondelete='cascade'),
178 'company_id': fields.related('requisition_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),178 'company_id': fields.related('requisition_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
179 }179 }
180180
=== modified file 'report_intrastat/report_intrastat.py'
--- report_intrastat/report_intrastat.py 2013-10-27 12:31:04 +0000
+++ report_intrastat/report_intrastat.py 2014-05-02 07:31:45 +0000
@@ -67,7 +67,7 @@
67 'code': fields.char('Country code', size=2, readonly=True),67 'code': fields.char('Country code', size=2, readonly=True),
68 'intrastat_id': fields.many2one('report.intrastat.code', 'Intrastat code', readonly=True),68 'intrastat_id': fields.many2one('report.intrastat.code', 'Intrastat code', readonly=True),
69 'weight': fields.float('Weight', readonly=True),69 'weight': fields.float('Weight', readonly=True),
70 'value': fields.float('Value', readonly=True, digits_compute=dp.get_precision('Account')),70 'value': fields.float('Value', readonly=True, digits_compute=dp.get_precision('Amount')),
71 'type': fields.selection([('import', 'Import'), ('export', 'Export')], 'Type'),71 'type': fields.selection([('import', 'Import'), ('export', 'Export')], 'Type'),
72 'currency_id': fields.many2one('res.currency', "Currency", readonly=True),72 'currency_id': fields.many2one('res.currency', "Currency", readonly=True),
73 }73 }
7474
=== modified file 'sale/sale.py'
--- sale/sale.py 2014-04-14 09:03:36 +0000
+++ sale/sale.py 2014-05-02 07:31:45 +0000
@@ -203,19 +203,19 @@
203 fnct_search=_invoiced_search, type='boolean', help="It indicates that sales order has at least one invoice."),203 fnct_search=_invoiced_search, type='boolean', help="It indicates that sales order has at least one invoice."),
204 'note': fields.text('Terms and conditions'),204 'note': fields.text('Terms and conditions'),
205205
206 'amount_untaxed': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Account'), string='Untaxed Amount',206 'amount_untaxed': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Amount'), string='Untaxed Amount',
207 store={207 store={
208 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),208 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
209 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),209 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
210 },210 },
211 multi='sums', help="The amount without tax.", track_visibility='always'),211 multi='sums', help="The amount without tax.", track_visibility='always'),
212 'amount_tax': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Account'), string='Taxes',212 'amount_tax': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Amount'), string='Taxes',
213 store={213 store={
214 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),214 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
215 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),215 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
216 },216 },
217 multi='sums', help="The tax amount."),217 multi='sums', help="The tax amount."),
218 'amount_total': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Account'), string='Total',218 'amount_total': fields.function(_amount_all_wrapper, digits_compute=dp.get_precision('Amount'), string='Total',
219 store={219 store={
220 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),220 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
221 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),221 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
@@ -680,17 +680,17 @@
680 store={680 store={
681 'account.invoice': (_order_lines_from_invoice, ['state'], 10),681 'account.invoice': (_order_lines_from_invoice, ['state'], 10),
682 'sale.order.line': (lambda self,cr,uid,ids,ctx=None: ids, ['invoice_lines'], 10)}),682 'sale.order.line': (lambda self,cr,uid,ids,ctx=None: ids, ['invoice_lines'], 10)}),
683 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price'), readonly=True, states={'draft': [('readonly', False)]}),683 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price'), readonly=True, states={'draft': [('readonly', False)]}),
684 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},684 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},
685 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."),685 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."),
686 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),686 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Amount')),
687 'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft': [('readonly', False)]}),687 'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft': [('readonly', False)]}),
688 'address_allotment_id': fields.many2one('res.partner', 'Allotment Partner',help="A partner to whom the particular product needs to be allotted."),688 'address_allotment_id': fields.many2one('res.partner', 'Allotment Partner',help="A partner to whom the particular product needs to be allotted."),
689 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product UoS'), required=True, readonly=True, states={'draft': [('readonly', False)]}),689 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True, readonly=True, states={'draft': [('readonly', False)]}),
690 'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft': [('readonly', False)]}),690 'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft': [('readonly', False)]}),
691 'product_uos_qty': fields.float('Quantity (UoS)' ,digits_compute= dp.get_precision('Product UoS'), readonly=True, states={'draft': [('readonly', False)]}),691 'product_uos_qty': fields.float('Quantity (UoS)' ,digits_compute= dp.get_precision('Quantity'), readonly=True, states={'draft': [('readonly', False)]}),
692 'product_uos': fields.many2one('product.uom', 'Product UoS'),692 'product_uos': fields.many2one('product.uom', 'Product UoS'),
693 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount'), readonly=True, states={'draft': [('readonly', False)]}),693 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price'), readonly=True, states={'draft': [('readonly', False)]}),
694 'th_weight': fields.float('Weight', readonly=True, states={'draft': [('readonly', False)]}),694 'th_weight': fields.float('Weight', readonly=True, states={'draft': [('readonly', False)]}),
695 'state': fields.selection([('cancel', 'Cancelled'),('draft', 'Draft'),('confirmed', 'Confirmed'),('exception', 'Exception'),('done', 'Done')], 'Status', required=True, readonly=True,695 'state': fields.selection([('cancel', 'Cancelled'),('draft', 'Draft'),('confirmed', 'Confirmed'),('exception', 'Exception'),('done', 'Done')], 'Status', required=True, readonly=True,
696 help='* The \'Draft\' status is set when the related sales order in draft status. \696 help='* The \'Draft\' status is set when the related sales order in draft status. \
@@ -758,7 +758,7 @@
758 pu = 0.0758 pu = 0.0
759 if uosqty:759 if uosqty:
760 pu = round(line.price_unit * line.product_uom_qty / uosqty,760 pu = round(line.price_unit * line.product_uom_qty / uosqty,
761 self.pool.get('decimal.precision').precision_get(cr, uid, 'Product Price'))761 self.pool.get('decimal.precision').precision_get(cr, uid, 'Price'))
762 fpos = line.order_id.fiscal_position or False762 fpos = line.order_id.fiscal_position or False
763 account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id)763 account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id)
764 if not account_id:764 if not account_id:
765765
=== modified file 'sale/wizard/sale_make_invoice_advance.py'
--- sale/wizard/sale_make_invoice_advance.py 2013-10-27 12:31:04 +0000
+++ sale/wizard/sale_make_invoice_advance.py 2014-05-02 07:31:45 +0000
@@ -39,7 +39,7 @@
39 'product_id': fields.many2one('product.product', 'Advance Product',39 'product_id': fields.many2one('product.product', 'Advance Product',
40 help="""Select a product of type service which is called 'Advance Product'.40 help="""Select a product of type service which is called 'Advance Product'.
41 You may have to create it and set it as a default value on this field."""),41 You may have to create it and set it as a default value on this field."""),
42 'amount': fields.float('Advance Amount', digits_compute= dp.get_precision('Account'),42 'amount': fields.float('Advance Amount', digits_compute= dp.get_precision('Amount'),
43 help="The amount to be invoiced in advance."),43 help="The amount to be invoiced in advance."),
44 }44 }
4545
4646
=== modified file 'stock/product.py'
--- stock/product.py 2014-02-12 17:51:41 +0000
+++ stock/product.py 2014-05-02 07:31:45 +0000
@@ -357,7 +357,7 @@
357 'reception_count': fields.function(_stock_move_count, string="Reception", type='integer', multi='pickings'),357 'reception_count': fields.function(_stock_move_count, string="Reception", type='integer', multi='pickings'),
358 'delivery_count': fields.function(_stock_move_count, string="Delivery", type='integer', multi='pickings'),358 'delivery_count': fields.function(_stock_move_count, string="Delivery", type='integer', multi='pickings'),
359 'qty_available': fields.function(_product_available, multi='qty_available',359 'qty_available': fields.function(_product_available, multi='qty_available',
360 type='float', digits_compute=dp.get_precision('Product Unit of Measure'),360 type='float', digits_compute=dp.get_precision('Quantity'),
361 string='Quantity On Hand',361 string='Quantity On Hand',
362 help="Current quantity of products.\n"362 help="Current quantity of products.\n"
363 "In a context with a single Stock Location, this includes "363 "In a context with a single Stock Location, this includes "
@@ -370,7 +370,7 @@
370 "Otherwise, this includes goods stored in any Stock Location "370 "Otherwise, this includes goods stored in any Stock Location "
371 "with 'internal' type."),371 "with 'internal' type."),
372 'virtual_available': fields.function(_product_available, multi='qty_available',372 'virtual_available': fields.function(_product_available, multi='qty_available',
373 type='float', digits_compute=dp.get_precision('Product Unit of Measure'),373 type='float', digits_compute=dp.get_precision('Quantity'),
374 string='Forecasted Quantity',374 string='Forecasted Quantity',
375 help="Forecast quantity (computed as Quantity On Hand "375 help="Forecast quantity (computed as Quantity On Hand "
376 "- Outgoing + Incoming)\n"376 "- Outgoing + Incoming)\n"
@@ -382,7 +382,7 @@
382 "Otherwise, this includes goods stored in any Stock Location "382 "Otherwise, this includes goods stored in any Stock Location "
383 "with 'internal' type."),383 "with 'internal' type."),
384 'incoming_qty': fields.function(_product_available, multi='qty_available',384 'incoming_qty': fields.function(_product_available, multi='qty_available',
385 type='float', digits_compute=dp.get_precision('Product Unit of Measure'),385 type='float', digits_compute=dp.get_precision('Quantity'),
386 string='Incoming',386 string='Incoming',
387 help="Quantity of products that are planned to arrive.\n"387 help="Quantity of products that are planned to arrive.\n"
388 "In a context with a single Stock Location, this includes "388 "In a context with a single Stock Location, this includes "
@@ -393,7 +393,7 @@
393 "Otherwise, this includes goods arriving to any Stock "393 "Otherwise, this includes goods arriving to any Stock "
394 "Location with 'internal' type."),394 "Location with 'internal' type."),
395 'outgoing_qty': fields.function(_product_available, multi='qty_available',395 'outgoing_qty': fields.function(_product_available, multi='qty_available',
396 type='float', digits_compute=dp.get_precision('Product Unit of Measure'),396 type='float', digits_compute=dp.get_precision('Quantity'),
397 string='Outgoing',397 string='Outgoing',
398 help="Quantity of products that are planned to leave.\n"398 help="Quantity of products that are planned to leave.\n"
399 "In a context with a single Stock Location, this includes "399 "In a context with a single Stock Location, this includes "
400400
=== modified file 'stock/report/lot_overview.rml'
--- stock/report/lot_overview.rml 2012-11-29 22:26:45 +0000
+++ stock/report/lot_overview.rml 2014-05-02 07:31:45 +0000
@@ -181,10 +181,10 @@
181 <para style="terp_default_Right_9">[[formatLang( p['prod_qty']) ]] [[ p['uom'] ]]</para>181 <para style="terp_default_Right_9">[[formatLang( p['prod_qty']) ]] [[ p['uom'] ]]</para>
182 </td>182 </td>
183 <td>183 <td>
184 <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Account') ]]</para>184 <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Amount') ]]</para>
185 </td>185 </td>
186 <td>186 <td>
187 <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Account', currency_obj = o.company_id.currency_id)]]</para>187 <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Amount', currency_obj = o.company_id.currency_id)]]</para>
188 </td>188 </td>
189 </tr>189 </tr>
190 </blockTable>190 </blockTable>
@@ -198,7 +198,7 @@
198 <para style="terp_default_Bold_9">Total:</para>198 <para style="terp_default_Bold_9">Total:</para>
199 </td>199 </td>
200 <td>200 <td>
201 <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>201 <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
202 </td>202 </td>
203 </tr>203 </tr>
204 </blockTable>204 </blockTable>
@@ -215,7 +215,7 @@
215 </para>215 </para>
216 </td>216 </td>
217 <td>217 <td>
218 <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>218 <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
219 </td>219 </td>
220 </tr>220 </tr>
221 </blockTable>221 </blockTable>
222222
=== modified file 'stock/report/lot_overview_all.rml'
--- stock/report/lot_overview_all.rml 2012-11-29 22:26:45 +0000
+++ stock/report/lot_overview_all.rml 2014-05-02 07:31:45 +0000
@@ -181,10 +181,10 @@
181 <para style="terp_default_Right_9">[[formatLang( p['prod_qty']) ]] [[ p['uom'] ]]</para>181 <para style="terp_default_Right_9">[[formatLang( p['prod_qty']) ]] [[ p['uom'] ]]</para>
182 </td>182 </td>
183 <td>183 <td>
184 <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Account') ]]</para>184 <para style="terp_default_Right_9">[[ formatLang(p['price'], dp='Amount') ]]</para>
185 </td>185 </td>
186 <td>186 <td>
187 <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Account', currency_obj = o.company_id.currency_id)]]</para>187 <para style="terp_default_Right_9">[[ formatLang(p['price_value'], dp='Amount', currency_obj = o.company_id.currency_id)]]</para>
188 </td>188 </td>
189 </tr>189 </tr>
190 </blockTable>190 </blockTable>
@@ -198,7 +198,7 @@
198 <para style="terp_default_Bold_9">Total:</para>198 <para style="terp_default_Bold_9">Total:</para>
199 </td>199 </td>
200 <td>200 <td>
201 <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>201 <para style="terp_tblheader_Details_Right">[[ formatLang(price_total(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
202 </td>202 </td>
203 </tr>203 </tr>
204 </blockTable>204 </blockTable>
@@ -215,7 +215,7 @@
215 </para>215 </para>
216 </td>216 </td>
217 <td>217 <td>
218 <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Account', currency_obj = o.company_id.currency_id) ]]</para>218 <para style="terp_tblheader_Details_Right">[[ formatLang(grand_total_price(), dp='Amount', currency_obj = o.company_id.currency_id) ]]</para>
219 </td>219 </td>
220 </tr>220 </tr>
221 </blockTable>221 </blockTable>
222222
=== modified file 'stock/report/report_stock_move.py'
--- stock/report/report_stock_move.py 2014-01-29 13:55:19 +0000
+++ stock/report/report_stock_move.py 2014-05-02 07:31:45 +0000
@@ -43,9 +43,9 @@
43 'product_qty_in':fields.integer('In Qty',readonly=True),43 'product_qty_in':fields.integer('In Qty',readonly=True),
44 'product_qty_out':fields.integer('Out Qty',readonly=True),44 'product_qty_out':fields.integer('Out Qty',readonly=True),
45 'value' : fields.float('Total Value', required=True),45 'value' : fields.float('Total Value', required=True),
46 'day_diff2':fields.float('Lag (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),46 'day_diff2':fields.float('Lag (Days)',readonly=True, group_operator="avg"),
47 'day_diff1':fields.float('Planned Lead Time (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),47 'day_diff1':fields.float('Planned Lead Time (Days)',readonly=True, group_operator="avg"),
48 'day_diff':fields.float('Execution Lead Time (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),48 'day_diff':fields.float('Execution Lead Time (Days)',readonly=True, group_operator="avg"),
49 'stock_journal': fields.many2one('stock.journal','Stock Journal', select=True),49 'stock_journal': fields.many2one('stock.journal','Stock Journal', select=True),
5050
5151
@@ -129,8 +129,8 @@
129 'location_id': fields.many2one('stock.location', 'Location', readonly=True),129 'location_id': fields.many2one('stock.location', 'Location', readonly=True),
130 'prodlot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True),130 'prodlot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True),
131 'company_id': fields.many2one('res.company', 'Company', readonly=True),131 'company_id': fields.many2one('res.company', 'Company', readonly=True),
132 'product_qty':fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True),132 'product_qty':fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), readonly=True),
133 'value' : fields.float('Total Value', digits_compute=dp.get_precision('Account'), required=True),133 'value' : fields.float('Total Value', digits_compute=dp.get_precision('Amount'), required=True),
134 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', readonly=True, select=True,134 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', readonly=True, select=True,
135 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\'.\135 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\'.\
136 \nThe state is \'Waiting\' if the move is waiting for another one.'),136 \nThe state is \'Waiting\' if the move is waiting for another one.'),
137137
=== modified file 'stock/res_config.py'
--- stock/res_config.py 2013-10-27 12:31:04 +0000
+++ stock/res_config.py 2014-05-02 07:31:45 +0000
@@ -73,12 +73,12 @@
73 }73 }
7474
75 def get_default_dp(self, cr, uid, fields, context=None):75 def get_default_dp(self, cr, uid, fields, context=None):
76 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_stock_weight')76 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_weight')
77 return {'decimal_precision': dp.digits}77 return {'decimal_precision': dp.digits}
7878
79 def set_default_dp(self, cr, uid, ids, context=None):79 def set_default_dp(self, cr, uid, ids, context=None):
80 config = self.browse(cr, uid, ids[0], context)80 config = self.browse(cr, uid, ids[0], context)
81 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_stock_weight')81 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'decimal_weight')
82 dp.write({'digits': config.decimal_precision})82 dp.write({'digits': config.decimal_precision})
8383
84# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:84# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
8585
=== modified file 'stock/stock.py'
--- stock/stock.py 2014-05-01 15:56:33 +0000
+++ stock/stock.py 2014-05-02 07:31:45 +0000
@@ -204,8 +204,8 @@
204204
205 'parent_left': fields.integer('Left Parent', select=1),205 'parent_left': fields.integer('Left Parent', select=1),
206 'parent_right': fields.integer('Right Parent', select=1),206 'parent_right': fields.integer('Right Parent', select=1),
207 'stock_real_value': fields.function(_product_value, type='float', string='Real Stock Value', multi="stock", digits_compute=dp.get_precision('Account')),207 'stock_real_value': fields.function(_product_value, type='float', string='Real Stock Value', multi="stock", digits_compute=dp.get_precision('Amount')),
208 'stock_virtual_value': fields.function(_product_value, type='float', string='Virtual Stock Value', multi="stock", digits_compute=dp.get_precision('Account')),208 'stock_virtual_value': fields.function(_product_value, type='float', string='Virtual Stock Value', multi="stock", digits_compute=dp.get_precision('Amount')),
209 'company_id': fields.many2one('res.company', 'Company', select=1, help='Let this field empty if this location is shared between all companies'),209 'company_id': fields.many2one('res.company', 'Company', select=1, help='Let this field empty if this location is shared between all companies'),
210 'scrap_location': fields.boolean('Scrap Location', help='Check this box to allow using this location to put scrapped/damaged goods.'),210 'scrap_location': fields.boolean('Scrap Location', help='Check this box to allow using this location to put scrapped/damaged goods.'),
211 'valuation_in_account_id': fields.many2one('account.account', 'Stock Valuation Account (Incoming)', domain = [('type','=','other')],211 'valuation_in_account_id': fields.many2one('account.account', 'Stock Valuation Account (Incoming)', domain = [('type','=','other')],
@@ -1469,7 +1469,7 @@
1469 'date': fields.datetime('Creation Date', required=True),1469 'date': fields.datetime('Creation Date', required=True),
1470 'stock_available': fields.function(_get_stock, fnct_search=_stock_search, type="float", string="Available", select=True,1470 'stock_available': fields.function(_get_stock, fnct_search=_stock_search, type="float", string="Available", select=True,
1471 help="Current quantity of products with this Serial Number available in company warehouses",1471 help="Current quantity of products with this Serial Number available in company warehouses",
1472 digits_compute=dp.get_precision('Product Unit of Measure')),1472 digits_compute=dp.get_precision('Quantity')),
1473 'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'),1473 'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'),
1474 'company_id': fields.many2one('res.company', 'Company', select=True),1474 'company_id': fields.many2one('res.company', 'Company', select=True),
1475 'move_ids': fields.one2many('stock.move', 'prodlot_id', 'Moves for this serial number', readonly=True),1475 'move_ids': fields.one2many('stock.move', 'prodlot_id', 'Moves for this serial number', readonly=True),
@@ -1608,7 +1608,7 @@
1608 'date_expected': fields.datetime('Scheduled Date', states={'done': [('readonly', True)]},required=True, select=True, help="Scheduled date for the processing of this move"),1608 'date_expected': fields.datetime('Scheduled Date', states={'done': [('readonly', True)]},required=True, select=True, help="Scheduled date for the processing of this move"),
1609 'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type','<>','service')],states={'done': [('readonly', True)]}),1609 'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type','<>','service')],states={'done': [('readonly', True)]}),
16101610
1611 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'),1611 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'),
1612 required=True,states={'done': [('readonly', True)]},1612 required=True,states={'done': [('readonly', True)]},
1613 help="This is the quantity of products from an inventory "1613 help="This is the quantity of products from an inventory "
1614 "point of view. For moves in the state 'done', this is the "1614 "point of view. For moves in the state 'done', this is the "
@@ -1619,7 +1619,7 @@
1619 "the product reservation, and should be done with care."1619 "the product reservation, and should be done with care."
1620 ),1620 ),
1621 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True,states={'done': [('readonly', True)]}),1621 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True,states={'done': [('readonly', True)]}),
1622 'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Product Unit of Measure'), states={'done': [('readonly', True)]}),1622 'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Quantity'), states={'done': [('readonly', True)]}),
1623 'product_uos': fields.many2one('product.uom', 'Product UOS', states={'done': [('readonly', True)]}),1623 'product_uos': fields.many2one('product.uom', 'Product UOS', states={'done': [('readonly', True)]}),
1624 'product_packaging': fields.many2one('product.packaging', 'Packaging', help="It specifies attributes of packaging like type, quantity of packaging,etc."),1624 'product_packaging': fields.many2one('product.packaging', 'Packaging', help="It specifies attributes of packaging like type, quantity of packaging,etc."),
16251625
@@ -1649,7 +1649,7 @@
1649 "* 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"\1649 "* 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"\
1650 "* Available: When products are reserved, it is set to \'Available\'.\n"\1650 "* Available: When products are reserved, it is set to \'Available\'.\n"\
1651 "* Done: When the shipment is processed, the state is \'Done\'."),1651 "* Done: When the shipment is processed, the state is \'Done\'."),
1652 '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)"),1652 '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)"),
1653 '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)"),1653 '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)"),
1654 'company_id': fields.many2one('res.company', 'Company', required=True, select=True),1654 'company_id': fields.many2one('res.company', 'Company', required=True, select=True),
1655 'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order of", select=True),1655 'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order of", select=True),
@@ -2905,7 +2905,7 @@
2905 'location_id': fields.many2one('stock.location', 'Location', required=True),2905 'location_id': fields.many2one('stock.location', 'Location', required=True),
2906 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),2906 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
2907 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),2907 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
2908 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),2908 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
2909 'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True, readonly=True),2909 'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True, readonly=True),
2910 'prod_lot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),2910 'prod_lot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
2911 'state': fields.related('inventory_id','state',type='char',string='Status',readonly=True),2911 'state': fields.related('inventory_id','state',type='char',string='Status',readonly=True),
29122912
=== modified file 'stock/stock_data.xml'
--- stock/stock_data.xml 2012-11-29 22:26:45 +0000
+++ stock/stock_data.xml 2014-05-02 07:31:45 +0000
@@ -151,12 +151,6 @@
151 <field eval="'stock.location,'+str(location_production)" name="value"/>151 <field eval="'stock.location,'+str(location_production)" name="value"/>
152 </record>152 </record>
153153
154
155 <record forcecreate="True" id="decimal_shipping_delay" model="decimal.precision">
156 <field name="name">Shipping Delay</field>
157 <field name="digits" eval="2"/>
158 </record>
159
160 <!--154 <!--
161 Resource: stock.warehouse155 Resource: stock.warehouse
162 -->156 -->
163157
=== modified file 'stock/wizard/stock_change_product_qty.py'
--- stock/wizard/stock_change_product_qty.py 2014-03-20 18:17:37 +0000
+++ stock/wizard/stock_change_product_qty.py 2014-05-02 07:31:45 +0000
@@ -29,7 +29,7 @@
29 _description = "Change Product Quantity"29 _description = "Change Product Quantity"
30 _columns = {30 _columns = {
31 'product_id' : fields.many2one('product.product', 'Product'),31 'product_id' : fields.many2one('product.product', 'Product'),
32 '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.'),32 '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.'),
33 'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),33 'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
34 'location_id': fields.many2one('stock.location', 'Location', required=True, domain="[('usage', '=', 'internal')]"),34 'location_id': fields.many2one('stock.location', 'Location', required=True, domain="[('usage', '=', 'internal')]"),
35 }35 }
3636
=== modified file 'stock/wizard/stock_change_standard_price.py'
--- stock/wizard/stock_change_standard_price.py 2013-10-27 12:31:04 +0000
+++ stock/wizard/stock_change_standard_price.py 2014-05-02 07:31:45 +0000
@@ -27,7 +27,7 @@
27 _name = "stock.change.standard.price"27 _name = "stock.change.standard.price"
28 _description = "Change Standard Price"28 _description = "Change Standard Price"
29 _columns = {29 _columns = {
30 'new_price': fields.float('Price', required=True, digits_compute=dp.get_precision('Product Price'),30 'new_price': fields.float('Price', required=True, digits_compute=dp.get_precision('Amount'),
31 help="If cost price is increased, stock variation account will be debited "31 help="If cost price is increased, stock variation account will be debited "
32 "and stock output account will be credited with the value = (difference of amount * quantity available).\n"32 "and stock output account will be credited with the value = (difference of amount * quantity available).\n"
33 "If cost price is decreased, stock variation account will be creadited and stock input account will be debited."),33 "If cost price is decreased, stock variation account will be creadited and stock input account will be debited."),
3434
=== modified file 'stock/wizard/stock_move.py'
--- stock/wizard/stock_move.py 2013-10-27 12:31:04 +0000
+++ stock/wizard/stock_move.py 2014-05-02 07:31:45 +0000
@@ -29,7 +29,7 @@
2929
30 _columns = {30 _columns = {
31 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),31 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
32 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),32 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
33 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),33 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
34 'location_id': fields.many2one('stock.location', 'Location', required=True)34 'location_id': fields.many2one('stock.location', 'Location', required=True)
35 }35 }
@@ -163,7 +163,7 @@
163 return res163 return res
164164
165 _columns = {165 _columns = {
166 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),166 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
167 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),167 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
168 'product_uom': fields.many2one('product.uom', 'Unit of Measure'),168 'product_uom': fields.many2one('product.uom', 'Unit of Measure'),
169 'line_ids': fields.one2many('stock.move.split.lines', 'wizard_id', 'Serial Numbers'),169 'line_ids': fields.one2many('stock.move.split.lines', 'wizard_id', 'Serial Numbers'),
@@ -259,7 +259,7 @@
259 _description = "Stock move Split lines"259 _description = "Stock move Split lines"
260 _columns = {260 _columns = {
261 'name': fields.char('Serial Number', size=64),261 'name': fields.char('Serial Number', size=64),
262 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),262 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
263 'wizard_id': fields.many2one('stock.move.split', 'Parent Wizard'),263 'wizard_id': fields.many2one('stock.move.split', 'Parent Wizard'),
264 'wizard_exist_id': fields.many2one('stock.move.split', 'Parent Wizard (for existing lines)'),264 'wizard_exist_id': fields.many2one('stock.move.split', 'Parent Wizard (for existing lines)'),
265 'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number'),265 'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number'),
266266
=== modified file 'stock/wizard/stock_partial_picking.py'
--- stock/wizard/stock_partial_picking.py 2014-01-15 21:44:54 +0000
+++ stock/wizard/stock_partial_picking.py 2014-05-02 07:31:45 +0000
@@ -43,7 +43,7 @@
43 _rec_name = 'product_id'43 _rec_name = 'product_id'
44 _columns = {44 _columns = {
45 'product_id' : fields.many2one('product.product', string="Product", required=True, ondelete='CASCADE'),45 'product_id' : fields.many2one('product.product', string="Product", required=True, ondelete='CASCADE'),
46 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True),46 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Quantity'), required=True),
47 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True, ondelete='CASCADE'),47 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True, ondelete='CASCADE'),
48 'prodlot_id' : fields.many2one('stock.production.lot', 'Serial Number', ondelete='CASCADE'),48 'prodlot_id' : fields.many2one('stock.production.lot', 'Serial Number', ondelete='CASCADE'),
49 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete='CASCADE', domain = [('usage','<>','view')]),49 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete='CASCADE', domain = [('usage','<>','view')]),
@@ -51,7 +51,7 @@
51 'move_id' : fields.many2one('stock.move', "Move", ondelete='CASCADE'),51 'move_id' : fields.many2one('stock.move', "Move", ondelete='CASCADE'),
52 'wizard_id' : fields.many2one('stock.partial.picking', string="Wizard", ondelete='CASCADE'),52 'wizard_id' : fields.many2one('stock.partial.picking', string="Wizard", ondelete='CASCADE'),
53 'update_cost': fields.boolean('Need cost update'),53 'update_cost': fields.boolean('Need cost update'),
54 'cost' : fields.float("Cost", help="Unit Cost for this product line", digits_compute=dp.get_precision('Product Price')),54 'cost' : fields.float("Cost", help="Unit Cost for this product line", digits_compute=dp.get_precision('Price')),
55 'currency' : fields.many2one('res.currency', string="Currency", help="Currency in which Unit cost is expressed", ondelete='CASCADE'),55 'currency' : fields.many2one('res.currency', string="Currency", help="Currency in which Unit cost is expressed", ondelete='CASCADE'),
56 'tracking': fields.function(_tracking, string='Tracking', type='boolean'),56 'tracking': fields.function(_tracking, string='Tracking', type='boolean'),
57 }57 }
5858
=== modified file 'stock/wizard/stock_return_picking.py'
--- stock/wizard/stock_return_picking.py 2013-10-27 12:31:04 +0000
+++ stock/wizard/stock_return_picking.py 2014-05-02 07:31:45 +0000
@@ -31,7 +31,7 @@
3131
32 _columns = {32 _columns = {
33 'product_id' : fields.many2one('product.product', string="Product", required=True),33 'product_id' : fields.many2one('product.product', string="Product", required=True),
34 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product Unit of Measure'), required=True),34 'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Quantity'), required=True),
35 'wizard_id' : fields.many2one('stock.return.picking', string="Wizard"),35 'wizard_id' : fields.many2one('stock.return.picking', string="Wizard"),
36 'move_id' : fields.many2one('stock.move', "Move"),36 'move_id' : fields.many2one('stock.move', "Move"),
37 'prodlot_id': fields.related('move_id', 'prodlot_id', type='many2one', relation='stock.production.lot', string='Serial Number', readonly=True),37 'prodlot_id': fields.related('move_id', 'prodlot_id', type='many2one', relation='stock.production.lot', string='Serial Number', readonly=True),
3838
=== modified file 'stock/wizard/stock_splitinto.py'
--- stock/wizard/stock_splitinto.py 2013-10-27 12:31:04 +0000
+++ stock/wizard/stock_splitinto.py 2014-05-02 07:31:45 +0000
@@ -27,7 +27,7 @@
27 _name = "stock.split.into"27 _name = "stock.split.into"
28 _description = "Split into"28 _description = "Split into"
29 _columns = {29 _columns = {
30 'quantity': fields.float('Quantity',digits_compute=dp.get_precision('Product Unit of Measure')),30 'quantity': fields.float('Quantity',digits_compute=dp.get_precision('Quantity')),
31 }31 }
32 _defaults = {32 _defaults = {
33 'quantity': lambda *x: 0,33 'quantity': lambda *x: 0,
3434
=== modified file 'website_quote/models/order.py'
--- website_quote/models/order.py 2014-04-11 14:20:22 +0000
+++ website_quote/models/order.py 2014-05-02 07:31:45 +0000
@@ -52,9 +52,9 @@
52 'name': fields.text('Description', required=True, translate=True),52 'name': fields.text('Description', required=True, translate=True),
53 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True),53 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True),
54 'website_description': fields.html('Line Description', translate=True),54 'website_description': fields.html('Line Description', translate=True),
55 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),55 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
56 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount')),56 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price')),
57 'product_uom_qty': fields.float('Quantity', required=True, digits_compute= dp.get_precision('Product UoS')),57 'product_uom_qty': fields.float('Quantity', required=True, digits_compute= dp.get_precision('Quantity')),
58 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure ', required=True),58 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure ', required=True),
59 }59 }
60 _defaults = {60 _defaults = {
@@ -116,7 +116,7 @@
116 'options' : fields.one2many('sale.order.option', 'order_id', 'Optional Products Lines'),116 'options' : fields.one2many('sale.order.option', 'order_id', 'Optional Products Lines'),
117 'validity_date': fields.date('Validity Date'),117 'validity_date': fields.date('Validity Date'),
118 'amount_undiscounted': fields.function(_get_total, string='Amount Before Discount', type="float",118 'amount_undiscounted': fields.function(_get_total, string='Amount Before Discount', type="float",
119 digits_compute=dp.get_precision('Account'))119 digits_compute=dp.get_precision('Amount'))
120 }120 }
121 _defaults = {121 _defaults = {
122 'access_token': lambda self, cr, uid, ctx={}: str(uuid.uuid4())122 'access_token': lambda self, cr, uid, ctx={}: str(uuid.uuid4())
@@ -194,10 +194,10 @@
194 'name': fields.text('Description', required=True, translate=True),194 'name': fields.text('Description', required=True, translate=True),
195 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True),195 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True),
196 'website_description': fields.html('Option Description', translate=True),196 'website_description': fields.html('Option Description', translate=True),
197 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),197 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
198 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount')),198 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price')),
199 'uom_id': fields.many2one('product.uom', 'Unit of Measure ', required=True),199 'uom_id': fields.many2one('product.uom', 'Unit of Measure ', required=True),
200 'quantity': fields.float('Quantity', required=True, digits_compute= dp.get_precision('Product UoS')),200 'quantity': fields.float('Quantity', required=True, digits_compute= dp.get_precision('Quantity')),
201 }201 }
202 _defaults = {202 _defaults = {
203 'quantity': 1,203 'quantity': 1,
@@ -222,11 +222,11 @@
222 'name': fields.text('Description', required=True),222 'name': fields.text('Description', required=True),
223 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)]),223 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)]),
224 'website_description': fields.html('Line Description'),224 'website_description': fields.html('Line Description'),
225 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),225 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
226 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount')),226 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price')),
227 'uom_id': fields.many2one('product.uom', 'Unit of Measure ', required=True),227 'uom_id': fields.many2one('product.uom', 'Unit of Measure ', required=True),
228 'quantity': fields.float('Quantity', required=True,228 'quantity': fields.float('Quantity', required=True,
229 digits_compute= dp.get_precision('Product UoS')),229 digits_compute= dp.get_precision('Quantity')),
230 }230 }
231231
232 _defaults = {232 _defaults = {
233233
=== modified file 'website_sale_delivery/models/sale_order.py'
--- website_sale_delivery/models/sale_order.py 2014-04-25 15:25:41 +0000
+++ website_sale_delivery/models/sale_order.py 2014-05-02 07:31:45 +0000
@@ -40,7 +40,7 @@
4040
41 _columns = {41 _columns = {
42 'amount_delivery': fields.function(42 'amount_delivery': fields.function(
43 _amount_all_wrapper, type='float', digits_compute=decimal_precision.get_precision('Account'),43 _amount_all_wrapper, type='float', digits_compute=decimal_precision.get_precision('Amount'),
44 string='Delivery Amount',44 string='Delivery Amount',
45 store={45 store={
46 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),46 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),

Subscribers

People subscribed via source and target branches

to all changes: