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

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

Description of the change

Hello,

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

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

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

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

Thanks,
Yogesh Parekh.

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

[MERGE]: Merged with addons

Unmerged revisions

8873. By Atul Patel(OpenERP)

[MERGE]: Merged with addons

8872. By Atul Patel(OpenERP)

[MERGE]: Merged with trunk

8871. By Atul Patel(OpenERP)

[MERGE]: Merged with addons

8870. By Atul Patel(OpenERP)

[ADD]: Add decimal precision in pos amount_total field

8869. By Pariket Trivedi(OpenERP)

[IMP] : Decimal precision Remove Shipping Delay.

8868. By Yogesh Parekh(OpenERP)

[IMP] Create a new Data File in decimal_precision module

8867. By Yogesh Parekh(OpenERP)

[IMP] Improvement in Decimal Precision

8866. By Yogesh Parekh(OpenERP)

[IMP] Change the Decimal Precision in lunch module

8865. By Yogesh Parekh(OpenERP)

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

8864. By Yogesh Parekh(OpenERP)

[IMP] Change the Decimal Precision in rml report

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account/account.py'
--- account/account.py 2013-10-09 18:03:37 +0000
+++ account/account.py 2013-10-29 13:27:40 +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)),
@@ -1280,11 +1280,11 @@
1280 _name: (lambda self, cr,uid,ids,c: ids, ['line_id'], 10),1280 _name: (lambda self, cr,uid,ids,c: ids, ['line_id'], 10),
1281 'account.move.line': (_get_move_from_lines, ['partner_id'],10)1281 'account.move.line': (_get_move_from_lines, ['partner_id'],10)
1282 }),1282 }),
1283 'amount': fields.function(_amount_compute, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount),1283 'amount': fields.function(_amount_compute, string='Amount', digits_compute=dp.get_precision('Amount'), type='float', fnct_search=_search_amount),
1284 'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True),1284 'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True),
1285 'narration':fields.text('Internal Note'),1285 'narration':fields.text('Internal Note'),
1286 'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),1286 'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
1287 '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"),1287 '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"),
1288 }1288 }
12891289
1290 _defaults = {1290 _defaults = {
@@ -1778,7 +1778,7 @@
1778 for rec in record.child_ids:1778 for rec in record.child_ids:
1779 amount += _rec_get(rec) * rec.sign1779 amount += _rec_get(rec) * rec.sign
1780 return amount1780 return amount
1781 res2[record.id] = round(_rec_get(record), obj_precision.precision_get(cr, uid, 'Account'))1781 res2[record.id] = round(_rec_get(record), obj_precision.precision_get(cr, uid, 'Amount'))
1782 return res21782 return res2
17831783
1784 def _sum_year(self, cr, uid, ids, name, args, context=None):1784 def _sum_year(self, cr, uid, ids, name, args, context=None):
@@ -1883,7 +1883,7 @@
18831883
1884def get_precision_tax():1884def get_precision_tax():
1885 def change_digit_tax(cr):1885 def change_digit_tax(cr):
1886 res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')1886 res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Amount')
1887 return (16, res+3)1887 return (16, res+3)
1888 return change_digit_tax1888 return change_digit_tax
18891889
@@ -2129,15 +2129,15 @@
2129 """2129 """
21302130
2131 # By default, for each tax, tax amount will first be computed2131 # By default, for each tax, tax amount will first be computed
2132 # and rounded at the 'Account' decimal precision for each2132 # and rounded at the 'Amount' decimal precision for each
2133 # PO/SO/invoice line and then these rounded amounts will be2133 # PO/SO/invoice line and then these rounded amounts will be
2134 # summed, leading to the total amount for that tax. But, if the2134 # summed, leading to the total amount for that tax. But, if the
2135 # company has tax_calculation_rounding_method = round_globally,2135 # company has tax_calculation_rounding_method = round_globally,
2136 # we still follow the same method, but we use a much larger2136 # we still follow the same method, but we use a much larger
2137 # precision when we round the tax amount for each line (we use2137 # precision when we round the tax amount for each line (we use
2138 # the 'Account' decimal precision + 5), and that way it's like2138 # the 'Amount' decimal precision + 5), and that way it's like
2139 # rounding after the sum of the tax amounts of each line2139 # rounding after the sum of the tax amounts of each line
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 tax_compute_precision = precision2141 tax_compute_precision = precision
2142 if taxes and taxes[0].company_id.tax_calculation_rounding_method == 'round_globally':2142 if taxes and taxes[0].company_id.tax_calculation_rounding_method == 'round_globally':
2143 tax_compute_precision += 52143 tax_compute_precision += 5
@@ -2180,7 +2180,7 @@
2180 one tax for each tax id in IDS and their children2180 one tax for each tax id in IDS and their children
2181 """2181 """
2182 if not precision:2182 if not precision:
2183 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')2183 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
2184 res = self._unit_compute(cr, uid, taxes, price_unit, product, partner, quantity)2184 res = self._unit_compute(cr, uid, taxes, price_unit, product, partner, quantity)
2185 total = 0.02185 total = 0.0
2186 for r in res:2186 for r in res:
@@ -2276,7 +2276,7 @@
2276 one tax for each tax id in IDS and their children2276 one tax for each tax id in IDS and their children
2277 """2277 """
2278 if not precision:2278 if not precision:
2279 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')2279 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
2280 res = self._unit_compute_inv(cr, uid, taxes, price_unit, product, partner=None)2280 res = self._unit_compute_inv(cr, uid, taxes, price_unit, product, partner=None)
2281 total = 0.02281 total = 0.0
2282 for r in res:2282 for r in res:
@@ -2405,9 +2405,9 @@
2405 _columns = {2405 _columns = {
2406 'name': fields.char('Name', size=64, required=True),2406 'name': fields.char('Name', size=64, required=True),
2407 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the resources from lower sequences to higher ones."),2407 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the resources from lower sequences to higher ones."),
2408 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Account'), help="The optional quantity on entries."),2408 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), help="The optional quantity on entries."),
2409 'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),2409 'debit': fields.float('Debit', digits_compute=dp.get_precision('Amount')),
2410 'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),2410 'credit': fields.float('Credit', digits_compute=dp.get_precision('Amount')),
2411 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade"),2411 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade"),
2412 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', ondelete="cascade"),2412 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', ondelete="cascade"),
2413 'model_id': fields.many2one('account.model', 'Model', required=True, ondelete="cascade", select=True),2413 'model_id': fields.many2one('account.model', 'Model', required=True, ondelete="cascade", select=True),
24142414
=== modified file 'account/account_analytic_line.py'
--- account/account_analytic_line.py 2013-04-15 10:23:49 +0000
+++ account/account_analytic_line.py 2013-10-29 13:27:40 +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 2013-06-14 09:19:24 +0000
+++ account/account_bank_statement.py 2013-10-29 13:27:40 +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)]}),109 states={'confirm': [('readonly', True)]}),
110 'balance_end': fields.function(_end_balance,110 'balance_end': fields.function(_end_balance,
111 store = {111 store = {
@@ -548,7 +548,7 @@
548 _columns = {548 _columns = {
549 'name': fields.char('OBI', required=True, help="Originator to Beneficiary Information"),549 'name': fields.char('OBI', required=True, help="Originator to Beneficiary Information"),
550 'date': fields.date('Date', required=True),550 'date': fields.date('Date', required=True),
551 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),551 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
552 'type': fields.selection([552 'type': fields.selection([
553 ('supplier','Supplier'),553 ('supplier','Supplier'),
554 ('customer','Customer'),554 ('customer','Customer'),
555555
=== modified file 'account/account_cash_statement.py'
--- account/account_cash_statement.py 2013-06-14 09:19:24 +0000
+++ account/account_cash_statement.py 2013-10-29 13:27:40 +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
@@ -339,7 +339,7 @@
339 _name = 'account.journal.cashbox.line'339 _name = 'account.journal.cashbox.line'
340 _rec_name = 'pieces'340 _rec_name = 'pieces'
341 _columns = {341 _columns = {
342 'pieces': fields.float('Values', digits_compute=dp.get_precision('Account')),342 'pieces': fields.float('Values', digits_compute=dp.get_precision('Amount')),
343 'journal_id' : fields.many2one('account.journal', 'Journal', required=True, select=1, ondelete="cascade"),343 'journal_id' : fields.many2one('account.journal', 'Journal', required=True, select=1, ondelete="cascade"),
344 }344 }
345345
346346
=== modified file 'account/account_invoice.py'
--- account/account_invoice.py 2013-09-23 17:13:10 +0000
+++ account/account_invoice.py 2013-10-29 13:27:40 +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),
@@ -1381,7 +1381,7 @@
1381 total += (l.debit or 0.0) - (l.credit or 0.0)1381 total += (l.debit or 0.0) - (l.credit or 0.0)
13821382
1383 inv_id, name = self.name_get(cr, uid, [invoice.id], context=context)[0]1383 inv_id, name = self.name_get(cr, uid, [invoice.id], context=context)[0]
1384 if (not round(total,self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))) or writeoff_acc_id:1384 if (not round(total,self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount'))) or writeoff_acc_id:
1385 self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context)1385 self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context)
1386 else:1386 else:
1387 code = invoice.currency_id.symbol1387 code = invoice.currency_id.symbol
@@ -1440,11 +1440,11 @@
1440 'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null', select=True),1440 'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null', select=True),
1441 'product_id': fields.many2one('product.product', 'Product', ondelete='set null', select=True),1441 'product_id': fields.many2one('product.product', 'Product', ondelete='set null', select=True),
1442 '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."),1442 '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."),
1443 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),1443 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
1444 'price_subtotal': fields.function(_amount_line, string='Amount', type="float",1444 'price_subtotal': fields.function(_amount_line, string='Amount', type="float",
1445 digits_compute= dp.get_precision('Account'), store=True),1445 digits_compute= dp.get_precision('Amount'), store=True),
1446 'quantity': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),1446 'quantity': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True),
1447 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount')),1447 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price')),
1448 'invoice_line_tax_id': fields.many2many('account.tax', 'account_invoice_line_tax', 'invoice_line_id', 'tax_id', 'Taxes', domain=[('parent_id','=',False)]),1448 'invoice_line_tax_id': fields.many2many('account.tax', 'account_invoice_line_tax', 'invoice_line_id', 'tax_id', 'Taxes', domain=[('parent_id','=',False)]),
1449 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),1449 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
1450 'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),1450 'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
@@ -1682,14 +1682,14 @@
1682 'name': fields.char('Tax Description', size=64, required=True),1682 'name': fields.char('Tax Description', size=64, required=True),
1683 'account_id': fields.many2one('account.account', 'Tax Account', required=True, domain=[('type','<>','view'),('type','<>','income'), ('type', '<>', 'closed')]),1683 'account_id': fields.many2one('account.account', 'Tax Account', required=True, domain=[('type','<>','view'),('type','<>','income'), ('type', '<>', 'closed')]),
1684 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'),1684 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'),
1685 'base': fields.float('Base', digits_compute=dp.get_precision('Account')),1685 'base': fields.float('Base', digits_compute=dp.get_precision('Amount')),
1686 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),1686 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
1687 'manual': fields.boolean('Manual'),1687 'manual': fields.boolean('Manual'),
1688 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of invoice tax."),1688 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of invoice tax."),
1689 'base_code_id': fields.many2one('account.tax.code', 'Base Code', help="The account basis of the tax declaration."),1689 'base_code_id': fields.many2one('account.tax.code', 'Base Code', help="The account basis of the tax declaration."),
1690 'base_amount': fields.float('Base Code Amount', digits_compute=dp.get_precision('Account')),1690 'base_amount': fields.float('Base Code Amount', digits_compute=dp.get_precision('Amount')),
1691 'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),1691 'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),
1692 'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Account')),1692 'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Amount')),
1693 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),1693 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
1694 'factor_base': fields.function(_count_factor, string='Multipication factor for Base code', type='float', multi="all"),1694 'factor_base': fields.function(_count_factor, string='Multipication factor for Base code', type='float', multi="all"),
1695 'factor_tax': fields.function(_count_factor, string='Multipication factor Tax code', type='float', multi="all")1695 'factor_tax': fields.function(_count_factor, string='Multipication factor Tax code', type='float', multi="all")
16961696
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2013-09-23 17:13:10 +0000
+++ account/account_move_line.py 2013-10-29 13:27:40 +0000
@@ -431,11 +431,11 @@
431431
432 _columns = {432 _columns = {
433 'name': fields.char('Name', size=64, required=True),433 'name': fields.char('Name', size=64, required=True),
434 '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."),434 '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."),
435 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),435 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
436 'product_id': fields.many2one('product.product', 'Product'),436 'product_id': fields.many2one('product.product', 'Product'),
437 'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),437 'debit': fields.float('Debit', digits_compute=dp.get_precision('Amount')),
438 'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),438 'credit': fields.float('Credit', digits_compute=dp.get_precision('Amount')),
439 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2),439 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade", domain=[('type','<>','view'), ('type', '<>', 'closed')], select=2),
440 'move_id': fields.many2one('account.move', 'Journal Entry', ondelete="cascade", help="The move of this entry line.", select=2, required=True),440 'move_id': fields.many2one('account.move', 'Journal Entry', ondelete="cascade", help="The move of this entry line.", select=2, required=True),
441 'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Internal Note'),441 'narration': fields.related('move_id','narration', type='text', relation='account.move', string='Internal Note'),
@@ -444,7 +444,7 @@
444 'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2),444 'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2),
445 'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),445 'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),
446 'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref'),446 'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref'),
447 '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')),447 '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')),
448 '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)."),448 '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)."),
449 '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."),449 '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."),
450 'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),450 'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),
@@ -469,7 +469,7 @@
469 'balance': fields.function(_balance, fnct_search=_balance_search, string='Balance'),469 'balance': fields.function(_balance, fnct_search=_balance_search, string='Balance'),
470 'state': fields.selection([('draft','Unbalanced'), ('valid','Balanced')], 'Status', readonly=True),470 'state': fields.selection([('draft','Unbalanced'), ('valid','Balanced')], 'Status', readonly=True),
471 '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."),471 '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."),
472 '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, "\472 '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, "\
473 "this field will contain the basic amount(without tax)."),473 "this field will contain the basic amount(without tax)."),
474 'invoice': fields.function(_invoice, string='Invoice',474 'invoice': fields.function(_invoice, string='Invoice',
475 type='many2one', relation='account.invoice', fnct_search=_invoice_search),475 type='many2one', relation='account.invoice', fnct_search=_invoice_search),
476476
=== modified file 'account/data/account_data.xml'
--- account/data/account_data.xml 2013-03-14 14:53:37 +0000
+++ account/data/account_data.xml 2013-10-29 13:27:40 +0000
@@ -36,11 +36,6 @@
36 <field eval="account_payment_term_15days" name="payment_id"/>36 <field eval="account_payment_term_15days" name="payment_id"/>
37 </record>37 </record>
3838
39 <record forcecreate="True" id="decimal_payment" model="decimal.precision">
40 <field name="name">Payment Term</field>
41 <field name="digits">6</field>
42 </record>
43
44 <record id="account_payment_term_net" model="account.payment.term">39 <record id="account_payment_term_net" model="account.payment.term">
45 <field name="name">30 Net Days</field>40 <field name="name">30 Net Days</field>
46 <field name="note">30 Net Days</field>41 <field name="note">30 Net Days</field>
4742
=== modified file 'account/report/account_entries_report.py'
--- account/report/account_entries_report.py 2013-04-18 10:39:07 +0000
+++ account/report/account_entries_report.py 2013-10-29 13:27:40 +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_general_ledger.rml'
--- account/report/account_general_ledger.rml 2012-06-13 09:06:00 +0000
+++ account/report/account_general_ledger.rml 2013-10-29 13:27:40 +0000
@@ -470,16 +470,16 @@
470 <para style="terp_default_Bold_9"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>470 <para style="terp_default_Bold_9"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
471 </td>471 </td>
472 <td>472 <td>
473 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>473 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Amount')) ]]</para>
474 </td>474 </td>
475 <td>475 <td>
476 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>476 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Amount')) ]]</para>
477 </td>477 </td>
478 <td>478 <td>
479 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]]</para>479 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Amount'),currency_obj=company.currency_id) ]]</para>
480 </td>480 </td>
481 <td>481 <td>
482 <para style="terp_default_Bold_9_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account'),currency_obj=o.currency_id) or '' ]]</para>482 <para style="terp_default_Bold_9_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Amount'),currency_obj=o.currency_id) or '' ]]</para>
483 </td>483 </td>
484 </tr>484 </tr>
485 </blockTable>485 </blockTable>
@@ -509,13 +509,13 @@
509 <para style="terp_default_Centre_8">[[ strip_name(line['line_corresp'].replace(', ',','),10) ]]</para>509 <para style="terp_default_Centre_8">[[ strip_name(line['line_corresp'].replace(', ',','),10) ]]</para>
510 </td>510 </td>
511 <td>511 <td>
512 <para style="terp_default_Right_8">[[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]]</para>512 <para style="terp_default_Right_8">[[ formatLang(line['debit'], digits=get_digits(dp='Amount')) ]]</para>
513 </td>513 </td>
514 <td>514 <td>
515 <para style="terp_default_Right_8">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>515 <para style="terp_default_Right_8">[[ formatLang(line['credit'], digits=get_digits(dp='Amount')) ]]</para>
516 </td>516 </td>
517 <td>517 <td>
518 <para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]] </para>518 <para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Amount'),currency_obj=company.currency_id) ]] </para>
519 </td>519 </td>
520 <td>520 <td>
521 <para style="terp_default_Right_8"><font>[[ (line.has_key('currency_id') and line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'])]] [[ line['currency_code'] or '']]</font></para>521 <para style="terp_default_Right_8"><font>[[ (line.has_key('currency_id') and line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'])]] [[ line['currency_code'] or '']]</font></para>
@@ -566,13 +566,13 @@
566 <para style="terp_default_Bold_9"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>566 <para style="terp_default_Bold_9"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
567 </td>567 </td>
568 <td>568 <td>
569 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>569 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Amount')) ]]</para>
570 </td>570 </td>
571 <td>571 <td>
572 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>572 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Amount')) ]]</para>
573 </td>573 </td>
574 <td>574 <td>
575 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]]</para>575 <para style="terp_default_Bold_9_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Amount'),currency_obj=company.currency_id) ]]</para>
576 </td>576 </td>
577 </tr>577 </tr>
578 </blockTable>578 </blockTable>
@@ -602,13 +602,13 @@
602 <para style="terp_default_Centre_8">[[ strip_name(line['line_corresp'].replace(', ',','),20) ]]</para>602 <para style="terp_default_Centre_8">[[ strip_name(line['line_corresp'].replace(', ',','),20) ]]</para>
603 </td>603 </td>
604 <td>604 <td>
605 <para style="terp_default_Right_8">[[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]]</para>605 <para style="terp_default_Right_8">[[ formatLang(line['debit'], digits=get_digits(dp='Amount')) ]]</para>
606 </td>606 </td>
607 <td>607 <td>
608 <para style="terp_default_Right_8">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>608 <para style="terp_default_Right_8">[[ formatLang(line['credit'], digits=get_digits(dp='Amount')) ]]</para>
609 </td>609 </td>
610 <td>610 <td>
611 <para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]]</para>611 <para style="terp_default_Right_8">[[ formatLang(line['progress'], digits=get_digits(dp='Amount'),currency_obj=company.currency_id) ]]</para>
612 </td>612 </td>
613 </tr>613 </tr>
614 </blockTable>614 </blockTable>
615615
=== modified file 'account/report/account_general_ledger_landscape.rml'
--- account/report/account_general_ledger_landscape.rml 2013-06-14 21:36:02 +0000
+++ account/report/account_general_ledger_landscape.rml 2013-10-29 13:27:40 +0000
@@ -500,16 +500,16 @@
500 <para style="terp_default_Bold_7"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>500 <para style="terp_default_Bold_7"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
501 </td>501 </td>
502 <td>502 <td>
503 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>503 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Amount')) ]]</para>
504 </td>504 </td>
505 <td>505 <td>
506 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>506 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Amount')) ]]</para>
507 </td>507 </td>
508 <td>508 <td>
509 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'), currency_obj= company.currency_id) ]]</para>509 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Amount'), currency_obj= company.currency_id) ]]</para>
510 </td>510 </td>
511 <td>511 <td>
512 <para style="terp_default_Bold_7_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account'),currency_obj=o.currency_id) or '' ]]</para>512 <para style="terp_default_Bold_7_Right">[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Amount'),currency_obj=o.currency_id) or '' ]]</para>
513 </td>513 </td>
514 </tr>514 </tr>
515 </blockTable>515 </blockTable>
@@ -542,13 +542,13 @@
542 <para style="terp_default_7">[[ strip_name(line['line_corresp'],18) ]]</para>542 <para style="terp_default_7">[[ strip_name(line['line_corresp'],18) ]]</para>
543 </td>543 </td>
544 <td>544 <td>
545 <para style="terp_default_Right_7">[[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]]</para>545 <para style="terp_default_Right_7">[[ formatLang(line['debit'], digits=get_digits(dp='Amount')) ]]</para>
546 </td>546 </td>
547 <td>547 <td>
548 <para style="terp_default_Right_7">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>548 <para style="terp_default_Right_7">[[ formatLang(line['credit'], digits=get_digits(dp='Amount')) ]]</para>
549 </td>549 </td>
550 <td>550 <td>
551 <para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>551 <para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
552 </td>552 </td>
553 <td>553 <td>
554 <para style="terp_default_Right_7">[[ (line.has_key('currency_id') and line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'])]] [[ line['currency_code'] or '']]</para>554 <para style="terp_default_Right_7">[[ (line.has_key('currency_id') and line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'])]] [[ line['currency_code'] or '']]</para>
@@ -602,13 +602,13 @@
602 <para style="terp_default_Bold_7"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>602 <para style="terp_default_Bold_7"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para>
603 </td>603 </td>
604 <td>604 <td>
605 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</para>605 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Amount')) ]]</para>
606 </td>606 </td>
607 <td>607 <td>
608 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</para>608 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Amount')) ]]</para>
609 </td>609 </td>
610 <td>610 <td>
611 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>611 <para style="terp_default_Bold_7_Right">[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
612 </td>612 </td>
613 </tr>613 </tr>
614 </blockTable>614 </blockTable>
@@ -641,13 +641,13 @@
641 <para style="terp_default_7">[[ strip_name(line['line_corresp'],23) ]]</para>641 <para style="terp_default_7">[[ strip_name(line['line_corresp'],23) ]]</para>
642 </td>642 </td>
643 <td>643 <td>
644 <para style="terp_default_Right_7">[[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]]</para>644 <para style="terp_default_Right_7">[[ formatLang(line['debit'], digits=get_digits(dp='Amount')) ]]</para>
645 </td>645 </td>
646 <td>646 <td>
647 <para style="terp_default_Right_7">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para>647 <para style="terp_default_Right_7">[[ formatLang(line['credit'], digits=get_digits(dp='Amount')) ]]</para>
648 </td>648 </td>
649 <td>649 <td>
650 <para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]] </para>650 <para style="terp_default_Right_7">[[ formatLang(line['progress'], digits=get_digits(dp='Amount'),currency_obj=company.currency_id) ]] </para>
651 </td>651 </td>
652 </tr>652 </tr>
653 </blockTable>653 </blockTable>
654654
=== modified file 'account/report/account_invoice_report.py'
--- account/report/account_invoice_report.py 2013-05-14 12:05:18 +0000
+++ account/report/account_invoice_report.py 2013-10-29 13:27:40 +0000
@@ -74,9 +74,9 @@
74 'company_id': fields.many2one('res.company', 'Company', readonly=True),74 'company_id': fields.many2one('res.company', 'Company', readonly=True),
75 'user_id': fields.many2one('res.users', 'Salesperson', readonly=True),75 'user_id': fields.many2one('res.users', 'Salesperson', readonly=True),
76 'price_total': fields.float('Total Without Tax', readonly=True),76 'price_total': fields.float('Total Without Tax', readonly=True),
77 '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"),77 '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"),
78 'price_average': fields.float('Average Price', readonly=True, group_operator="avg"),78 'price_average': fields.float('Average Price', readonly=True, group_operator="avg"),
79 '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"),79 '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"),
80 'currency_rate': fields.float('Currency Rate', readonly=True),80 'currency_rate': fields.float('Currency Rate', readonly=True),
81 'nbr':fields.integer('# of Lines', readonly=True),81 'nbr':fields.integer('# of Lines', readonly=True),
82 'type': fields.selection([82 'type': fields.selection([
@@ -98,7 +98,7 @@
98 'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True),98 'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True),
99 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),99 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
100 'residual': fields.float('Total Residual', readonly=True),100 'residual': fields.float('Total Residual', readonly=True),
101 'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Account'), multi="_compute_amounts"),101 'user_currency_residual': fields.function(_compute_amounts_in_user_currency, string="Total Residual", type='float', digits_compute=dp.get_precision('Amount'), multi="_compute_amounts"),
102 'country_id': fields.many2one('res.country', 'Country of the Partner Company'),102 'country_id': fields.many2one('res.country', 'Country of the Partner Company'),
103 }103 }
104 _order = 'date desc'104 _order = 'date desc'
105105
=== modified file 'account/report/account_print_invoice.rml'
--- account/report/account_print_invoice.rml 2013-05-27 16:30:46 +0000
+++ account/report/account_print_invoice.rml 2013-10-29 13:27:40 +0000
@@ -253,10 +253,10 @@
253 <para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para>253 <para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para>
254 </td>254 </td>
255 <td>255 <td>
256 <para style="terp_default_Centre_9">[[ formatLang(l.discount, dp='Account') ]] </para>256 <para style="terp_default_Centre_9">[[ formatLang(l.discount, dp='Amount') ]] </para>
257 </td>257 </td>
258 <td>258 <td>
259 <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, dp='Account', currency_obj=o.currency_id) ]]</para>259 <para style="terp_default_Right_9">[[ formatLang(l.price_subtotal, dp='Amount', currency_obj=o.currency_id) ]]</para>
260 </td>260 </td>
261 </tr>261 </tr>
262 </blockTable>262 </blockTable>
@@ -272,7 +272,7 @@
272 <para style="terp_default_9">Net Total:</para>272 <para style="terp_default_9">Net Total:</para>
273 </td>273 </td>
274 <td>274 <td>
275 <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>275 <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Amount'), currency_obj=o.currency_id) ]]</para>
276 </td>276 </td>
277 </tr>277 </tr>
278 <tr>278 <tr>
@@ -285,7 +285,7 @@
285 <para style="terp_default_9">Taxes:</para>285 <para style="terp_default_9">Taxes:</para>
286 </td>286 </td>
287 <td>287 <td>
288 <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.currency_id) ]]</para>288 <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Amount', currency_obj=o.currency_id) ]]</para>
289 </td>289 </td>
290 </tr>290 </tr>
291 <tr>291 <tr>
@@ -298,7 +298,7 @@
298 <para style="terp_tblheader_Details"><b>Total:</b></para>298 <para style="terp_tblheader_Details"><b>Total:</b></para>
299 </td>299 </td>
300 <td>300 <td>
301 <para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</b></para>301 <para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Amount'), currency_obj=o.currency_id) ]]</b></para>
302 </td>302 </td>
303 </tr>303 </tr>
304 </blockTable>304 </blockTable>
@@ -331,10 +331,10 @@
331 <para style="terp_default_8">[[ t.name ]]</para>331 <para style="terp_default_8">[[ t.name ]]</para>
332 </td>332 </td>
333 <td>333 <td>
334 <para style="terp_default_Right_8">[[ formatLang(t.base, dp='Account', currency_obj=o.currency_id) ]]</para>334 <para style="terp_default_Right_8">[[ formatLang(t.base, dp='Amount', currency_obj=o.currency_id) ]]</para>
335 </td>335 </td>
336 <td>336 <td>
337 <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>337 <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Amount'), currency_obj=o.currency_id) ]]</para>
338 </td>338 </td>
339 <td>339 <td>
340 <para style="terp_default_8">340 <para style="terp_default_8">
341341
=== modified file 'account/report/account_treasury_report.py'
--- account/report/account_treasury_report.py 2013-04-15 10:23:49 +0000
+++ account/report/account_treasury_report.py 2013-10-29 13:27:40 +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 2013-09-17 12:38:14 +0000
+++ account/res_config.py 2013-10-29 13:27:40 +0000
@@ -330,12 +330,12 @@
330 fiscalyear.create_period3(cr, uid, [fiscalyear_id])330 fiscalyear.create_period3(cr, uid, [fiscalyear_id])
331331
332 def get_default_dp(self, cr, uid, fields, context=None):332 def get_default_dp(self, cr, uid, fields, context=None):
333 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')333 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_amount')
334 return {'decimal_precision': dp.digits}334 return {'decimal_precision': dp.digits}
335335
336 def set_default_dp(self, cr, uid, ids, context=None):336 def set_default_dp(self, cr, uid, ids, context=None):
337 config = self.browse(cr, uid, ids[0], context)337 config = self.browse(cr, uid, ids[0], context)
338 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')338 dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_amount')
339 dp.write({'digits': config.decimal_precision})339 dp.write({'digits': config.decimal_precision})
340340
341 def onchange_analytic_accounting(self, cr, uid, ids, analytic_accounting, context=None):341 def onchange_analytic_accounting(self, cr, uid, ids, analytic_accounting, context=None):
342342
=== modified file 'account/test/price_accuracy00.yml'
--- account/test/price_accuracy00.yml 2012-11-29 22:26:45 +0000
+++ account/test/price_accuracy00.yml 2013-10-29 13:27:40 +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/wizard/account_reconcile.py'
--- account/wizard/account_reconcile.py 2013-04-18 10:39:07 +0000
+++ account/wizard/account_reconcile.py 2013-10-29 13:27:40 +0000
@@ -33,9 +33,9 @@
33 _description = 'Account move line reconcile'33 _description = 'Account move line reconcile'
34 _columns = {34 _columns = {
35 'trans_nbr': fields.integer('# of Transaction', readonly=True),35 'trans_nbr': fields.integer('# of Transaction', readonly=True),
36 'credit': fields.float('Credit amount', readonly=True, digits_compute=dp.get_precision('Account')),36 'credit': fields.float('Credit amount', readonly=True, digits_compute=dp.get_precision('Amount')),
37 'debit': fields.float('Debit amount', readonly=True, digits_compute=dp.get_precision('Account')),37 'debit': fields.float('Debit amount', readonly=True, digits_compute=dp.get_precision('Amount')),
38 'writeoff': fields.float('Write-Off amount', readonly=True, digits_compute=dp.get_precision('Account')),38 'writeoff': fields.float('Write-Off amount', readonly=True, digits_compute=dp.get_precision('Amount')),
39 }39 }
4040
41 def default_get(self, cr, uid, fields, context=None):41 def default_get(self, cr, uid, fields, context=None):
4242
=== modified file 'account/wizard/pos_box.py'
--- account/wizard/pos_box.py 2013-06-03 12:18:52 +0000
+++ account/wizard/pos_box.py 2013-10-29 13:27:40 +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 2013-10-03 11:12:22 +0000
+++ account_analytic_analysis/account_analytic_analysis.py 2013-10-29 13:27:40 +0000
@@ -48,10 +48,10 @@
48 'product_id': fields.many2one('product.product','Product',required=True),48 'product_id': fields.many2one('product.product','Product',required=True),
49 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),49 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
50 'name': fields.text('Description', required=True),50 'name': fields.text('Description', required=True),
51 'quantity': fields.float('Quantity', required=True),51 'quantity': fields.float('Quantity', required=True, digits_compute=dp.get_precision('Quantity')),
52 'uom_id': fields.many2one('product.uom', 'Unit of Measure',required=True),52 'uom_id': fields.many2one('product.uom', 'Unit of Measure',required=True),
53 'price_unit': fields.float('Unit Price', required=True),53 'price_unit': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Price')),
54 'price_subtotal': fields.function(_amount_line, string='Sub Total', type="float",digits_compute= dp.get_precision('Account')),54 'price_subtotal': fields.function(_amount_line, string='Sub Total', type="float",digits_compute= dp.get_precision('Amount')),
55 }55 }
56 _defaults = {56 _defaults = {
57 'quantity' : 1,57 '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 2013-04-18 10:39:07 +0000
+++ account_asset/account_asset.py 2013-10-29 13:27:40 +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'),
@@ -376,9 +376,9 @@
376 'sequence': fields.integer('Sequence', required=True),376 'sequence': fields.integer('Sequence', required=True),
377 'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True, ondelete='cascade'),377 'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True, ondelete='cascade'),
378 'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),378 'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),
379 'amount': fields.float('Current Depreciation', digits_compute=dp.get_precision('Account'), required=True),379 'amount': fields.float('Current Depreciation', digits_compute=dp.get_precision('Amount'), required=True),
380 'remaining_value': fields.float('Next Period Depreciation', digits_compute=dp.get_precision('Account'),required=True),380 'remaining_value': fields.float('Next Period Depreciation', digits_compute=dp.get_precision('Amount'),required=True),
381 'depreciated_value': fields.float('Amount Already Depreciated', required=True),381 'depreciated_value': fields.float('Amount Already Depreciated', digits_compute=dp.get_precision('Amount'), required=True),
382 'depreciation_date': fields.date('Depreciation Date', select=1),382 'depreciation_date': fields.date('Depreciation Date', select=1),
383 'move_id': fields.many2one('account.move', 'Depreciation Entry'),383 'move_id': fields.many2one('account.move', 'Depreciation Entry'),
384 'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True)384 'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True)
385385
=== modified file 'account_bank_statement_extensions/account_bank_statement.py'
--- account_bank_statement_extensions/account_bank_statement.py 2013-04-15 10:23:49 +0000
+++ account_bank_statement_extensions/account_bank_statement.py 2013-10-29 13:27:40 +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 2013-04-15 10:23:49 +0000
+++ account_budget/account_budget.py 2013-10-29 13:27:40 +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/report/budget_report.rml'
--- account_budget/report/budget_report.rml 2011-12-21 09:08:11 +0000
+++ account_budget/report/budget_report.rml 2013-10-29 13:27:40 +0000
@@ -148,13 +148,13 @@
148 <para style="terp_default_9"><font color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ a['name'] ]]</para>148 <para style="terp_default_9"><font color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ a['name'] ]]</para>
149 </td>149 </td>
150 <td>150 <td>
151 <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>151 <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
152 </td>152 </td>
153 <td>153 <td>
154 <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>154 <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['pln'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
155 </td>155 </td>
156 <td>156 <td>
157 <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>157 <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['prac'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
158 </td>158 </td>
159 <td>159 <td>
160 <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['perc'], digits=2) ]]%</para>160 <para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['perc'], digits=2) ]]%</para>
@@ -168,13 +168,13 @@
168 <para style="terp_default_Bold_9"><font face="Helvetica">[[ repeatIn(funct_total(data['form']),'b') ]]</font>Total:</para>168 <para style="terp_default_Bold_9"><font face="Helvetica">[[ repeatIn(funct_total(data['form']),'b') ]]</font>Total:</para>
169 </td>169 </td>
170 <td>170 <td>
171 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] </para>171 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]] </para>
172 </td>172 </td>
173 <td>173 <td>
174 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>174 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
175 </td>175 </td>
176 <td>176 <td>
177 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>177 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], digits=get_digits(dp='Amount'), currency_obj=company.currency_id) ]]</para>
178 </td>178 </td>
179 <td>179 <td>
180 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_perc'], digits=2) ]]%</para>180 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_perc'], digits=2) ]]%</para>
181181
=== modified file 'account_budget/report/crossovered_budget_report.rml'
--- account_budget/report/crossovered_budget_report.rml 2011-12-21 09:08:11 +0000
+++ account_budget/report/crossovered_budget_report.rml 2013-10-29 13:27:40 +0000
@@ -163,13 +163,13 @@
163 <para style="terp_default_9"><font face="Helvetica" size="10.0" color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica" size="8.0">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ a['name'] ]]</para>163 <para style="terp_default_9"><font face="Helvetica" size="10.0" color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica" size="8.0">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ a['name'] ]]</para>
164 </td>164 </td>
165 <td>165 <td>
166 <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], dp='Account', currency_obj=company.currency_id) ]]</para>166 <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], dp='Amount', currency_obj=company.currency_id) ]]</para>
167 </td>167 </td>
168 <td>168 <td>
169 <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln'], dp='Account', currency_obj=company.currency_id) ]]</para>169 <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln'], dp='Amount', currency_obj=company.currency_id) ]]</para>
170 </td>170 </td>
171 <td>171 <td>
172 <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac'], dp='Account', currency_obj=company.currency_id) ]]</para>172 <para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac'], dp='Amount', currency_obj=company.currency_id) ]]</para>
173 </td>173 </td>
174 <td>174 <td>
175 <para style="terp_default_Centre_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['perc'],digits=2) ]]%</para>175 <para style="terp_default_Centre_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['perc'],digits=2) ]]%</para>
@@ -183,13 +183,13 @@
183 <para style="terp_tblheader_Details">[[ repeatIn(funct_total(data['form']),'b') ]] Total :</para>183 <para style="terp_tblheader_Details">[[ repeatIn(funct_total(data['form']),'b') ]] Total :</para>
184 </td>184 </td>
185 <td>185 <td>
186 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], dp='Account', currency_obj=company.currency_id) ]]</para>186 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_theo'], dp='Amount', currency_obj=company.currency_id) ]]</para>
187 </td>187 </td>
188 <td>188 <td>
189 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], dp='Account', currency_obj=company.currency_id) ]]</para>189 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_pln'], dp='Amount', currency_obj=company.currency_id) ]]</para>
190 </td>190 </td>
191 <td>191 <td>
192 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], dp='Account', currency_obj=company.currency_id) ]]</para>192 <para style="terp_default_Bold_right_9">[[ formatLang(b['tot_prac'], dp='Amount', currency_obj=company.currency_id) ]]</para>
193 </td>193 </td>
194 <td>194 <td>
195 <para style="terp_tblheader_Details_Centre">[[ formatLang(b['tot_perc'],digits=2) ]]%</para>195 <para style="terp_tblheader_Details_Centre">[[ formatLang(b['tot_perc'],digits=2) ]]%</para>
196196
=== modified file 'account_followup/account_followup.py'
--- account_followup/account_followup.py 2013-10-08 17:07:14 +0000
+++ account_followup/account_followup.py 2013-10-29 13:27:40 +0000
@@ -274,7 +274,7 @@
274 strbegin = "<TD><B>"274 strbegin = "<TD><B>"
275 strend = "</B></TD>"275 strend = "</B></TD>"
276 followup_table +="<TR>" + strbegin + str(aml['date']) + strend + strbegin + aml['name'] + strend + strbegin + aml['ref'] + strend + strbegin + str(date) + strend + strbegin + str(aml['balance']) + strend + strbegin + block + strend + "</TR>"276 followup_table +="<TR>" + strbegin + str(aml['date']) + strend + strbegin + aml['name'] + strend + strbegin + aml['ref'] + strend + strbegin + str(date) + strend + strbegin + str(aml['balance']) + strend + strbegin + block + strend + "</TR>"
277 total = rml_parse.formatLang(total, dp='Account', currency_obj=currency)277 total = rml_parse.formatLang(total, dp='Amount', currency_obj=currency)
278 followup_table += '''<tr> </tr>278 followup_table += '''<tr> </tr>
279 </table>279 </table>
280 <center>''' + _("Amount due") + ''' : %s </center>''' % (total)280 <center>''' + _("Amount due") + ''' : %s </center>''' % (total)
281281
=== modified file 'account_followup/wizard/account_followup_print.py'
--- account_followup/wizard/account_followup_print.py 2013-10-08 17:23:19 +0000
+++ account_followup/wizard/account_followup_print.py 2013-10-29 13:27:40 +0000
@@ -25,6 +25,8 @@
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
29
2830
29class account_followup_stat_by_partner(osv.osv):31class account_followup_stat_by_partner(osv.osv):
30 _name = "account_followup.stat.by.partner"32 _name = "account_followup.stat.by.partner"
@@ -38,7 +40,7 @@
38 'date_followup':fields.date('Latest follow-up', readonly=True),40 'date_followup':fields.date('Latest follow-up', readonly=True),
39 'max_followup_id': fields.many2one('account_followup.followup.line',41 'max_followup_id': fields.many2one('account_followup.followup.line',
40 'Max Follow Up Level', readonly=True, ondelete="cascade"),42 'Max Follow Up Level', readonly=True, ondelete="cascade"),
41 'balance':fields.float('Balance', readonly=True),43 'balance':fields.float('Balance', readonly=True, digits_compute=dp.get_precision('Amount')),
42 'company_id': fields.many2one('res.company', 'Company', readonly=True),44 'company_id': fields.many2one('res.company', 'Company', readonly=True),
43 }45 }
4446
4547
=== modified file 'account_payment/account_payment.py'
--- account_payment/account_payment.py 2013-04-15 10:23:49 +0000
+++ account_payment/account_payment.py 2013-10-29 13:27:40 +0000
@@ -23,6 +23,8 @@
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
27
2628
27_logger = logging.getLogger(__name__)29_logger = logging.getLogger(__name__)
2830
@@ -96,7 +98,7 @@
96 ('done', 'Done')], 'Status', select=True,98 ('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\'.'),99 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)]}),100 'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),
99 'total': fields.function(_total, string="Total", type='float'),101 '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)]}),102 'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done': [('readonly', True)]}),
101 'date_prefered': fields.selection([103 'date_prefered': fields.selection([
102 ('now', 'Directly'),104 ('now', 'Directly'),
@@ -307,7 +309,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 ?'"),309 '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.'),310 '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.'),311 '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),312 'amount_currency': fields.float('Amount in Partner Currency', digits_compute= dp.get_precision('Amount'),
311 required=True, help='Payment amount in the partner currency'),313 required=True, help='Payment amount in the partner currency'),
312 'currency': fields.many2one('res.currency','Partner Currency', required=True),314 'currency': fields.many2one('res.currency','Partner Currency', required=True),
313 'company_currency': fields.many2one('res.currency', 'Company Currency', readonly=True),315 'company_currency': fields.many2one('res.currency', 'Company Currency', readonly=True),
314316
=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py 2013-08-23 15:46:55 +0000
+++ account_voucher/account_voucher.py 2013-10-29 13:27:40 +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.'),
@@ -1182,7 +1182,7 @@
1182 ctx.update({1182 ctx.update({
1183 'voucher_special_currency_rate': voucher_currency.rate * voucher.payment_rate ,1183 'voucher_special_currency_rate': voucher_currency.rate * voucher.payment_rate ,
1184 'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False,})1184 'voucher_special_currency': voucher.payment_rate_currency_id and voucher.payment_rate_currency_id.id or False,})
1185 prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')1185 prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount')
1186 for line in voucher.line_ids:1186 for line in voucher.line_ids:
1187 #create one move line per voucher line where amount is not 0.01187 #create one move line per voucher line where amount is not 0.0
1188 # AND (second part of the clause) only if the original move line was not having debit = credit = 0 (which is a legal value)1188 # AND (second part of the clause) only if the original move line was not having debit = credit = 0 (which is a legal value)
@@ -1481,16 +1481,16 @@
1481 'name':fields.char('Description', size=256),1481 'name':fields.char('Description', size=256),
1482 'account_id':fields.many2one('account.account','Account', required=True),1482 'account_id':fields.many2one('account.account','Account', required=True),
1483 'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'),1483 'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'),
1484 'untax_amount':fields.float('Untax Amount'),1484 'untax_amount':fields.float('Untax Amount', digits_compute=dp.get_precision('Amount')),
1485 'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')),1485 'amount':fields.float('Amount', digits_compute=dp.get_precision('Amount')),
1486 'reconcile': fields.boolean('Full Reconcile'),1486 'reconcile': fields.boolean('Full Reconcile'),
1487 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'),1487 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'),
1488 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),1488 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
1489 'move_line_id': fields.many2one('account.move.line', 'Journal Item'),1489 'move_line_id': fields.many2one('account.move.line', 'Journal Item'),
1490 'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1),1490 'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1),
1491 'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),1491 'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),
1492 'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True, digits_compute=dp.get_precision('Account')),1492 'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True, digits_compute=dp.get_precision('Amount')),
1493 'amount_unreconciled': fields.function(_compute_balance, multi='dc', type='float', string='Open Balance', store=True, digits_compute=dp.get_precision('Account')),1493 'amount_unreconciled': fields.function(_compute_balance, multi='dc', type='float', string='Open Balance', store=True, digits_compute=dp.get_precision('Amount')),
1494 'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True, readonly=True),1494 'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True, readonly=True),
1495 'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency', readonly=True),1495 'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency', readonly=True),
1496 }1496 }
14971497
=== modified file 'analytic/analytic.py'
--- analytic/analytic.py 2013-09-10 12:48:03 +0000
+++ analytic/analytic.py 2013-10-29 13:27:40 +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'),
@@ -315,7 +315,7 @@
315 _columns = {315 _columns = {
316 'name': fields.char('Description', size=256, required=True),316 'name': fields.char('Description', size=256, required=True),
317 'date': fields.date('Date', required=True, select=True),317 'date': fields.date('Date', required=True, select=True),
318 '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')),318 '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')),
319 'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),319 'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
320 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='restrict', select=True, domain=[('type','<>','view')]),320 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='restrict', select=True, domain=[('type','<>','view')]),
321 'user_id': fields.many2one('res.users', 'User'),321 'user_id': fields.many2one('res.users', 'User'),
322322
=== modified file 'analytic_contract_hr_expense/analytic_contract_hr_expense.py'
--- analytic_contract_hr_expense/analytic_contract_hr_expense.py 2013-04-29 15:14:10 +0000
+++ analytic_contract_hr_expense/analytic_contract_hr_expense.py 2013-10-29 13:27:40 +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, context=None):118 def on_change_template(self, cr, uid, id, template_id, context=None):
119119
=== modified file 'analytic_user_function/analytic_user_function.py'
--- analytic_user_function/analytic_user_function.py 2013-08-23 15:46:55 +0000
+++ analytic_user_function/analytic_user_function.py 2013-10-29 13:27:40 +0000
@@ -31,7 +31,7 @@
31 'product_id': fields.many2one("product.product", "Service", required=True,),31 'product_id': fields.many2one("product.product", "Service", required=True,),
32 'account_id': fields.many2one("account.analytic.account", "Analytic Account", required=True,),32 'account_id': fields.many2one("account.analytic.account", "Analytic Account", required=True,),
33 'uom_id': fields.related("product_id", "uom_id", relation="product.uom", string="Unit of Measure", type="many2one", readonly=True),33 'uom_id': fields.related("product_id", "uom_id", relation="product.uom", string="Unit of Measure", type="many2one", readonly=True),
34 'price': fields.float('Price', digits_compute=dp.get_precision('Product Price'), help="Price per hour for this user.", required=True),34 'price': fields.float('Price', digits_compute=dp.get_precision('Price'), help="Price per hour for this user.", required=True),
35 }35 }
36 def onchange_user_product_id(self, cr, uid, ids, user_id, product_id, context=None):36 def onchange_user_product_id(self, cr, uid, ids, user_id, product_id, context=None):
37 if not user_id:37 if not user_id:
3838
=== modified file 'decimal_precision/__openerp__.py'
--- decimal_precision/__openerp__.py 2012-11-29 22:26:45 +0000
+++ decimal_precision/__openerp__.py 2013-10-29 13:27:40 +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 2013-10-29 13:27:40 +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 2013-04-15 10:23:49 +0000
+++ delivery/delivery.py 2013-10-29 13:27:40 +0000
@@ -236,8 +236,8 @@
236 'max_value': fields.float('Maximum Value', required=True),236 'max_value': fields.float('Maximum Value', required=True),
237 'price_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Price Type', required=True),237 'price_type': fields.selection([('fixed','Fixed'),('variable','Variable')], 'Price Type', required=True),
238 'variable_factor': fields.selection([('weight','Weight'),('volume','Volume'),('wv','Weight * Volume'), ('price','Price')], 'Variable Factor', required=True),238 'variable_factor': fields.selection([('weight','Weight'),('volume','Volume'),('wv','Weight * Volume'), ('price','Price')], 'Variable Factor', required=True),
239 'list_price': fields.float('Sale Price', digits_compute= dp.get_precision('Product Price'), required=True),239 'list_price': fields.float('Sale Price', digits_compute= dp.get_precision('Price'), required=True),
240 'standard_price': fields.float('Cost Price', digits_compute= dp.get_precision('Product Price'), required=True),240 'standard_price': fields.float('Cost Price', digits_compute= dp.get_precision('Price'), required=True),
241 }241 }
242 _defaults = {242 _defaults = {
243 'type': lambda *args: 'weight',243 'type': lambda *args: 'weight',
244244
=== modified file 'delivery/stock.py'
--- delivery/stock.py 2013-04-15 10:23:49 +0000
+++ delivery/stock.py 2013-10-29 13:27:40 +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 }),
@@ -200,12 +200,12 @@
200 _columns = {200 _columns = {
201 'carrier_id':fields.many2one("delivery.carrier","Carrier"),201 'carrier_id':fields.many2one("delivery.carrier","Carrier"),
202 'volume': fields.float('Volume'),202 'volume': fields.float('Volume'),
203 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',203 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
204 store={204 store={
205 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),205 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
206 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),206 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
207 }),207 }),
208 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',208 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
209 store={209 store={
210 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),210 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
211 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),211 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
@@ -224,12 +224,12 @@
224 return self.pool.get('stock.picking')._get_picking_line(cr, uid, ids, context=context)224 return self.pool.get('stock.picking')._get_picking_line(cr, uid, ids, context=context)
225225
226 _columns = {226 _columns = {
227 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',227 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
228 store={228 store={
229 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),229 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
230 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),230 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
231 }),231 }),
232 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',232 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Weight'), multi='_cal_weight',
233 store={233 store={
234 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),234 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
235 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),235 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
236236
=== modified file 'hr_contract/hr_contract.py'
--- hr_contract/hr_contract.py 2013-06-27 11:00:29 +0000
+++ hr_contract/hr_contract.py 2013-10-29 13:27:40 +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 2013-09-10 12:48:03 +0000
+++ hr_expense/hr_expense.py 2013-10-29 13:27:40 +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 }),
@@ -414,9 +414,9 @@
414 'name': fields.char('Expense Note', size=128, required=True),414 'name': fields.char('Expense Note', size=128, required=True),
415 'date_value': fields.date('Date', required=True),415 'date_value': fields.date('Date', required=True),
416 'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),416 'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),
417 'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Account')),417 'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Amount')),
418 'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Product Price')),418 'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Price')),
419 'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Product Unit of Measure')),419 'unit_quantity': fields.float('Quantities', digits_compute= dp.get_precision('Quantity')),
420 'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),420 'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),
421 'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True),421 'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True),
422 'description': fields.text('Description'),422 'description': fields.text('Description'),
423423
=== modified file 'hr_expense/report/hr_expense_report.py'
--- hr_expense/report/hr_expense_report.py 2013-04-15 10:23:49 +0000
+++ hr_expense/report/hr_expense_report.py 2013-10-29 13:27:40 +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 2013-04-29 15:14:10 +0000
+++ hr_payroll/hr_payroll.py 2013-10-29 13:27:40 +0000
@@ -748,7 +748,7 @@
748 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade', select=True),748 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade', select=True),
749 'sequence': fields.integer('Sequence', required=True, select=True),749 'sequence': fields.integer('Sequence', required=True, select=True),
750 'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"),750 'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"),
751 '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."),751 '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."),
752 'contract_id': fields.many2one('hr.contract', 'Contract', required=True, help="The contract for which applied this input"),752 'contract_id': fields.many2one('hr.contract', 'Contract', required=True, help="The contract for which applied this input"),
753 }753 }
754 _order = 'payslip_id, sequence'754 _order = 'payslip_id, sequence'
@@ -781,8 +781,8 @@
781 ('fix','Fixed Amount'),781 ('fix','Fixed Amount'),
782 ('code','Python Code'),782 ('code','Python Code'),
783 ],'Amount Type', select=True, required=True, help="The computation method for the rule amount."),783 ],'Amount Type', select=True, required=True, help="The computation method for the rule amount."),
784 'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Payroll'),),784 'amount_fix': fields.float('Fixed Amount', digits_compute=dp.get_precision('Amount')),
785 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Payroll Rate'), help='For example, enter 50.0 to apply a percentage of 50%'),785 'amount_percentage': fields.float('Percentage (%)', digits_compute=dp.get_precision('Amount'), help='For example, enter 50.0 to apply a percentage of 50%'),
786 'amount_python_compute':fields.text('Python Code'),786 'amount_python_compute':fields.text('Python Code'),
787 'amount_percentage_base':fields.char('Percentage based on',size=1024, required=False, readonly=False, help='result will be affected to a variable'),787 'amount_percentage_base':fields.char('Percentage based on',size=1024, required=False, readonly=False, help='result will be affected to a variable'),
788 'child_ids':fields.one2many('hr.salary.rule', 'parent_rule_id', 'Child Salary Rule'),788 'child_ids':fields.one2many('hr.salary.rule', 'parent_rule_id', 'Child Salary Rule'),
@@ -931,10 +931,10 @@
931 'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True),931 'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True),
932 'employee_id':fields.many2one('hr.employee', 'Employee', required=True),932 'employee_id':fields.many2one('hr.employee', 'Employee', required=True),
933 'contract_id':fields.many2one('hr.contract', 'Contract', required=True, select=True),933 'contract_id':fields.many2one('hr.contract', 'Contract', required=True, select=True),
934 'rate': fields.float('Rate (%)', digits_compute=dp.get_precision('Payroll Rate')),934 'rate': fields.float('Rate (%)', digits_compute=dp.get_precision('Price')),
935 'amount': fields.float('Amount', digits_compute=dp.get_precision('Payroll')),935 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')),
936 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Payroll')),936 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
937 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Payroll'),store=True ),937 'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Amount'),store=True ),
938 }938 }
939939
940 _defaults = {940 _defaults = {
@@ -972,7 +972,7 @@
972972
973 _columns = {973 _columns = {
974 'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True),974 'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True),
975 '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."),975 '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."),
976 }976 }
977977
978978
979979
=== 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 2013-10-29 13:27:40 +0000
@@ -77,18 +77,5 @@
77 <field name="company_id" ref="base.main_company"/>77 <field name="company_id" ref="base.main_company"/>
78 </record>78 </record>
7979
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>80 </data>
94</openerp>81</openerp>
9582
=== modified file 'hr_recruitment/report/hr_recruitment_report.py'
--- hr_recruitment/report/hr_recruitment_report.py 2013-08-19 09:31:36 +0000
+++ hr_recruitment/report/hr_recruitment_report.py 2013-10-29 13:27:40 +0000
@@ -53,10 +53,10 @@
53 'type_id': fields.many2one('hr.recruitment.degree', 'Degree'),53 'type_id': fields.many2one('hr.recruitment.degree', 'Degree'),
54 'department_id': fields.many2one('hr.department','Department',readonly=True),54 'department_id': fields.many2one('hr.department','Department',readonly=True),
55 'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'),55 'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'),
56 'salary_prop' : fields.float("Salary Proposed", digits_compute=dp.get_precision('Account')),56 'salary_prop' : fields.float("Salary Proposed", digits_compute=dp.get_precision('Amount')),
57 'salary_prop_avg' : fields.float("Avg. Proposed Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),57 'salary_prop_avg' : fields.float("Avg. Proposed Salary", group_operator="avg", digits_compute=dp.get_precision('Amount')),
58 'salary_exp' : fields.float("Salary Expected", digits_compute=dp.get_precision('Account')),58 'salary_exp' : fields.float("Salary Expected", digits_compute=dp.get_precision('Amount')),
59 'salary_exp_avg' : fields.float("Avg. Expected Salary", group_operator="avg", digits_compute=dp.get_precision('Account')),59 'salary_exp_avg' : fields.float("Avg. Expected Salary", group_operator="avg", digits_compute=dp.get_precision('Amount')),
60 'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),60 'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),
61 'available': fields.float("Availability"),61 'available': fields.float("Availability"),
62 'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",62 'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",
6363
=== modified file 'hr_timesheet_invoice/report/report_analytic.py'
--- hr_timesheet_invoice/report/report_analytic.py 2013-04-15 10:23:49 +0000
+++ hr_timesheet_invoice/report/report_analytic.py 2013-10-29 13:27:40 +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 2013-04-15 10:23:49 +0000
+++ hr_timesheet_sheet/report/hr_timesheet_report.py 2013-10-29 13:27:40 +0000
@@ -42,7 +42,7 @@
42 'user_id': fields.many2one('res.users', 'User',readonly=True),42 'user_id': fields.many2one('res.users', 'User',readonly=True),
43 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),43 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
44 'company_id': fields.many2one('res.company', 'Company',readonly=True),44 'company_id': fields.many2one('res.company', 'Company',readonly=True),
45 'cost': fields.float('Cost',readonly=True, digits_compute=dp.get_precision('Account')),45 'cost': fields.float('Cost',readonly=True, digits_compute=dp.get_precision('Amount')),
46 'quantity': fields.float('Time',readonly=True),46 'quantity': fields.float('Time',readonly=True),
47 }47 }
4848
4949
=== modified file 'l10n_be_hr_payroll/l10n_be_hr_payroll.py'
--- l10n_be_hr_payroll/l10n_be_hr_payroll.py 2013-04-15 10:23:49 +0000
+++ l10n_be_hr_payroll/l10n_be_hr_payroll.py 2013-10-29 13:27:40 +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-03-27 11:49:36 +0000
+++ l10n_br/account.py 2013-10-29 13:27:40 +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-04-15 10:23:49 +0000
+++ l10n_fr_hr_payroll/l10n_fr_hr_payroll.py 2013-10-29 13:27:40 +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-06-27 07:09:42 +0000
+++ l10n_in_hr_payroll/l10n_in_hr_payroll.py 2013-10-29 13:27:40 +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-08-23 14:31:14 +0000
+++ lunch/lunch.py 2013-10-29 13:27:40 +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-04-15 10:23:49 +0000
+++ marketing_campaign/marketing_campaign.py 2013-10-29 13:27:40 +0000
@@ -119,7 +119,7 @@
119 'Status',),119 'Status',),
120 'activity_ids': fields.one2many('marketing.campaign.activity',120 'activity_ids': fields.one2many('marketing.campaign.activity',
121 'campaign_id', 'Activities'),121 'campaign_id', 'Activities'),
122 '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')),122 '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')),
123 }123 }
124124
125 _defaults = {125 _defaults = {
@@ -432,8 +432,8 @@
432 'from_ids': fields.one2many('marketing.campaign.transition',432 'from_ids': fields.one2many('marketing.campaign.transition',
433 'activity_to_id',433 'activity_to_id',
434 'Previous Activities'),434 'Previous Activities'),
435 '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')),435 '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')),
436 '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')),436 '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')),
437 'signal': fields.char('Signal', size=128,437 'signal': fields.char('Signal', size=128,
438 help='An activity with a signal can be called programmatically. Be careful, the workitem is always created when a signal is sent'),438 help='An activity with a signal can be called programmatically. Be careful, the workitem is always created when a signal is sent'),
439 'keep_if_condition_not_met': fields.boolean("Don't Delete Workitems",439 'keep_if_condition_not_met': fields.boolean("Don't Delete Workitems",
440440
=== modified file 'marketing_campaign/report/campaign_analysis.py'
--- marketing_campaign/report/campaign_analysis.py 2013-04-15 10:23:49 +0000
+++ marketing_campaign/report/campaign_analysis.py 2013-10-29 13:27:40 +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-06-05 07:04:25 +0000
+++ membership/membership.py 2013-10-29 13:27:40 +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-04-15 10:23:49 +0000
+++ membership/report/report_membership.py 2013-10-29 13:27:40 +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-04-15 10:23:49 +0000
+++ membership/wizard/membership_invoice.py 2013-10-29 13:27:40 +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 2013-10-03 11:12:22 +0000
+++ mrp/mrp.py 2013-10-29 13:27:40 +0000
@@ -203,9 +203,9 @@
203 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bills of material."),203 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bills of material."),
204 'position': fields.char('Internal Reference', size=64, help="Reference to a position in an external plan."),204 'position': fields.char('Internal Reference', size=64, help="Reference to a position in an external plan."),
205 'product_id': fields.many2one('product.product', 'Product', required=True),205 'product_id': fields.many2one('product.product', 'Product', required=True),
206 'product_uos_qty': fields.float('Product UOS Qty'),206 'product_uos_qty': fields.float('Product UOS Qty', digits_compute= dp.get_precision('Quantity')),
207 '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_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."),
208 'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Product Unit of Measure')),208 'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Quantity')),
209 '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_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"),
210 'product_rounding': fields.float('Product Rounding', help="Rounding applied on the product quantity."),210 'product_rounding': fields.float('Product Rounding', help="Rounding applied on the product quantity."),
211 'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% within the production process."),211 'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% within the production process."),
@@ -444,9 +444,9 @@
444 select=True, readonly=True, states=dict.fromkeys(['draft', 'confirmed'], [('readonly', False)])),444 select=True, readonly=True, states=dict.fromkeys(['draft', 'confirmed'], [('readonly', False)])),
445445
446 'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft': [('readonly', False)]}),446 'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft': [('readonly', False)]}),
447 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True, readonly=True, states={'draft':[('readonly',False)]}),447 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Quantity'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
448 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, readonly=True, states={'draft': [('readonly', False)]}),448 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, readonly=True, states={'draft': [('readonly', False)]}),
449 'product_uos_qty': fields.float('Product UoS Quantity', readonly=True, states={'draft': [('readonly', False)]}),449 'product_uos_qty': fields.float('Product UoS Quantity', digits_compute= dp.get_precision('Quantity'), readonly=True, states={'draft': [('readonly', False)]}),
450 'product_uos': fields.many2one('product.uom', 'Product UoS', readonly=True, states={'draft': [('readonly', False)]}),450 'product_uos': fields.many2one('product.uom', 'Product UoS', readonly=True, states={'draft': [('readonly', False)]}),
451 'progress': fields.function(_get_progress, type='float',451 'progress': fields.function(_get_progress, type='float',
452 string='Production progress'),452 string='Production progress'),
@@ -1093,9 +1093,9 @@
1093 _columns = {1093 _columns = {
1094 'name': fields.char('Name', size=64, required=True),1094 'name': fields.char('Name', size=64, required=True),
1095 'product_id': fields.many2one('product.product', 'Product', required=True),1095 'product_id': fields.many2one('product.product', 'Product', required=True),
1096 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),1096 'product_qty': fields.float('Product Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
1097 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),1097 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
1098 'product_uos_qty': fields.float('Product UOS Quantity'),1098 'product_uos_qty': fields.float('Product UOS Quantity', digits_compute= dp.get_precision('Quantity')),
1099 'product_uos': fields.many2one('product.uom', 'Product UOS'),1099 'product_uos': fields.many2one('product.uom', 'Product UOS'),
1100 'production_id': fields.many2one('mrp.production', 'Production Order', select=True),1100 'production_id': fields.many2one('mrp.production', 'Production Order', select=True),
1101 }1101 }
11021102
=== modified file 'mrp/report/price.py'
--- mrp/report/price.py 2013-03-27 13:47:02 +0000
+++ mrp/report/price.py 2013-10-29 13:27:40 +0000
@@ -139,7 +139,7 @@
139 </row>139 </row>
140 """ % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Unit of Measure'), _('Supplier Price per Unit of Measure'))140 """ % (_('Components'), _('Components suppliers'), _('Quantity'),_('Cost Price per Unit of Measure'), _('Supplier Price per Unit of Measure'))
141141
142 purchase_price_digits = rml_obj.get_digits(dp='Product Price')142 purchase_price_digits = rml_obj.get_digits(dp='Price')
143143
144 for product in product_pool.browse(cr, uid, ids, context=context):144 for product in product_pool.browse(cr, uid, ids, context=context):
145 product_uom_name = to_xml(product.uom_id.name)145 product_uom_name = to_xml(product.uom_id.name)
146146
=== modified file 'mrp/wizard/change_production_qty.py'
--- mrp/wizard/change_production_qty.py 2013-04-15 10:23:49 +0000
+++ mrp/wizard/change_production_qty.py 2013-10-29 13:27:40 +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-04-15 10:23:49 +0000
+++ mrp/wizard/mrp_product_produce.py 2013-10-29 13:27:40 +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-04-15 10:23:49 +0000
+++ mrp_byproduct/mrp_byproduct.py 2013-10-29 13:27:40 +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 2013-04-15 10:23:49 +0000
+++ mrp_operations/report/mrp_workorder_analysis.py 2013-10-29 13:27:40 +0000
@@ -35,7 +35,7 @@
35 'nbr': fields.integer('# of Lines', readonly=True),35 'nbr': fields.integer('# of Lines', readonly=True),
36 'date': fields.date('Date', readonly=True),36 'date': fields.date('Date', readonly=True),
37 'product_id': fields.many2one('product.product', 'Product', readonly=True),37 'product_id': fields.many2one('product.product', 'Product', readonly=True),
38 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True),38 'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Quantity'), readonly=True),
39 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')],'Status', readonly=True),39 'state': fields.selection([('draft','Draft'),('startworking', 'In Progress'),('pause','Pause'),('cancel','Cancelled'),('done','Finished')],'Status', readonly=True),
40 'total_hours': fields.float('Total Hours', readonly=True),40 'total_hours': fields.float('Total Hours', readonly=True),
41 'total_cycles': fields.float('Total Cycles', readonly=True),41 'total_cycles': fields.float('Total Cycles', readonly=True),
4242
=== modified file 'mrp_repair/mrp_repair.py'
--- mrp_repair/mrp_repair.py 2013-10-18 12:58:18 +0000
+++ mrp_repair/mrp_repair.py 2013-10-29 13:27:40 +0000
@@ -158,17 +158,17 @@
158 '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)]}),158 '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)]}),
159 'invoiced': fields.boolean('Invoiced', readonly=True),159 'invoiced': fields.boolean('Invoiced', readonly=True),
160 'repaired': fields.boolean('Repaired', readonly=True),160 'repaired': fields.boolean('Repaired', readonly=True),
161 'amount_untaxed': fields.function(_amount_untaxed, string='Untaxed Amount',161 'amount_untaxed': fields.function(_amount_untaxed, string='Untaxed Amount', digits_compute=dp.get_precision('Amount'),
162 store={162 store={
163 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),163 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),
164 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),164 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
165 }),165 }),
166 'amount_tax': fields.function(_amount_tax, string='Taxes',166 'amount_tax': fields.function(_amount_tax, string='Taxes', digits_compute=dp.get_precision('Amount'),
167 store={167 store={
168 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),168 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),
169 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),169 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
170 }),170 }),
171 'amount_total': fields.function(_amount_total, string='Total',171 'amount_total': fields.function(_amount_total, string='Total', digits_compute=dp.get_precision('Amount'),
172 store={172 store={
173 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),173 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),
174 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),174 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
@@ -636,10 +636,10 @@
636 'to_invoice': fields.boolean('To Invoice'),636 'to_invoice': fields.boolean('To Invoice'),
637 'product_id': fields.many2one('product.product', 'Product', required=True),637 'product_id': fields.many2one('product.product', 'Product', required=True),
638 'invoiced': fields.boolean('Invoiced',readonly=True),638 'invoiced': fields.boolean('Invoiced',readonly=True),
639 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),639 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
640 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),640 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Amount')),
641 'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),641 'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),
642 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),642 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True),
643 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),643 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
644 'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number',domain="[('product_id','=',product_id)]"),644 'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number',domain="[('product_id','=',product_id)]"),
645 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),645 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
@@ -729,10 +729,10 @@
729 'repair_id': fields.many2one('mrp.repair', 'Repair Order Reference', required=True, ondelete='cascade', select=True),729 'repair_id': fields.many2one('mrp.repair', 'Repair Order Reference', required=True, ondelete='cascade', select=True),
730 'name': fields.char('Description', size=64, select=True,required=True),730 'name': fields.char('Description', size=64, select=True,required=True),
731 'product_id': fields.many2one('product.product', 'Product'),731 'product_id': fields.many2one('product.product', 'Product'),
732 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product Unit of Measure'), required=True),732 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True),
733 'price_unit': fields.float('Unit Price', required=True),733 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Price'), required=True),
734 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),734 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
735 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Account')),735 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Amount')),
736 'tax_id': fields.many2many('account.tax', 'repair_fee_line_tax', 'repair_fee_line_id', 'tax_id', 'Taxes'),736 'tax_id': fields.many2many('account.tax', 'repair_fee_line_tax', 'repair_fee_line_id', 'tax_id', 'Taxes'),
737 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),737 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
738 'to_invoice': fields.boolean('To Invoice'),738 'to_invoice': fields.boolean('To Invoice'),
739739
=== modified file 'mrp_repair/report/order.rml'
--- mrp_repair/report/order.rml 2012-11-29 22:26:45 +0000
+++ mrp_repair/report/order.rml 2013-10-29 13:27:40 +0000
@@ -367,7 +367,7 @@
367 <para style="terp_default_9">Taxes:</para>367 <para style="terp_default_9">Taxes:</para>
368 </td>368 </td>
369 <td>369 <td>
370 <para style="P26">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</para>370 <para style="P26">[[ formatLang(o.amount_tax, dp='Amount', currency_obj=o.pricelist_id.currency_id) ]]</para>
371 </td>371 </td>
372 </tr>372 </tr>
373 <tr>373 <tr>
374374
=== modified file 'point_of_sale/point_of_sale.py'
--- point_of_sale/point_of_sale.py 2013-10-18 12:58:18 +0000
+++ point_of_sale/point_of_sale.py 2013-10-29 13:27:40 +0000
@@ -230,13 +230,13 @@
230230
231 'cash_register_balance_end_real' : fields.related('cash_register_id', 'balance_end_real',231 'cash_register_balance_end_real' : fields.related('cash_register_id', 'balance_end_real',
232 type='float',232 type='float',
233 digits_compute=dp.get_precision('Account'),233 digits_compute=dp.get_precision('Amount'),
234 string="Ending Balance",234 string="Ending Balance",
235 help="Computed using the cash control lines",235 help="Computed using the cash control lines",
236 readonly=True),236 readonly=True),
237 'cash_register_balance_start' : fields.related('cash_register_id', 'balance_start',237 'cash_register_balance_start' : fields.related('cash_register_id', 'balance_start',
238 type='float',238 type='float',
239 digits_compute=dp.get_precision('Account'),239 digits_compute=dp.get_precision('Amount'),
240 string="Starting Balance",240 string="Starting Balance",
241 help="Computed using the cash control at the opening.",241 help="Computed using the cash control at the opening.",
242 readonly=True),242 readonly=True),
@@ -245,7 +245,7 @@
245 readonly=True),245 readonly=True),
246 'cash_register_balance_end' : fields.related('cash_register_id', 'balance_end',246 'cash_register_balance_end' : fields.related('cash_register_id', 'balance_end',
247 type='float',247 type='float',
248 digits_compute=dp.get_precision('Account'),248 digits_compute=dp.get_precision('Amount'),
249 string="Computed Balance",249 string="Computed Balance",
250 help="Computed with the initial cash control and the sum of all payments.",250 help="Computed with the initial cash control and the sum of all payments.",
251 readonly=True),251 readonly=True),
@@ -621,10 +621,10 @@
621 'warehouse_id': fields.related('session_id', 'config_id', 'warehouse_id', relation='stock.warehouse', type='many2one', string='Warehouse', store=True, readonly=True),621 'warehouse_id': fields.related('session_id', 'config_id', 'warehouse_id', relation='stock.warehouse', type='many2one', string='Warehouse', store=True, readonly=True),
622 'date_order': fields.datetime('Order Date', readonly=True, select=True),622 'date_order': fields.datetime('Order Date', readonly=True, select=True),
623 '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."),623 '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."),
624 'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),624 'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Amount'), multi='all'),
625 'amount_total': fields.function(_amount_all, string='Total', multi='all'),625 'amount_total': fields.function(_amount_all, string='Total', digits_compute=dp.get_precision('Amount'), multi='all'),
626 'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, digits_compute=dp.get_precision('Point Of Sale'), multi='all'),626 'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, digits_compute=dp.get_precision('Amount'), multi='all'),
627 'amount_return': fields.function(_amount_all, 'Returned', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),627 'amount_return': fields.function(_amount_all, 'Returned', digits_compute=dp.get_precision('Amount'), multi='all'),
628 'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True),628 'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True),
629 'statement_ids': fields.one2many('account.bank.statement.line', 'pos_statement_id', 'Payments', states={'draft': [('readonly', False)]}, readonly=True),629 'statement_ids': fields.one2many('account.bank.statement.line', 'pos_statement_id', 'Payments', states={'draft': [('readonly', False)]}, readonly=True),
630 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),630 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),
@@ -1229,11 +1229,11 @@
1229 'name': fields.char('Line No', size=32, required=True),1229 'name': fields.char('Line No', size=32, required=True),
1230 'notice': fields.char('Discount Notice', size=128),1230 'notice': fields.char('Discount Notice', size=128),
1231 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True, change_default=True),1231 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True, change_default=True),
1232 'price_unit': fields.float(string='Unit Price', digits=(16, 2)),1232 'price_unit': fields.float(string='Unit Price', digits_compute=dp.get_precision('Price')),
1233 'qty': fields.float('Quantity', digits=(16, 2)),1233 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
1234 'price_subtotal': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal w/o Tax', store=True),1234 'price_subtotal': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal w/o Tax', store=True),
1235 'price_subtotal_incl': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal', store=True),1235 'price_subtotal_incl': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal', store=True),
1236 'discount': fields.float('Discount (%)', digits=(16, 2)),1236 'discount': fields.float('Discount (%)', digits_compute=dp.get_precision('Price')),
1237 'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'),1237 'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'),
1238 'create_date': fields.datetime('Creation Date', readonly=True),1238 'create_date': fields.datetime('Creation Date', readonly=True),
1239 }1239 }
12401240
=== modified file 'point_of_sale/report/account_statement.rml'
--- point_of_sale/report/account_statement.rml 2012-11-29 22:26:45 +0000
+++ point_of_sale/report/account_statement.rml 2013-10-29 13:27:40 +0000
@@ -214,10 +214,10 @@
214 <para style="terp_default_Centre_8">[[ formatLang(statement.closing_date,date_time=True)]]</para>214 <para style="terp_default_Centre_8">[[ formatLang(statement.closing_date,date_time=True)]]</para>
215 </td>215 </td>
216 <td>216 <td>
217 <para style="terp_default_Centre_8">[[ formatLang(statement.balance_start, dp='Account', currency_obj = company.currency_id) ]]</para>217 <para style="terp_default_Centre_8">[[ formatLang(statement.balance_start, dp='Amount', currency_obj = company.currency_id) ]]</para>
218 </td>218 </td>
219 <td>219 <td>
220 <para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real, dp='Account', currency_obj = company.currency_id) ]]</para>220 <para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real, dp='Amount', currency_obj = company.currency_id) ]]</para>
221 </td>221 </td>
222 </tr>222 </tr>
223 </blockTable>223 </blockTable>
@@ -250,7 +250,7 @@
250 <para style="terp_default_9">[[ line_ids.partner_id.name ]]</para>250 <para style="terp_default_9">[[ line_ids.partner_id.name ]]</para>
251 </td>251 </td>
252 <td>252 <td>
253 <para style="terp_default_Right_9">[[ formatLang(line_ids.amount, dp='Account', currency_obj=company.currency_id) ]]</para>253 <para style="terp_default_Right_9">[[ formatLang(line_ids.amount, dp='Amount', currency_obj=company.currency_id) ]]</para>
254 </td>254 </td>
255 </tr>255 </tr>
256 </blockTable>256 </blockTable>
@@ -267,7 +267,7 @@
267 <para style="terp_tblheader_Details">Total :</para>267 <para style="terp_tblheader_Details">Total :</para>
268 </td>268 </td>
269 <td>269 <td>
270 <para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement.line_ids), dp='Account', currency_obj = company.currency_id) ]]</para>270 <para style="terp_default_Right_9_Bold">[[ formatLang(get_total(statement.line_ids), dp='Amount', currency_obj = company.currency_id) ]]</para>
271 </td>271 </td>
272 </tr>272 </tr>
273 </blockTable>273 </blockTable>
274274
=== modified file 'point_of_sale/report/pos_details.rml'
--- point_of_sale/report/pos_details.rml 2012-11-29 22:26:45 +0000
+++ point_of_sale/report/pos_details.rml 2013-10-29 13:27:40 +0000
@@ -320,7 +320,7 @@
320 <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para>320 <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para>
321 </td>321 </td>
322 <td>322 <td>
323 <para style="terp_default_Right_9_Bold">[[ formatLang(p['sum'], dp='Account', currency_obj = company.currency_id) or removeParentNode('tr') ]]</para>323 <para style="terp_default_Right_9_Bold">[[ formatLang(p['sum'], dp='Amount', currency_obj = company.currency_id) or removeParentNode('tr') ]]</para>
324 </td>324 </td>
325 </tr>325 </tr>
326 </blockTable>326 </blockTable>
327327
=== modified file 'portal/acquirer.py'
--- portal/acquirer.py 2012-11-30 09:45:01 +0000
+++ portal/acquirer.py 2013-10-29 13:27:40 +0000
@@ -80,7 +80,7 @@
80 return ''80 return ''
81 else:81 else:
82 payment_header = _('Pay safely online')82 payment_header = _('Pay safely online')
83 amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Account'))83 amount_str = float_repr(amount, self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount'))
84 currency_str = currency.symbol or currency.name84 currency_str = currency.symbol or currency.name
85 amount = u"%s %s" % ((currency_str, amount_str) if currency.position == 'before' else (amount_str, currency_str))85 amount = u"%s %s" % ((currency_str, amount_str) if currency.position == 'before' else (amount_str, currency_str))
86 result = """<div class="payment_acquirers">86 result = """<div class="payment_acquirers">
8787
=== modified file 'procurement/procurement.py'
--- procurement/procurement.py 2013-10-21 14:53:34 +0000
+++ procurement/procurement.py 2013-10-29 13:27:40 +0000
@@ -92,9 +92,9 @@
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', digits_compute= dp.get_precision('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),
99 'move_id': fields.many2one('stock.move', 'Reservation', ondelete='set null'),99 'move_id': fields.many2one('stock.move', 'Reservation', ondelete='set null'),
100 'close_move': fields.boolean('Close Move at end'),100 'close_move': fields.boolean('Close Move at end'),
@@ -528,10 +528,10 @@
528 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade"),528 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade"),
529 'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type','!=','service')]),529 'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type','!=','service')]),
530 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),530 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
531 'product_min_qty': fields.float('Minimum Quantity', required=True,531 'product_min_qty': fields.float('Minimum Quantity', required=True, digits_compute=dp.get_precision('Quantity'),
532 help="When the virtual stock goes below the Min Quantity specified for this field, OpenERP generates "\532 help="When the virtual stock goes below the Min Quantity specified for this field, OpenERP generates "\
533 "a procurement to bring the forecasted quantity to the Max Quantity."),533 "a procurement to bring the forecasted quantity to the Max Quantity."),
534 'product_max_qty': fields.float('Maximum Quantity', required=True,534 'product_max_qty': fields.float('Maximum Quantity', required=True, digits_compute=dp.get_precision('Quantity'),
535 help="When the virtual stock goes below the Min Quantity, OpenERP generates "\535 help="When the virtual stock goes below the Min Quantity, OpenERP generates "\
536 "a procurement to bring the forecasted quantity to the Quantity specified as Max Quantity."),536 "a procurement to bring the forecasted quantity to the Quantity specified as Max Quantity."),
537 'qty_multiple': fields.integer('Qty Multiple', required=True,537 'qty_multiple': fields.integer('Qty Multiple', required=True,
538538
=== modified file 'product/pricelist.py'
--- product/pricelist.py 2013-09-23 17:13:10 +0000
+++ product/pricelist.py 2013-10-29 13:27:40 +0000
@@ -449,18 +449,18 @@
449 'base_pricelist_id': fields.many2one('product.pricelist', 'Other Pricelist'),449 'base_pricelist_id': fields.many2one('product.pricelist', 'Other Pricelist'),
450450
451 'price_surcharge': fields.float('Price Surcharge',451 'price_surcharge': fields.float('Price Surcharge',
452 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.'),452 digits_compute= dp.get_precision('Price'), help='Specify the fixed amount to add or substract(if negative) to the amount calculated with the discount.'),
453 'price_discount': fields.float('Price Discount', digits=(16,4)),453 'price_discount': fields.float('Price Discount', digits_compute=dp.get_precision('Price')),
454 'price_round': fields.float('Price Rounding',454 'price_round': fields.float('Price Rounding',
455 digits_compute= dp.get_precision('Product Price'),455 digits_compute= dp.get_precision('Price'),
456 help="Sets the price so that it is a multiple of this value.\n" \456 help="Sets the price so that it is a multiple of this value.\n" \
457 "Rounding is applied after the discount and before the surcharge.\n" \457 "Rounding is applied after the discount and before the surcharge.\n" \
458 "To have prices that end in 9.99, set rounding 10, surcharge -0.01" \458 "To have prices that end in 9.99, set rounding 10, surcharge -0.01" \
459 ),459 ),
460 'price_min_margin': fields.float('Min. Price Margin',460 'price_min_margin': fields.float('Min. Price Margin',
461 digits_compute= dp.get_precision('Product Price'), help='Specify the minimum amount of margin over the base price.'),461 digits_compute= dp.get_precision('Price'), help='Specify the minimum amount of margin over the base price.'),
462 'price_max_margin': fields.float('Max. Price Margin',462 'price_max_margin': fields.float('Max. Price Margin',
463 digits_compute= dp.get_precision('Product Price'), help='Specify the maximum amount of margin over the base price.'),463 digits_compute= dp.get_precision('Price'), help='Specify the maximum amount of margin over the base price.'),
464 'company_id': fields.related('price_version_id','company_id',type='many2one',464 'company_id': fields.related('price_version_id','company_id',type='many2one',
465 readonly=True, relation='res.company', string='Company', store=True)465 readonly=True, relation='res.company', string='Company', store=True)
466 }466 }
467467
=== modified file 'product/product.py'
--- product/product.py 2013-09-10 12:48:03 +0000
+++ product/product.py 2013-10-29 13:27:40 +0000
@@ -138,7 +138,7 @@
138 string='Ratio',138 string='Ratio',
139 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category:\n'\139 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category:\n'\
140 '1 * (this unit) = ratio * (reference unit)', required=True),140 '1 * (this unit) = ratio * (reference unit)', required=True),
141 'rounding': fields.float('Rounding Precision', digits_compute=dp.get_precision('Product Unit of Measure'), required=True,141 'rounding': fields.float('Rounding Precision', digits_compute=dp.get_precision('Quantity'), required=True,
142 help="The computed quantity will be a multiple of this value. "\142 help="The computed quantity will be a multiple of this value. "\
143 "Use 1.0 for a Unit of Measure that cannot be further split, such as a piece."),143 "Use 1.0 for a Unit of Measure that cannot be further split, such as a piece."),
144 'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."),144 'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."),
@@ -304,11 +304,11 @@
304 'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. In the case of multi-level BOM, the manufacturing lead times of the components will be added."),304 'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. In the case of multi-level BOM, the manufacturing lead times of the components will be added."),
305 'rental': fields.boolean('Can be Rent'),305 'rental': fields.boolean('Can be Rent'),
306 'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),306 'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
307 '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."),307 '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."),
308 'standard_price': fields.float('Cost', digits_compute=dp.get_precision('Product Price'), help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user"),308 'standard_price': fields.float('Cost', digits_compute=dp.get_precision('Price'), help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user"),
309 'volume': fields.float('Volume', help="The volume in m3."),309 'volume': fields.float('Volume', help="The volume in m3."),
310 'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."),310 'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Weight'), help="The gross weight in Kg."),
311 'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."),311 'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Weight'), help="The net weight in Kg."),
312 'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True,312 'cost_method': fields.selection([('standard','Standard Price'), ('average','Average Price')], 'Costing Method', required=True,
313 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."),313 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."),
314 'warranty': fields.float('Warranty'),314 'warranty': fields.float('Warranty'),
@@ -322,9 +322,7 @@
322 '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."),322 '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."),
323 'uos_id' : fields.many2one('product.uom', 'Unit of Sale',323 'uos_id' : fields.many2one('product.uom', 'Unit of Sale',
324 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.'),324 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.'),
325 'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Product UoS'),325 'uos_coeff': fields.float('Unit of Measure -> UOS Coeff', digits_compute= dp.get_precision('Quantity'), help='Coefficient to convert default Unit of Measure to Unit of Sale\n' ' uos = uom * coeff'),
326 help='Coefficient to convert default Unit of Measure to Unit of Sale\n'
327 ' uos = uom * coeff'),
328 'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'),326 'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'),
329 'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Supplier'),327 'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Supplier'),
330 'company_id': fields.many2one('res.company', 'Company', select=1),328 'company_id': fields.many2one('res.company', 'Company', select=1),
@@ -553,8 +551,8 @@
553 'virtual_available': fields.function(_product_virtual_available, type='float', string='Quantity Available'),551 'virtual_available': fields.function(_product_virtual_available, type='float', string='Quantity Available'),
554 'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'),552 'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'),
555 'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'),553 'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'),
556 'price': fields.function(_product_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')),554 'price': fields.function(_product_price, type='float', string='Price', digits_compute=dp.get_precision('Price')),
557 'lst_price' : fields.function(_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Product Price')),555 'lst_price' : fields.function(_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Price')),
558 'code': fields.function(_product_code, type='char', string='Internal Reference'),556 'code': fields.function(_product_code, type='char', string='Internal Reference'),
559 'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),557 'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),
560 'default_code' : fields.char('Internal Reference', size=64, select=True),558 'default_code' : fields.char('Internal Reference', size=64, select=True),
@@ -563,8 +561,8 @@
563 'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade", select=True),561 'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade", select=True),
564 'ean13': fields.char('EAN13 Barcode', size=13, help="International Article Number used for product identification."),562 'ean13': fields.char('EAN13 Barcode', size=13, help="International Article Number used for product identification."),
565 '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."),563 '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."),
566 'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Product Price')),564 'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Price')),
567 'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Product Price')),565 'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Price')),
568 'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),566 'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
569 'name_template': fields.related('product_tmpl_id', 'name', string="Template Name", type='char', size=128, store={567 'name_template': fields.related('product_tmpl_id', 'name', string="Template Name", type='char', size=128, store={
570 'product.template': (_get_name_template_ids, ['name'], 10),568 'product.template': (_get_name_template_ids, ['name'], 10),
@@ -778,8 +776,7 @@
778 _columns = {776 _columns = {
779 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of packaging."),777 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of packaging."),
780 'name' : fields.text('Description', size=64),778 'name' : fields.text('Description', size=64),
781 'qty' : fields.float('Quantity by Package',779 'qty' : fields.float('Quantity by Package', digits_compute=dp.get_precision('Quantity'), help="The total number of products you can put by pallet or box."),
782 help="The total number of products you can put by pallet or box."),
783 'ul' : fields.many2one('product.ul', 'Type of Package', required=True),780 'ul' : fields.many2one('product.ul', 'Type of Package', required=True),
784 'ul_qty' : fields.integer('Package by layer', help='The number of packages by layer'),781 'ul_qty' : fields.integer('Package by layer', help='The number of packages by layer'),
785 'rows' : fields.integer('Number of Layers', required=True,782 'rows' : fields.integer('Number of Layers', required=True,
@@ -789,9 +786,8 @@
789 help="The EAN code of the package unit."),786 help="The EAN code of the package unit."),
790 'code' : fields.char('Code', size=14,787 'code' : fields.char('Code', size=14,
791 help="The code of the transport unit."),788 help="The code of the transport unit."),
792 'weight': fields.float('Total Package Weight',789 'weight': fields.float('Total Package Weight', digits_compute=dp.get_precision('Weight'), help='The weight of a full package, pallet or box.'),
793 help='The weight of a full package, pallet or box.'),790 'weight_ul': fields.float('Empty Package Weight', digits_compute=dp.get_precision('Weight')),
794 'weight_ul': fields.float('Empty Package Weight'),
795 'height': fields.float('Height', help='The height of the package'),791 'height': fields.float('Height', help='The height of the package'),
796 'width': fields.float('Width', help='The width of the package'),792 'width': fields.float('Width', help='The width of the package'),
797 'length': fields.float('Length', help='The length of the package'),793 'length': fields.float('Length', help='The length of the package'),
@@ -855,8 +851,8 @@
855 'product_code': fields.char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."),851 'product_code': fields.char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."),
856 'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."),852 'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."),
857 'product_uom': fields.related('product_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier Unit of Measure", readonly="1", help="This comes from the product form."),853 'product_uom': fields.related('product_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier Unit of Measure", readonly="1", help="This comes from the product form."),
858 '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."),854 '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."),
859 '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."),855 '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."),
860 'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True),856 'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True),
861 '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."),857 '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."),
862 'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'),858 'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'),
@@ -914,8 +910,8 @@
914 _columns = {910 _columns = {
915 'name': fields.char('Description', size=64),911 'name': fields.char('Description', size=64),
916 'suppinfo_id': fields.many2one('product.supplierinfo', 'Partner Information', required=True, ondelete='cascade'),912 'suppinfo_id': fields.many2one('product.supplierinfo', 'Partner Information', required=True, ondelete='cascade'),
917 '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."),913 'min_quantity': fields.float('Quantity', required=True, digits_compute=dp.get_precision('Quantity'), help="The minimal quantity to trigger this rule, expressed in the supplier Unit of Measure if any or in the default Unit of Measure of the product otherrwise."),
918 '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"),914 '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"),
919 }915 }
920 _order = 'min_quantity asc'916 _order = 'min_quantity asc'
921917
@@ -923,7 +919,7 @@
923 _inherit = 'res.currency'919 _inherit = 'res.currency'
924920
925 def _check_main_currency_rounding(self, cr, uid, ids, context=None):921 def _check_main_currency_rounding(self, cr, uid, ids, context=None):
926 cr.execute('SELECT digits FROM decimal_precision WHERE name like %s',('Account',))922 cr.execute('SELECT digits FROM decimal_precision WHERE name like %s',('Amount',))
927 digits = cr.fetchone()923 digits = cr.fetchone()
928 if digits and len(digits):924 if digits and len(digits):
929 digits = digits[0]925 digits = digits[0]
@@ -942,7 +938,7 @@
942 _inherit = 'decimal.precision'938 _inherit = 'decimal.precision'
943939
944 def _check_main_currency_rounding(self, cr, uid, ids, context=None):940 def _check_main_currency_rounding(self, cr, uid, ids, context=None):
945 cr.execute('SELECT id, digits FROM decimal_precision WHERE name like %s',('Account',))941 cr.execute('SELECT id, digits FROM decimal_precision WHERE name like %s',('Amount',))
946 res = cr.fetchone()942 res = cr.fetchone()
947 if res and len(res):943 if res and len(res):
948 account_precision_id, digits = res944 account_precision_id, digits = res
949945
=== modified file 'product/product_data.xml'
--- product/product_data.xml 2013-02-01 13:24:54 +0000
+++ product/product_data.xml 2013-10-29 13:27:40 +0000
@@ -161,28 +161,20 @@
161 <field eval="'product.pricelist,'+str(ref('list0'))" name="value"/>161 <field eval="'product.pricelist,'+str(ref('list0'))" name="value"/>
162 </record>162 </record>
163163
164 <record forcecreate="True" id="decimal_price" model="decimal.precision">164 <record forcecreate="True" id="decimal_amount" model="decimal.precision">
165 <field name="name">Product Price</field>165 <field name="name">Amount</field>
166 <field name="digits">2</field>166 <field name="digits">2</field>
167 </record>167 </record>
168 <record forcecreate="True" id="decimal_discount" model="decimal.precision">168 <record forcecreate="True" id="decimal_weight" model="decimal.precision">
169 <field name="name">Discount</field>169 <field name="name">Weight</field>
170 <field name="digits">2</field>170 <field name="digits">2</field>
171 </record>171 </record>
172 <record forcecreate="True" id="decimal_account" model="decimal.precision">172 <record forcecreate="True" id="decimal_qty" model="decimal.precision">
173 <field name="name">Account</field>173 <field name="name">Quantity</field>
174 <field name="digits">2</field>
175 </record>
176 <record forcecreate="True" id="decimal_stock_weight" model="decimal.precision">
177 <field name="name">Stock Weight</field>
178 <field name="digits">2</field>
179 </record>
180 <record forcecreate="True" id="decimal_product_uom" model="decimal.precision">
181 <field name="name">Product Unit of Measure</field>
182 <field name="digits" eval="3"/>174 <field name="digits" eval="3"/>
183 </record>175 </record>
184 <record forcecreate="True" id="decimal_product_uos" model="decimal.precision">176 <record forcecreate="True" id="decimal_percentage" model="decimal.precision">
185 <field name="name">Product UoS</field>177 <field name="name">Percentage</field>
186 <field name="digits" eval="3"/>178 <field name="digits" eval="3"/>
187 </record> 179 </record>
188180
189181
=== modified file 'product/report/product_pricelist.py'
--- product/report/product_pricelist.py 2013-03-28 12:10:09 +0000
+++ product/report/product_pricelist.py 2013-10-29 13:27:40 +0000
@@ -110,7 +110,7 @@
110 return res110 return res
111111
112 def _get_price(self, pricelist_id, product_id, qty):112 def _get_price(self, pricelist_id, product_id, qty):
113 sale_price_digits = self.get_digits(dp='Product Price')113 sale_price_digits = self.get_digits(dp='Price')
114 pricelist = self.pool.get('product.pricelist').browse(self.cr, self.uid, [pricelist_id], context=self.localcontext)[0]114 pricelist = self.pool.get('product.pricelist').browse(self.cr, self.uid, [pricelist_id], context=self.localcontext)[0]
115 price_dict = self.pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext)115 price_dict = self.pool.get('product.pricelist').price_get(self.cr, self.uid, [pricelist_id], product_id, qty, context=self.localcontext)
116 if price_dict[pricelist_id]:116 if price_dict[pricelist_id]:
117117
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py 2013-10-18 12:58:18 +0000
+++ purchase/purchase.py 2013-10-29 13:27:40 +0000
@@ -208,15 +208,15 @@
208 'purchase.order.line': (_get_order, ['date_planned'], 10),208 'purchase.order.line': (_get_order, ['date_planned'], 10),
209 }209 }
210 ),210 ),
211 'amount_untaxed': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Untaxed Amount',211 'amount_untaxed': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Untaxed Amount',
212 store={212 store={
213 'purchase.order.line': (_get_order, None, 10),213 'purchase.order.line': (_get_order, None, 10),
214 }, multi="sums", help="The amount without tax", track_visibility='always'),214 }, multi="sums", help="The amount without tax", track_visibility='always'),
215 'amount_tax': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Taxes',215 'amount_tax': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Taxes',
216 store={216 store={
217 'purchase.order.line': (_get_order, None, 10),217 'purchase.order.line': (_get_order, None, 10),
218 }, multi="sums", help="The tax amount"),218 }, multi="sums", help="The tax amount"),
219 'amount_total': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Total',219 'amount_total': fields.function(_amount_all, digits_compute= dp.get_precision('Amount'), string='Total',
220 store={220 store={
221 'purchase.order.line': (_get_order, None, 10),221 'purchase.order.line': (_get_order, None, 10),
222 }, multi="sums",help="The total amount"),222 }, multi="sums",help="The total amount"),
@@ -853,15 +853,15 @@
853853
854 _columns = {854 _columns = {
855 'name': fields.text('Description', required=True),855 'name': fields.text('Description', required=True),
856 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), required=True),856 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), required=True),
857 'date_planned': fields.date('Scheduled Date', required=True, select=True),857 'date_planned': fields.date('Scheduled Date', required=True, select=True),
858 'taxes_id': fields.many2many('account.tax', 'purchase_order_taxe', 'ord_id', 'tax_id', 'Taxes'),858 'taxes_id': fields.many2many('account.tax', 'purchase_order_taxe', 'ord_id', 'tax_id', 'Taxes'),
859 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),859 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
860 'product_id': fields.many2one('product.product', 'Product', domain=[('purchase_ok','=',True)], change_default=True),860 'product_id': fields.many2one('product.product', 'Product', domain=[('purchase_ok','=',True)], change_default=True),
861 'move_ids': fields.one2many('stock.move', 'purchase_line_id', 'Reservation', readonly=True, ondelete='set null'),861 'move_ids': fields.one2many('stock.move', 'purchase_line_id', 'Reservation', readonly=True, ondelete='set null'),
862 'move_dest_id': fields.many2one('stock.move', 'Reservation Destination', ondelete='set null'),862 'move_dest_id': fields.many2one('stock.move', 'Reservation Destination', ondelete='set null'),
863 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price')),863 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price')),
864 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),864 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Amount')),
865 'order_id': fields.many2one('purchase.order', 'Order Reference', select=True, required=True, ondelete='cascade'),865 'order_id': fields.many2one('purchase.order', 'Order Reference', select=True, required=True, ondelete='cascade'),
866 'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',),866 'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',),
867 'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),867 'company_id': fields.related('order_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
868868
=== modified file 'purchase/report/order.rml'
--- purchase/report/order.rml 2013-05-28 08:19:55 +0000
+++ purchase/report/order.rml 2013-10-29 13:27:40 +0000
@@ -252,10 +252,10 @@
252 <para style="terp_default_Right_9">[[ formatLang(line.product_qty ) ]] [[ line.product_uom.name ]] </para>252 <para style="terp_default_Right_9">[[ formatLang(line.product_qty ) ]] [[ line.product_uom.name ]] </para>
253 </td>253 </td>
254 <td>254 <td>
255 <para style="terp_default_Right_9">[[ formatLang(line.price_unit, digits=get_digits(dp='Product Price') ) ]]</para>255 <para style="terp_default_Right_9">[[ formatLang(line.price_unit, digits=get_digits(dp='Price') ) ]]</para>
256 </td>256 </td>
257 <td>257 <td>
258 <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id ) ]]</para>258 <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Amount'), currency_obj=o.pricelist_id.currency_id ) ]]</para>
259 </td>259 </td>
260 </tr>260 </tr>
261 </blockTable>261 </blockTable>
@@ -271,7 +271,7 @@
271 <para style="terp_default_9">Net Total :</para>271 <para style="terp_default_9">Net Total :</para>
272 </td>272 </td>
273 <td>273 <td>
274 <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id ) ]]</para>274 <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Amount'), currency_obj=o.pricelist_id.currency_id ) ]]</para>
275 </td>275 </td>
276 </tr>276 </tr>
277 <tr>277 <tr>
@@ -284,7 +284,7 @@
284 <para style="terp_default_9">Taxes :</para>284 <para style="terp_default_9">Taxes :</para>
285 </td>285 </td>
286 <td>286 <td>
287 <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</para>287 <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Amount', currency_obj=o.pricelist_id.currency_id) ]]</para>
288 </td>288 </td>
289 </tr>289 </tr>
290 <tr>290 <tr>
@@ -297,7 +297,7 @@
297 <para style="terp_default_Bold_9"><b>Total :</b></para>297 <para style="terp_default_Bold_9"><b>Total :</b></para>
298 </td>298 </td>
299 <td>299 <td>
300 <para style="terp_default_Bold_9_Right"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account') , currency_obj=o.pricelist_id.currency_id) ]]</b></para>300 <para style="terp_default_Bold_9_Right"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Amount') , currency_obj=o.pricelist_id.currency_id) ]]</b></para>
301 </td>301 </td>
302 </tr>302 </tr>
303 </blockTable>303 </blockTable>
304304
=== modified file 'purchase_requisition/purchase_requisition.py'
--- purchase_requisition/purchase_requisition.py 2013-06-10 11:41:41 +0000
+++ purchase_requisition/purchase_requisition.py 2013-10-29 13:27:40 +0000
@@ -174,7 +174,7 @@
174 _columns = {174 _columns = {
175 'product_id': fields.many2one('product.product', 'Product' ),175 'product_id': fields.many2one('product.product', 'Product' ),
176 'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure'),176 'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure'),
177 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),177 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
178 'requisition_id' : fields.many2one('purchase.requisition','Purchase Requisition', ondelete='cascade'),178 'requisition_id' : fields.many2one('purchase.requisition','Purchase Requisition', ondelete='cascade'),
179 'company_id': fields.related('requisition_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),179 'company_id': fields.related('requisition_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
180 }180 }
181181
=== modified file 'report_intrastat/report/invoice.rml'
--- report_intrastat/report/invoice.rml 2012-11-29 22:26:45 +0000
+++ report_intrastat/report/invoice.rml 2013-10-29 13:27:40 +0000
@@ -360,10 +360,10 @@
360 <para style="terp_default_8">[[ t.name ]]</para>360 <para style="terp_default_8">[[ t.name ]]</para>
361 </td>361 </td>
362 <td>362 <td>
363 <para style="terp_default_Right_8">[[ formatLang(t.base, digits=get_digits(dp='Account'), currency_obj = o.currency_id) ]]</para>363 <para style="terp_default_Right_8">[[ formatLang(t.base, digits=get_digits(dp='Amount'), currency_obj = o.currency_id) ]]</para>
364 </td>364 </td>
365 <td>365 <td>
366 <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>366 <para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Amount'), currency_obj=o.currency_id) ]]</para>
367 </td>367 </td>
368 <td>368 <td>
369 <para style="terp_default_8">369 <para style="terp_default_8">
370370
=== modified file 'report_intrastat/report_intrastat.py'
--- report_intrastat/report_intrastat.py 2013-04-15 10:23:49 +0000
+++ report_intrastat/report_intrastat.py 2013-10-29 13:27:40 +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/report/sale_order.rml'
--- sale/report/sale_order.rml 2013-05-27 16:51:33 +0000
+++ sale/report/sale_order.rml 2013-10-29 13:27:40 +0000
@@ -251,13 +251,13 @@
251 <para style="terp_default_Right_9">[[ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty) ]] [[ line.product_uos and line.product_uos.name or line.product_uom.name ]]</para>251 <para style="terp_default_Right_9">[[ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty) ]] [[ line.product_uos and line.product_uos.name or line.product_uom.name ]]</para>
252 </td>252 </td>
253 <td>253 <td>
254 <para style="terp_default_Right_9">[[ formatLang(line.price_unit , digits=get_digits(dp='Product Price'))]]</para>254 <para style="terp_default_Right_9">[[ formatLang(line.price_unit , digits=get_digits(dp='Price'))]]</para>
255 </td>255 </td>
256 <td>256 <td>
257 <para style="terp_default_Centre_9">[[show_discount(user.id) and formatLang(line.discount, digits=get_digits(dp='Discount')) or '']]</para>257 <para style="terp_default_Centre_9">[[show_discount(user.id) and formatLang(line.discount, digits=get_digits(dp='Price')) or '']]</para>
258 </td>258 </td>
259 <td>259 <td>
260 <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]] </para>260 <para style="terp_default_Right_9">[[ formatLang(line.price_subtotal, digits=get_digits(dp='Amount'), currency_obj=o.pricelist_id.currency_id) ]] </para>
261 </td>261 </td>
262 </tr>262 </tr>
263 </blockTable>263 </blockTable>
@@ -273,7 +273,7 @@
273 <para style="terp_default_9">Net Total :</para>273 <para style="terp_default_9">Net Total :</para>
274 </td>274 </td>
275 <td>275 <td>
276 <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</para>276 <para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, dp='Amount', currency_obj=o.pricelist_id.currency_id) ]]</para>
277 </td>277 </td>
278 </tr>278 </tr>
279 <tr>279 <tr>
@@ -286,7 +286,7 @@
286 <para style="terp_default_9">Taxes :</para>286 <para style="terp_default_9">Taxes :</para>
287 </td>287 </td>
288 <td>288 <td>
289 <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</para>289 <para style="terp_default_Right_9">[[ formatLang(o.amount_tax, dp='Amount', currency_obj=o.pricelist_id.currency_id) ]]</para>
290 </td>290 </td>
291 </tr>291 </tr>
292 <tr>292 <tr>
@@ -299,7 +299,7 @@
299 <para style="terp_default_Bold_9"><b>Total :</b></para>299 <para style="terp_default_Bold_9"><b>Total :</b></para>
300 </td>300 </td>
301 <td>301 <td>
302 <para style="terp_default_Right_9_Bold"><b>[[ formatLang(o.amount_total, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]</b></para>302 <para style="terp_default_Right_9_Bold"><b>[[ formatLang(o.amount_total, dp='Amount', currency_obj=o.pricelist_id.currency_id) ]]</b></para>
303 </td>303 </td>
304 </tr>304 </tr>
305 </blockTable>305 </blockTable>
306306
=== modified file 'sale/sale.py'
--- sale/sale.py 2013-09-23 17:13:10 +0000
+++ sale/sale.py 2013-10-29 13:27:40 +0000
@@ -198,19 +198,19 @@
198 fnct_search=_invoiced_search, type='boolean', help="It indicates that sales order has at least one invoice."),198 fnct_search=_invoiced_search, type='boolean', help="It indicates that sales order has at least one invoice."),
199 'note': fields.text('Terms and conditions'),199 'note': fields.text('Terms and conditions'),
200200
201 'amount_untaxed': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Untaxed Amount',201 'amount_untaxed': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Untaxed Amount',
202 store={202 store={
203 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),203 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
204 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),204 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
205 },205 },
206 multi='sums', help="The amount without tax.", track_visibility='always'),206 multi='sums', help="The amount without tax.", track_visibility='always'),
207 'amount_tax': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Taxes',207 'amount_tax': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Taxes',
208 store={208 store={
209 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),209 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
210 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),210 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
211 },211 },
212 multi='sums', help="The tax amount."),212 multi='sums', help="The tax amount."),
213 'amount_total': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Total',213 'amount_total': fields.function(_amount_all, digits_compute=dp.get_precision('Amount'), string='Total',
214 store={214 store={
215 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),215 'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
216 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),216 'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
@@ -677,18 +677,18 @@
677 store={677 store={
678 'account.invoice': (_order_lines_from_invoice, ['state'], 10),678 'account.invoice': (_order_lines_from_invoice, ['state'], 10),
679 'sale.order.line': (lambda self,cr,uid,ids,ctx=None: ids, ['invoice_lines'], 10)}),679 'sale.order.line': (lambda self,cr,uid,ids,ctx=None: ids, ['invoice_lines'], 10)}),
680 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price'), readonly=True, states={'draft': [('readonly', False)]}),680 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Price'), readonly=True, states={'draft': [('readonly', False)]}),
681 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},681 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},
682 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."),682 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."),
683 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),683 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Amount')),
684 'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft': [('readonly', False)]}),684 'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft': [('readonly', False)]}),
685 'address_allotment_id': fields.many2one('res.partner', 'Allotment Partner',help="A partner to whom the particular product needs to be allotted."),685 'address_allotment_id': fields.many2one('res.partner', 'Allotment Partner',help="A partner to whom the particular product needs to be allotted."),
686 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Product UoS'), required=True, readonly=True, states={'draft': [('readonly', False)]}),686 'product_uom_qty': fields.float('Quantity', digits_compute= dp.get_precision('Quantity'), required=True, readonly=True, states={'draft': [('readonly', False)]}),
687 'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft': [('readonly', False)]}),687 'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft': [('readonly', False)]}),
688 'product_uos_qty': fields.float('Quantity (UoS)' ,digits_compute= dp.get_precision('Product UoS'), readonly=True, states={'draft': [('readonly', False)]}),688 'product_uos_qty': fields.float('Quantity (UoS)' ,digits_compute= dp.get_precision('Quantity'), readonly=True, states={'draft': [('readonly', False)]}),
689 'product_uos': fields.many2one('product.uom', 'Product UoS'),689 'product_uos': fields.many2one('product.uom', 'Product UoS'),
690 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount'), readonly=True, states={'draft': [('readonly', False)]}),690 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price'), readonly=True, states={'draft': [('readonly', False)]}),
691 'th_weight': fields.float('Weight', readonly=True, states={'draft': [('readonly', False)]}),691 'th_weight': fields.float('Weight', readonly=True, digits_compute=dp.get_precision('Weight'), states={'draft': [('readonly', False)]}),
692 'state': fields.selection([('cancel', 'Cancelled'),('draft', 'Draft'),('confirmed', 'Confirmed'),('exception', 'Exception'),('done', 'Done')], 'Status', required=True, readonly=True,692 'state': fields.selection([('cancel', 'Cancelled'),('draft', 'Draft'),('confirmed', 'Confirmed'),('exception', 'Exception'),('done', 'Done')], 'Status', required=True, readonly=True,
693 help='* The \'Draft\' status is set when the related sales order in draft status. \693 help='* The \'Draft\' status is set when the related sales order in draft status. \
694 \n* The \'Confirmed\' status is set when the related sales order is confirmed. \694 \n* The \'Confirmed\' status is set when the related sales order is confirmed. \
@@ -755,7 +755,7 @@
755 pu = 0.0755 pu = 0.0
756 if uosqty:756 if uosqty:
757 pu = round(line.price_unit * line.product_uom_qty / uosqty,757 pu = round(line.price_unit * line.product_uom_qty / uosqty,
758 self.pool.get('decimal.precision').precision_get(cr, uid, 'Product Price'))758 self.pool.get('decimal.precision').precision_get(cr, uid, 'Price'))
759 fpos = line.order_id.fiscal_position or False759 fpos = line.order_id.fiscal_position or False
760 account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id)760 account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id)
761 if not account_id:761 if not account_id:
762762
=== modified file 'sale/wizard/sale_make_invoice_advance.py'
--- sale/wizard/sale_make_invoice_advance.py 2013-06-13 10:59:23 +0000
+++ sale/wizard/sale_make_invoice_advance.py 2013-10-29 13:27:40 +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 2013-06-26 11:10:29 +0000
+++ stock/product.py 2013-10-29 13:27:40 +0000
@@ -358,7 +358,7 @@
358 'reception_count': fields.function(_stock_move_count, string="Reception", type='integer', multi='pickings'),358 'reception_count': fields.function(_stock_move_count, string="Reception", type='integer', multi='pickings'),
359 'delivery_count': fields.function(_stock_move_count, string="Delivery", type='integer', multi='pickings'),359 'delivery_count': fields.function(_stock_move_count, string="Delivery", type='integer', multi='pickings'),
360 'qty_available': fields.function(_product_available, multi='qty_available',360 'qty_available': fields.function(_product_available, multi='qty_available',
361 type='float', digits_compute=dp.get_precision('Product Unit of Measure'),361 type='float', digits_compute=dp.get_precision('Quantity'),
362 string='Quantity On Hand',362 string='Quantity On Hand',
363 help="Current quantity of products.\n"363 help="Current quantity of products.\n"
364 "In a context with a single Stock Location, this includes "364 "In a context with a single Stock Location, this includes "
@@ -371,7 +371,7 @@
371 "Otherwise, this includes goods stored in any Stock Location "371 "Otherwise, this includes goods stored in any Stock Location "
372 "with 'internal' type."),372 "with 'internal' type."),
373 'virtual_available': fields.function(_product_available, multi='qty_available',373 'virtual_available': fields.function(_product_available, multi='qty_available',
374 type='float', digits_compute=dp.get_precision('Product Unit of Measure'),374 type='float', digits_compute=dp.get_precision('Quantity'),
375 string='Forecasted Quantity',375 string='Forecasted Quantity',
376 help="Forecast quantity (computed as Quantity On Hand "376 help="Forecast quantity (computed as Quantity On Hand "
377 "- Outgoing + Incoming)\n"377 "- Outgoing + Incoming)\n"
@@ -385,7 +385,7 @@
385 "Otherwise, this includes goods stored in any Stock Location "385 "Otherwise, this includes goods stored in any Stock Location "
386 "with 'internal' type."),386 "with 'internal' type."),
387 'incoming_qty': fields.function(_product_available, multi='qty_available',387 'incoming_qty': fields.function(_product_available, multi='qty_available',
388 type='float', digits_compute=dp.get_precision('Product Unit of Measure'),388 type='float', digits_compute=dp.get_precision('Quantity'),
389 string='Incoming',389 string='Incoming',
390 help="Quantity of products that are planned to arrive.\n"390 help="Quantity of products that are planned to arrive.\n"
391 "In a context with a single Stock Location, this includes "391 "In a context with a single Stock Location, this includes "
@@ -399,7 +399,7 @@
399 "Otherwise, this includes goods arriving to any Stock "399 "Otherwise, this includes goods arriving to any Stock "
400 "Location with 'internal' type."),400 "Location with 'internal' type."),
401 'outgoing_qty': fields.function(_product_available, multi='qty_available',401 'outgoing_qty': fields.function(_product_available, multi='qty_available',
402 type='float', digits_compute=dp.get_precision('Product Unit of Measure'),402 type='float', digits_compute=dp.get_precision('Quantity'),
403 string='Outgoing',403 string='Outgoing',
404 help="Quantity of products that are planned to leave.\n"404 help="Quantity of products that are planned to leave.\n"
405 "In a context with a single Stock Location, this includes "405 "In a context with a single Stock Location, this includes "
406406
=== modified file 'stock/report/lot_overview.rml'
--- stock/report/lot_overview.rml 2012-11-29 22:26:45 +0000
+++ stock/report/lot_overview.rml 2013-10-29 13:27:40 +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 2013-10-29 13:27:40 +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 2013-04-15 10:23:49 +0000
+++ stock/report/report_stock_move.py 2013-10-29 13:27:40 +0000
@@ -48,9 +48,9 @@
48 'product_qty_in':fields.integer('In Qty',readonly=True),48 'product_qty_in':fields.integer('In Qty',readonly=True),
49 'product_qty_out':fields.integer('Out Qty',readonly=True),49 'product_qty_out':fields.integer('Out Qty',readonly=True),
50 'value' : fields.float('Total Value', required=True),50 'value' : fields.float('Total Value', required=True),
51 'day_diff2':fields.float('Lag (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),51 'day_diff2':fields.float('Lag (Days)',readonly=True, group_operator="avg"),
52 'day_diff1':fields.float('Planned Lead Time (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),52 'day_diff1':fields.float('Planned Lead Time (Days)',readonly=True, group_operator="avg"),
53 'day_diff':fields.float('Execution Lead Time (Days)',readonly=True, digits_compute=dp.get_precision('Shipping Delay'), group_operator="avg"),53 'day_diff':fields.float('Execution Lead Time (Days)',readonly=True, group_operator="avg"),
54 'stock_journal': fields.many2one('stock.journal','Stock Journal', select=True),54 'stock_journal': fields.many2one('stock.journal','Stock Journal', select=True),
5555
5656
@@ -160,8 +160,8 @@
160 'location_id': fields.many2one('stock.location', 'Location', readonly=True),160 'location_id': fields.many2one('stock.location', 'Location', readonly=True),
161 'prodlot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True),161 'prodlot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True),
162 'company_id': fields.many2one('res.company', 'Company', readonly=True),162 'company_id': fields.many2one('res.company', 'Company', readonly=True),
163 'product_qty':fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'), readonly=True),163 'product_qty':fields.float('Quantity', digits_compute=dp.get_precision('Quantity'), readonly=True),
164 'value' : fields.float('Total Value', digits_compute=dp.get_precision('Account'), required=True),164 'value' : fields.float('Total Value', digits_compute=dp.get_precision('Amount'), required=True),
165 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', readonly=True, select=True,165 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', readonly=True, select=True,
166 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\'.\166 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\'.\
167 \nThe state is \'Waiting\' if the move is waiting for another one.'),167 \nThe state is \'Waiting\' if the move is waiting for another one.'),
168168
=== modified file 'stock/res_config.py'
--- stock/res_config.py 2013-09-17 13:08:14 +0000
+++ stock/res_config.py 2013-10-29 13:27:40 +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 2013-10-18 12:58:18 +0000
+++ stock/stock.py 2013-10-29 13:27:40 +0000
@@ -200,8 +200,8 @@
200200
201 'parent_left': fields.integer('Left Parent', select=1),201 'parent_left': fields.integer('Left Parent', select=1),
202 'parent_right': fields.integer('Right Parent', select=1),202 'parent_right': fields.integer('Right Parent', select=1),
203 'stock_real_value': fields.function(_product_value, type='float', string='Real Stock Value', multi="stock", digits_compute=dp.get_precision('Account')),203 'stock_real_value': fields.function(_product_value, type='float', string='Real Stock Value', multi="stock", digits_compute=dp.get_precision('Amount')),
204 'stock_virtual_value': fields.function(_product_value, type='float', string='Virtual Stock Value', multi="stock", digits_compute=dp.get_precision('Account')),204 'stock_virtual_value': fields.function(_product_value, type='float', string='Virtual Stock Value', multi="stock", digits_compute=dp.get_precision('Amount')),
205 'company_id': fields.many2one('res.company', 'Company', select=1, help='Let this field empty if this location is shared between all companies'),205 'company_id': fields.many2one('res.company', 'Company', select=1, help='Let this field empty if this location is shared between all companies'),
206 'scrap_location': fields.boolean('Scrap Location', help='Check this box to allow using this location to put scrapped/damaged goods.'),206 'scrap_location': fields.boolean('Scrap Location', help='Check this box to allow using this location to put scrapped/damaged goods.'),
207 'valuation_in_account_id': fields.many2one('account.account', 'Stock Valuation Account (Incoming)', domain = [('type','=','other')],207 'valuation_in_account_id': fields.many2one('account.account', 'Stock Valuation Account (Incoming)', domain = [('type','=','other')],
@@ -1468,7 +1468,7 @@
1468 'date': fields.datetime('Creation Date', required=True),1468 'date': fields.datetime('Creation Date', required=True),
1469 'stock_available': fields.function(_get_stock, fnct_search=_stock_search, type="float", string="Available", select=True,1469 'stock_available': fields.function(_get_stock, fnct_search=_stock_search, type="float", string="Available", select=True,
1470 help="Current quantity of products with this Serial Number available in company warehouses",1470 help="Current quantity of products with this Serial Number available in company warehouses",
1471 digits_compute=dp.get_precision('Product Unit of Measure')),1471 digits_compute=dp.get_precision('Quantity')),
1472 'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'),1472 'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'),
1473 'company_id': fields.many2one('res.company', 'Company', select=True),1473 'company_id': fields.many2one('res.company', 'Company', select=True),
1474 'move_ids': fields.one2many('stock.move', 'prodlot_id', 'Moves for this serial number', readonly=True),1474 'move_ids': fields.one2many('stock.move', 'prodlot_id', 'Moves for this serial number', readonly=True),
@@ -1607,7 +1607,7 @@
1607 'date_expected': fields.datetime('Scheduled Date', states={'done': [('readonly', True)]},required=True, select=True, help="Scheduled date for the processing of this move"),1607 'date_expected': fields.datetime('Scheduled Date', states={'done': [('readonly', True)]},required=True, select=True, help="Scheduled date for the processing of this move"),
1608 'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type','<>','service')],states={'done': [('readonly', True)]}),1608 'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type','<>','service')],states={'done': [('readonly', True)]}),
16091609
1610 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure'),1610 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity'),
1611 required=True,states={'done': [('readonly', True)]},1611 required=True,states={'done': [('readonly', True)]},
1612 help="This is the quantity of products from an inventory "1612 help="This is the quantity of products from an inventory "
1613 "point of view. For moves in the state 'done', this is the "1613 "point of view. For moves in the state 'done', this is the "
@@ -1618,7 +1618,7 @@
1618 "the product reservation, and should be done with care."1618 "the product reservation, and should be done with care."
1619 ),1619 ),
1620 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True,states={'done': [('readonly', True)]}),1620 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True,states={'done': [('readonly', True)]}),
1621 'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Product Unit of Measure'), states={'done': [('readonly', True)]}),1621 'product_uos_qty': fields.float('Quantity (UOS)', digits_compute=dp.get_precision('Quantity'), states={'done': [('readonly', True)]}),
1622 'product_uos': fields.many2one('product.uom', 'Product UOS', states={'done': [('readonly', True)]}),1622 'product_uos': fields.many2one('product.uom', 'Product UOS', states={'done': [('readonly', True)]}),
1623 'product_packaging': fields.many2one('product.packaging', 'Packaging', help="It specifies attributes of packaging like type, quantity of packaging,etc."),1623 'product_packaging': fields.many2one('product.packaging', 'Packaging', help="It specifies attributes of packaging like type, quantity of packaging,etc."),
16241624
@@ -1648,7 +1648,7 @@
1648 "* 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"\1648 "* 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 "* Available: When products are reserved, it is set to \'Available\'.\n"\1649 "* Available: When products are reserved, it is set to \'Available\'.\n"\
1650 "* Done: When the shipment is processed, the state is \'Done\'."),1650 "* Done: When the shipment is processed, the state is \'Done\'."),
1651 '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)"),1651 '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)"),
1652 '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)"),1652 '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 'company_id': fields.many2one('res.company', 'Company', required=True, select=True),1653 'company_id': fields.many2one('res.company', 'Company', required=True, select=True),
1654 'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order of", select=True),1654 'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order of", select=True),
@@ -2896,7 +2896,7 @@
2896 'location_id': fields.many2one('stock.location', 'Location', required=True),2896 'location_id': fields.many2one('stock.location', 'Location', required=True),
2897 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),2897 'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
2898 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),2898 'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
2899 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product Unit of Measure')),2899 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')),
2900 'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True, readonly=True),2900 'company_id': fields.related('inventory_id','company_id',type='many2one',relation='res.company',string='Company',store=True, select=True, readonly=True),
2901 'prod_lot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),2901 'prod_lot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
2902 'state': fields.related('inventory_id','state',type='char',string='Status',readonly=True),2902 'state': fields.related('inventory_id','state',type='char',string='Status',readonly=True),
29032903
=== modified file 'stock/stock_data.xml'
--- stock/stock_data.xml 2012-11-29 22:26:45 +0000
+++ stock/stock_data.xml 2013-10-29 13:27:40 +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 2013-08-01 14:21:19 +0000
+++ stock/wizard/stock_change_product_qty.py 2013-10-29 13:27:40 +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-09-17 12:21:02 +0000
+++ stock/wizard/stock_change_standard_price.py 2013-10-29 13:27:40 +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-04-15 10:23:49 +0000
+++ stock/wizard/stock_move.py 2013-10-29 13:27:40 +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 2013-06-14 09:19:24 +0000
+++ stock/wizard/stock_partial_picking.py 2013-10-29 13:27:40 +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')]),
5050
=== modified file 'stock/wizard/stock_return_picking.py'
--- stock/wizard/stock_return_picking.py 2013-09-10 12:21:13 +0000
+++ stock/wizard/stock_return_picking.py 2013-10-29 13:27:40 +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-04-15 10:23:49 +0000
+++ stock/wizard/stock_splitinto.py 2013-10-29 13:27:40 +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,

Subscribers

People subscribed via source and target branches

to all changes: