Merge lp:~openerp-dev/openobject-addons/trunk-decimal-rounding-fix into lp:openobject-addons
- trunk-decimal-rounding-fix
- Merge into trunk
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+187727@code.launchpad.net |
Commit message
Description of the change
Hello,
Rename some Decimal Precision and Remove unused Decimal Precision .
now have this decimal precision list:
-> 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.
- 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
1 | === modified file 'account/account.py' | |||
2 | --- account/account.py 2013-10-09 18:03:37 +0000 | |||
3 | +++ account/account.py 2013-10-29 13:27:40 +0000 | |||
4 | @@ -76,7 +76,7 @@ | |||
5 | 76 | amount = value | 76 | amount = value |
6 | 77 | result = [] | 77 | result = [] |
7 | 78 | obj_precision = self.pool.get('decimal.precision') | 78 | obj_precision = self.pool.get('decimal.precision') |
9 | 79 | prec = obj_precision.precision_get(cr, uid, 'Account') | 79 | prec = obj_precision.precision_get(cr, uid, 'Amount') |
10 | 80 | for line in pt.line_ids: | 80 | for line in pt.line_ids: |
11 | 81 | if line.value == 'fixed': | 81 | if line.value == 'fixed': |
12 | 82 | amt = round(line.value_amount, prec) | 82 | amt = round(line.value_amount, prec) |
13 | @@ -109,7 +109,7 @@ | |||
14 | 109 | ('fixed', 'Fixed Amount')], 'Computation', | 109 | ('fixed', 'Fixed Amount')], 'Computation', |
15 | 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."""), |
16 | 111 | 111 | ||
18 | 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."), |
19 | 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." \ |
20 | 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."), |
21 | 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)."), |
22 | @@ -467,14 +467,14 @@ | |||
23 | 467 | 'child_parent_ids': fields.one2many('account.account','parent_id','Children'), | 467 | 'child_parent_ids': fields.one2many('account.account','parent_id','Children'), |
24 | 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'), |
25 | 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"), |
30 | 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'), |
31 | 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'), |
32 | 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'), |
33 | 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', |
34 | 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."), |
36 | 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', |
37 | 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."), |
39 | 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', |
40 | 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."), |
41 | 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."), |
42 | 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)), |
43 | @@ -1280,11 +1280,11 @@ | |||
44 | 1280 | _name: (lambda self, cr,uid,ids,c: ids, ['line_id'], 10), | 1280 | _name: (lambda self, cr,uid,ids,c: ids, ['line_id'], 10), |
45 | 1281 | 'account.move.line': (_get_move_from_lines, ['partner_id'],10) | 1281 | 'account.move.line': (_get_move_from_lines, ['partner_id'],10) |
46 | 1282 | }), | 1282 | }), |
48 | 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), |
49 | 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), |
50 | 1285 | 'narration':fields.text('Internal Note'), | 1285 | 'narration':fields.text('Internal Note'), |
51 | 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), |
53 | 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"), |
54 | 1288 | } | 1288 | } |
55 | 1289 | 1289 | ||
56 | 1290 | _defaults = { | 1290 | _defaults = { |
57 | @@ -1778,7 +1778,7 @@ | |||
58 | 1778 | for rec in record.child_ids: | 1778 | for rec in record.child_ids: |
59 | 1779 | amount += _rec_get(rec) * rec.sign | 1779 | amount += _rec_get(rec) * rec.sign |
60 | 1780 | return amount | 1780 | return amount |
62 | 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')) |
63 | 1782 | return res2 | 1782 | return res2 |
64 | 1783 | 1783 | ||
65 | 1784 | def _sum_year(self, cr, uid, ids, name, args, context=None): | 1784 | def _sum_year(self, cr, uid, ids, name, args, context=None): |
66 | @@ -1883,7 +1883,7 @@ | |||
67 | 1883 | 1883 | ||
68 | 1884 | def get_precision_tax(): | 1884 | def get_precision_tax(): |
69 | 1885 | def change_digit_tax(cr): | 1885 | def change_digit_tax(cr): |
71 | 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') |
72 | 1887 | return (16, res+3) | 1887 | return (16, res+3) |
73 | 1888 | return change_digit_tax | 1888 | return change_digit_tax |
74 | 1889 | 1889 | ||
75 | @@ -2129,15 +2129,15 @@ | |||
76 | 2129 | """ | 2129 | """ |
77 | 2130 | 2130 | ||
78 | 2131 | # By default, for each tax, tax amount will first be computed | 2131 | # By default, for each tax, tax amount will first be computed |
80 | 2132 | # and rounded at the 'Account' decimal precision for each | 2132 | # and rounded at the 'Amount' decimal precision for each |
81 | 2133 | # PO/SO/invoice line and then these rounded amounts will be | 2133 | # PO/SO/invoice line and then these rounded amounts will be |
82 | 2134 | # summed, leading to the total amount for that tax. But, if the | 2134 | # summed, leading to the total amount for that tax. But, if the |
83 | 2135 | # company has tax_calculation_rounding_method = round_globally, | 2135 | # company has tax_calculation_rounding_method = round_globally, |
84 | 2136 | # we still follow the same method, but we use a much larger | 2136 | # we still follow the same method, but we use a much larger |
85 | 2137 | # precision when we round the tax amount for each line (we use | 2137 | # precision when we round the tax amount for each line (we use |
87 | 2138 | # the 'Account' decimal precision + 5), and that way it's like | 2138 | # the 'Amount' decimal precision + 5), and that way it's like |
88 | 2139 | # rounding after the sum of the tax amounts of each line | 2139 | # rounding after the sum of the tax amounts of each line |
90 | 2140 | precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') | 2140 | precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount') |
91 | 2141 | tax_compute_precision = precision | 2141 | tax_compute_precision = precision |
92 | 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': |
93 | 2143 | tax_compute_precision += 5 | 2143 | tax_compute_precision += 5 |
94 | @@ -2180,7 +2180,7 @@ | |||
95 | 2180 | one tax for each tax id in IDS and their children | 2180 | one tax for each tax id in IDS and their children |
96 | 2181 | """ | 2181 | """ |
97 | 2182 | if not precision: | 2182 | if not precision: |
99 | 2183 | precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') | 2183 | precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount') |
100 | 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) |
101 | 2185 | total = 0.0 | 2185 | total = 0.0 |
102 | 2186 | for r in res: | 2186 | for r in res: |
103 | @@ -2276,7 +2276,7 @@ | |||
104 | 2276 | one tax for each tax id in IDS and their children | 2276 | one tax for each tax id in IDS and their children |
105 | 2277 | """ | 2277 | """ |
106 | 2278 | if not precision: | 2278 | if not precision: |
108 | 2279 | precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') | 2279 | precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount') |
109 | 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) |
110 | 2281 | total = 0.0 | 2281 | total = 0.0 |
111 | 2282 | for r in res: | 2282 | for r in res: |
112 | @@ -2405,9 +2405,9 @@ | |||
113 | 2405 | _columns = { | 2405 | _columns = { |
114 | 2406 | 'name': fields.char('Name', size=64, required=True), | 2406 | 'name': fields.char('Name', size=64, required=True), |
115 | 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."), |
119 | 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."), |
120 | 2409 | 'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')), | 2409 | 'debit': fields.float('Debit', digits_compute=dp.get_precision('Amount')), |
121 | 2410 | 'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')), | 2410 | 'credit': fields.float('Credit', digits_compute=dp.get_precision('Amount')), |
122 | 2411 | 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade"), | 2411 | 'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade"), |
123 | 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"), |
124 | 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), |
125 | 2414 | 2414 | ||
126 | === modified file 'account/account_analytic_line.py' | |||
127 | --- account/account_analytic_line.py 2013-04-15 10:23:49 +0000 | |||
128 | +++ account/account_analytic_line.py 2013-10-29 13:27:40 +0000 | |||
129 | @@ -119,7 +119,7 @@ | |||
130 | 119 | # to return a default price for those units | 119 | # to return a default price for those units |
131 | 120 | ctx['uom'] = unit | 120 | ctx['uom'] = unit |
132 | 121 | amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id] | 121 | amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id] |
134 | 122 | prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') | 122 | prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount') |
135 | 123 | amount = amount_unit * quantity or 0.0 | 123 | amount = amount_unit * quantity or 0.0 |
136 | 124 | result = round(amount, prec) | 124 | result = round(amount, prec) |
137 | 125 | if not flag: | 125 | if not flag: |
138 | 126 | 126 | ||
139 | === modified file 'account/account_bank_statement.py' | |||
140 | --- account/account_bank_statement.py 2013-06-14 09:19:24 +0000 | |||
141 | +++ account/account_bank_statement.py 2013-10-29 13:27:40 +0000 | |||
142 | @@ -103,9 +103,9 @@ | |||
143 | 103 | readonly=True, states={'draft':[('readonly',False)]}), | 103 | readonly=True, states={'draft':[('readonly',False)]}), |
144 | 104 | 'period_id': fields.many2one('account.period', 'Period', required=True, | 104 | 'period_id': fields.many2one('account.period', 'Period', required=True, |
145 | 105 | states={'confirm':[('readonly', True)]}), | 105 | states={'confirm':[('readonly', True)]}), |
147 | 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'), |
148 | 107 | states={'confirm':[('readonly',True)]}), | 107 | states={'confirm':[('readonly',True)]}), |
150 | 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'), |
151 | 109 | states={'confirm': [('readonly', True)]}), | 109 | states={'confirm': [('readonly', True)]}), |
152 | 110 | 'balance_end': fields.function(_end_balance, | 110 | 'balance_end': fields.function(_end_balance, |
153 | 111 | store = { | 111 | store = { |
154 | @@ -548,7 +548,7 @@ | |||
155 | 548 | _columns = { | 548 | _columns = { |
156 | 549 | 'name': fields.char('OBI', required=True, help="Originator to Beneficiary Information"), | 549 | 'name': fields.char('OBI', required=True, help="Originator to Beneficiary Information"), |
157 | 550 | 'date': fields.date('Date', required=True), | 550 | 'date': fields.date('Date', required=True), |
159 | 551 | 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')), | 551 | 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')), |
160 | 552 | 'type': fields.selection([ | 552 | 'type': fields.selection([ |
161 | 553 | ('supplier','Supplier'), | 553 | ('supplier','Supplier'), |
162 | 554 | ('customer','Customer'), | 554 | ('customer','Customer'), |
163 | 555 | 555 | ||
164 | === modified file 'account/account_cash_statement.py' | |||
165 | --- account/account_cash_statement.py 2013-06-14 09:19:24 +0000 | |||
166 | +++ account/account_cash_statement.py 2013-10-29 13:27:40 +0000 | |||
167 | @@ -58,11 +58,11 @@ | |||
168 | 58 | return {'value' : {'subtotal_closing' : (pieces * number) or 0.0 }} | 58 | return {'value' : {'subtotal_closing' : (pieces * number) or 0.0 }} |
169 | 59 | 59 | ||
170 | 60 | _columns = { | 60 | _columns = { |
172 | 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')), |
173 | 62 | 'number_opening' : fields.integer('Number of Units', help='Opening Unit Numbers'), | 62 | 'number_opening' : fields.integer('Number of Units', help='Opening Unit Numbers'), |
174 | 63 | 'number_closing' : fields.integer('Number of Units', help='Closing Unit Numbers'), | 63 | 'number_closing' : fields.integer('Number of Units', help='Closing Unit Numbers'), |
177 | 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'), |
178 | 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'), |
179 | 66 | 'bank_statement_id' : fields.many2one('account.bank.statement', ondelete='cascade'), | 66 | 'bank_statement_id' : fields.many2one('account.bank.statement', ondelete='cascade'), |
180 | 67 | } | 67 | } |
181 | 68 | 68 | ||
182 | @@ -339,7 +339,7 @@ | |||
183 | 339 | _name = 'account.journal.cashbox.line' | 339 | _name = 'account.journal.cashbox.line' |
184 | 340 | _rec_name = 'pieces' | 340 | _rec_name = 'pieces' |
185 | 341 | _columns = { | 341 | _columns = { |
187 | 342 | 'pieces': fields.float('Values', digits_compute=dp.get_precision('Account')), | 342 | 'pieces': fields.float('Values', digits_compute=dp.get_precision('Amount')), |
188 | 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"), |
189 | 344 | } | 344 | } |
190 | 345 | 345 | ||
191 | 346 | 346 | ||
192 | === modified file 'account/account_invoice.py' | |||
193 | --- account/account_invoice.py 2013-09-23 17:13:10 +0000 | |||
194 | +++ account/account_invoice.py 2013-10-29 13:27:40 +0000 | |||
195 | @@ -273,21 +273,21 @@ | |||
196 | 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)]}), |
197 | 274 | 274 | ||
198 | 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."), |
214 | 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', |
215 | 277 | store={ | 277 | store={ |
216 | 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), |
217 | 279 | 'account.invoice.tax': (_get_invoice_tax, None, 20), | 279 | 'account.invoice.tax': (_get_invoice_tax, None, 20), |
218 | 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), |
219 | 281 | }, | 281 | }, |
220 | 282 | multi='all'), | 282 | multi='all'), |
221 | 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', |
222 | 284 | store={ | 284 | store={ |
223 | 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), |
224 | 286 | 'account.invoice.tax': (_get_invoice_tax, None, 20), | 286 | 'account.invoice.tax': (_get_invoice_tax, None, 20), |
225 | 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), |
226 | 288 | }, | 288 | }, |
227 | 289 | multi='all'), | 289 | multi='all'), |
228 | 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', |
229 | 291 | store={ | 291 | store={ |
230 | 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), |
231 | 293 | 'account.invoice.tax': (_get_invoice_tax, None, 20), | 293 | 'account.invoice.tax': (_get_invoice_tax, None, 20), |
232 | @@ -297,7 +297,7 @@ | |||
233 | 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'), |
234 | 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)]}), |
235 | 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)]}), |
237 | 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)]}), |
238 | 301 | 'reconciled': fields.function(_reconciled, string='Paid/Reconciled', type='boolean', | 301 | 'reconciled': fields.function(_reconciled, string='Paid/Reconciled', type='boolean', |
239 | 302 | store={ | 302 | store={ |
240 | 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 ? |
241 | @@ -307,7 +307,7 @@ | |||
242 | 307 | 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account', | 307 | 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account', |
243 | 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)]}), |
244 | 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'), |
246 | 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', |
247 | 311 | store={ | 311 | store={ |
248 | 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), |
249 | 313 | 'account.invoice.tax': (_get_invoice_tax, None, 50), | 313 | 'account.invoice.tax': (_get_invoice_tax, None, 50), |
250 | @@ -1381,7 +1381,7 @@ | |||
251 | 1381 | total += (l.debit or 0.0) - (l.credit or 0.0) | 1381 | total += (l.debit or 0.0) - (l.credit or 0.0) |
252 | 1382 | 1382 | ||
253 | 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] |
255 | 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: |
256 | 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) |
257 | 1386 | else: | 1386 | else: |
258 | 1387 | code = invoice.currency_id.symbol | 1387 | code = invoice.currency_id.symbol |
259 | @@ -1440,11 +1440,11 @@ | |||
260 | 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), |
261 | 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), |
262 | 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."), |
264 | 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')), |
265 | 1444 | 'price_subtotal': fields.function(_amount_line, string='Amount', type="float", | 1444 | 'price_subtotal': fields.function(_amount_line, string='Amount', type="float", |
269 | 1445 | digits_compute= dp.get_precision('Account'), store=True), | 1445 | digits_compute= dp.get_precision('Amount'), store=True), |
270 | 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), |
271 | 1447 | 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount')), | 1447 | 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Price')), |
272 | 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)]), |
273 | 1449 | 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), | 1449 | 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), |
274 | 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), |
275 | @@ -1682,14 +1682,14 @@ | |||
276 | 1682 | 'name': fields.char('Tax Description', size=64, required=True), | 1682 | 'name': fields.char('Tax Description', size=64, required=True), |
277 | 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')]), |
278 | 1684 | 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'), | 1684 | 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic account'), |
281 | 1685 | 'base': fields.float('Base', digits_compute=dp.get_precision('Account')), | 1685 | 'base': fields.float('Base', digits_compute=dp.get_precision('Amount')), |
282 | 1686 | 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')), | 1686 | 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')), |
283 | 1687 | 'manual': fields.boolean('Manual'), | 1687 | 'manual': fields.boolean('Manual'), |
284 | 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."), |
285 | 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."), |
287 | 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')), |
288 | 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."), |
290 | 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')), |
291 | 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), |
292 | 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"), |
293 | 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") |
294 | 1696 | 1696 | ||
295 | === modified file 'account/account_move_line.py' | |||
296 | --- account/account_move_line.py 2013-09-23 17:13:10 +0000 | |||
297 | +++ account/account_move_line.py 2013-10-29 13:27:40 +0000 | |||
298 | @@ -431,11 +431,11 @@ | |||
299 | 431 | 431 | ||
300 | 432 | _columns = { | 432 | _columns = { |
301 | 433 | 'name': fields.char('Name', size=64, required=True), | 433 | 'name': fields.char('Name', size=64, required=True), |
303 | 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."), |
304 | 435 | 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'), | 435 | 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'), |
305 | 436 | 'product_id': fields.many2one('product.product', 'Product'), | 436 | 'product_id': fields.many2one('product.product', 'Product'), |
308 | 437 | 'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')), | 437 | 'debit': fields.float('Debit', digits_compute=dp.get_precision('Amount')), |
309 | 438 | 'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')), | 438 | 'credit': fields.float('Credit', digits_compute=dp.get_precision('Amount')), |
310 | 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), |
311 | 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), |
312 | 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'), |
313 | @@ -444,7 +444,7 @@ | |||
314 | 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), |
315 | 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), |
316 | 446 | 'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref'), | 446 | 'reconcile': fields.function(_get_reconcile, type='char', string='Reconcile Ref'), |
318 | 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')), |
319 | 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)."), |
320 | 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."), |
321 | 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."), |
322 | @@ -469,7 +469,7 @@ | |||
323 | 469 | 'balance': fields.function(_balance, fnct_search=_balance_search, string='Balance'), | 469 | 'balance': fields.function(_balance, fnct_search=_balance_search, string='Balance'), |
324 | 470 | 'state': fields.selection([('draft','Unbalanced'), ('valid','Balanced')], 'Status', readonly=True), | 470 | 'state': fields.selection([('draft','Unbalanced'), ('valid','Balanced')], 'Status', readonly=True), |
325 | 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."), |
327 | 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, "\ |
328 | 473 | "this field will contain the basic amount(without tax)."), | 473 | "this field will contain the basic amount(without tax)."), |
329 | 474 | 'invoice': fields.function(_invoice, string='Invoice', | 474 | 'invoice': fields.function(_invoice, string='Invoice', |
330 | 475 | type='many2one', relation='account.invoice', fnct_search=_invoice_search), | 475 | type='many2one', relation='account.invoice', fnct_search=_invoice_search), |
331 | 476 | 476 | ||
332 | === modified file 'account/data/account_data.xml' | |||
333 | --- account/data/account_data.xml 2013-03-14 14:53:37 +0000 | |||
334 | +++ account/data/account_data.xml 2013-10-29 13:27:40 +0000 | |||
335 | @@ -36,11 +36,6 @@ | |||
336 | 36 | <field eval="account_payment_term_15days" name="payment_id"/> | 36 | <field eval="account_payment_term_15days" name="payment_id"/> |
337 | 37 | </record> | 37 | </record> |
338 | 38 | 38 | ||
339 | 39 | <record forcecreate="True" id="decimal_payment" model="decimal.precision"> | ||
340 | 40 | <field name="name">Payment Term</field> | ||
341 | 41 | <field name="digits">6</field> | ||
342 | 42 | </record> | ||
343 | 43 | |||
344 | 44 | <record id="account_payment_term_net" model="account.payment.term"> | 39 | <record id="account_payment_term_net" model="account.payment.term"> |
345 | 45 | <field name="name">30 Net Days</field> | 40 | <field name="name">30 Net Days</field> |
346 | 46 | <field name="note">30 Net Days</field> | 41 | <field name="note">30 Net Days</field> |
347 | 47 | 42 | ||
348 | === modified file 'account/report/account_entries_report.py' | |||
349 | --- account/report/account_entries_report.py 2013-04-18 10:39:07 +0000 | |||
350 | +++ account/report/account_entries_report.py 2013-10-29 13:27:40 +0000 | |||
351 | @@ -41,7 +41,7 @@ | |||
352 | 41 | 'year': fields.char('Year', size=4, readonly=True), | 41 | 'year': fields.char('Year', size=4, readonly=True), |
353 | 42 | 'date': fields.date('Date', size=128, readonly=True), | 42 | 'date': fields.date('Date', size=128, readonly=True), |
354 | 43 | 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True), | 43 | 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True), |
356 | 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), |
357 | 45 | 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), | 45 | 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), |
358 | 46 | ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), | 46 | ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'), |
359 | 47 | ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True), | 47 | ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True), |
360 | 48 | 48 | ||
361 | === modified file 'account/report/account_general_ledger.rml' | |||
362 | --- account/report/account_general_ledger.rml 2012-06-13 09:06:00 +0000 | |||
363 | +++ account/report/account_general_ledger.rml 2013-10-29 13:27:40 +0000 | |||
364 | @@ -470,16 +470,16 @@ | |||
365 | 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> |
366 | 471 | </td> | 471 | </td> |
367 | 472 | <td> | 472 | <td> |
378 | 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> |
379 | 474 | </td> | 474 | </td> |
380 | 475 | <td> | 475 | <td> |
381 | 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> |
382 | 477 | </td> | 477 | </td> |
383 | 478 | <td> | 478 | <td> |
384 | 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> |
385 | 480 | </td> | 480 | </td> |
386 | 481 | <td> | 481 | <td> |
387 | 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> |
388 | 483 | </td> | 483 | </td> |
389 | 484 | </tr> | 484 | </tr> |
390 | 485 | </blockTable> | 485 | </blockTable> |
391 | @@ -509,13 +509,13 @@ | |||
392 | 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> |
393 | 510 | </td> | 510 | </td> |
394 | 511 | <td> | 511 | <td> |
402 | 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> |
403 | 513 | </td> | 513 | </td> |
404 | 514 | <td> | 514 | <td> |
405 | 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> |
406 | 516 | </td> | 516 | </td> |
407 | 517 | <td> | 517 | <td> |
408 | 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> |
409 | 519 | </td> | 519 | </td> |
410 | 520 | <td> | 520 | <td> |
411 | 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> |
412 | @@ -566,13 +566,13 @@ | |||
413 | 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> |
414 | 567 | </td> | 567 | </td> |
415 | 568 | <td> | 568 | <td> |
423 | 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> |
424 | 570 | </td> | 570 | </td> |
425 | 571 | <td> | 571 | <td> |
426 | 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> |
427 | 573 | </td> | 573 | </td> |
428 | 574 | <td> | 574 | <td> |
429 | 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> |
430 | 576 | </td> | 576 | </td> |
431 | 577 | </tr> | 577 | </tr> |
432 | 578 | </blockTable> | 578 | </blockTable> |
433 | @@ -602,13 +602,13 @@ | |||
434 | 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> |
435 | 603 | </td> | 603 | </td> |
436 | 604 | <td> | 604 | <td> |
444 | 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> |
445 | 606 | </td> | 606 | </td> |
446 | 607 | <td> | 607 | <td> |
447 | 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> |
448 | 609 | </td> | 609 | </td> |
449 | 610 | <td> | 610 | <td> |
450 | 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> |
451 | 612 | </td> | 612 | </td> |
452 | 613 | </tr> | 613 | </tr> |
453 | 614 | </blockTable> | 614 | </blockTable> |
454 | 615 | 615 | ||
455 | === modified file 'account/report/account_general_ledger_landscape.rml' | |||
456 | --- account/report/account_general_ledger_landscape.rml 2013-06-14 21:36:02 +0000 | |||
457 | +++ account/report/account_general_ledger_landscape.rml 2013-10-29 13:27:40 +0000 | |||
458 | @@ -500,16 +500,16 @@ | |||
459 | 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> |
460 | 501 | </td> | 501 | </td> |
461 | 502 | <td> | 502 | <td> |
472 | 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> |
473 | 504 | </td> | 504 | </td> |
474 | 505 | <td> | 505 | <td> |
475 | 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> |
476 | 507 | </td> | 507 | </td> |
477 | 508 | <td> | 508 | <td> |
478 | 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> |
479 | 510 | </td> | 510 | </td> |
480 | 511 | <td> | 511 | <td> |
481 | 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> |
482 | 513 | </td> | 513 | </td> |
483 | 514 | </tr> | 514 | </tr> |
484 | 515 | </blockTable> | 515 | </blockTable> |
485 | @@ -542,13 +542,13 @@ | |||
486 | 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> |
487 | 543 | </td> | 543 | </td> |
488 | 544 | <td> | 544 | <td> |
496 | 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> |
497 | 546 | </td> | 546 | </td> |
498 | 547 | <td> | 547 | <td> |
499 | 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> |
500 | 549 | </td> | 549 | </td> |
501 | 550 | <td> | 550 | <td> |
502 | 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> |
503 | 552 | </td> | 552 | </td> |
504 | 553 | <td> | 553 | <td> |
505 | 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> |
506 | @@ -602,13 +602,13 @@ | |||
507 | 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> |
508 | 603 | </td> | 603 | </td> |
509 | 604 | <td> | 604 | <td> |
517 | 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> |
518 | 606 | </td> | 606 | </td> |
519 | 607 | <td> | 607 | <td> |
520 | 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> |
521 | 609 | </td> | 609 | </td> |
522 | 610 | <td> | 610 | <td> |
523 | 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> |
524 | 612 | </td> | 612 | </td> |
525 | 613 | </tr> | 613 | </tr> |
526 | 614 | </blockTable> | 614 | </blockTable> |
527 | @@ -641,13 +641,13 @@ | |||
528 | 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> |
529 | 642 | </td> | 642 | </td> |
530 | 643 | <td> | 643 | <td> |
538 | 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> |
539 | 645 | </td> | 645 | </td> |
540 | 646 | <td> | 646 | <td> |
541 | 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> |
542 | 648 | </td> | 648 | </td> |
543 | 649 | <td> | 649 | <td> |
544 | 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> |
545 | 651 | </td> | 651 | </td> |
546 | 652 | </tr> | 652 | </tr> |
547 | 653 | </blockTable> | 653 | </blockTable> |
548 | 654 | 654 | ||
549 | === modified file 'account/report/account_invoice_report.py' | |||
550 | --- account/report/account_invoice_report.py 2013-05-14 12:05:18 +0000 | |||
551 | +++ account/report/account_invoice_report.py 2013-10-29 13:27:40 +0000 | |||
552 | @@ -74,9 +74,9 @@ | |||
553 | 74 | 'company_id': fields.many2one('res.company', 'Company', readonly=True), | 74 | 'company_id': fields.many2one('res.company', 'Company', readonly=True), |
554 | 75 | 'user_id': fields.many2one('res.users', 'Salesperson', readonly=True), | 75 | 'user_id': fields.many2one('res.users', 'Salesperson', readonly=True), |
555 | 76 | 'price_total': fields.float('Total Without Tax', readonly=True), | 76 | 'price_total': fields.float('Total Without Tax', readonly=True), |
557 | 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"), |
558 | 78 | 'price_average': fields.float('Average Price', readonly=True, group_operator="avg"), | 78 | 'price_average': fields.float('Average Price', readonly=True, group_operator="avg"), |
560 | 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"), |
561 | 80 | 'currency_rate': fields.float('Currency Rate', readonly=True), | 80 | 'currency_rate': fields.float('Currency Rate', readonly=True), |
562 | 81 | 'nbr':fields.integer('# of Lines', readonly=True), | 81 | 'nbr':fields.integer('# of Lines', readonly=True), |
563 | 82 | 'type': fields.selection([ | 82 | 'type': fields.selection([ |
564 | @@ -98,7 +98,7 @@ | |||
565 | 98 | 'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True), | 98 | 'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True), |
566 | 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), |
567 | 100 | 'residual': fields.float('Total Residual', readonly=True), | 100 | 'residual': fields.float('Total Residual', readonly=True), |
569 | 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"), |
570 | 102 | 'country_id': fields.many2one('res.country', 'Country of the Partner Company'), | 102 | 'country_id': fields.many2one('res.country', 'Country of the Partner Company'), |
571 | 103 | } | 103 | } |
572 | 104 | _order = 'date desc' | 104 | _order = 'date desc' |
573 | 105 | 105 | ||
574 | === modified file 'account/report/account_print_invoice.rml' | |||
575 | --- account/report/account_print_invoice.rml 2013-05-27 16:30:46 +0000 | |||
576 | +++ account/report/account_print_invoice.rml 2013-10-29 13:27:40 +0000 | |||
577 | @@ -253,10 +253,10 @@ | |||
578 | 253 | <para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para> | 253 | <para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para> |
579 | 254 | </td> | 254 | </td> |
580 | 255 | <td> | 255 | <td> |
582 | 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> |
583 | 257 | </td> | 257 | </td> |
584 | 258 | <td> | 258 | <td> |
586 | 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> |
587 | 260 | </td> | 260 | </td> |
588 | 261 | </tr> | 261 | </tr> |
589 | 262 | </blockTable> | 262 | </blockTable> |
590 | @@ -272,7 +272,7 @@ | |||
591 | 272 | <para style="terp_default_9">Net Total:</para> | 272 | <para style="terp_default_9">Net Total:</para> |
592 | 273 | </td> | 273 | </td> |
593 | 274 | <td> | 274 | <td> |
595 | 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> |
596 | 276 | </td> | 276 | </td> |
597 | 277 | </tr> | 277 | </tr> |
598 | 278 | <tr> | 278 | <tr> |
599 | @@ -285,7 +285,7 @@ | |||
600 | 285 | <para style="terp_default_9">Taxes:</para> | 285 | <para style="terp_default_9">Taxes:</para> |
601 | 286 | </td> | 286 | </td> |
602 | 287 | <td> | 287 | <td> |
604 | 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> |
605 | 289 | </td> | 289 | </td> |
606 | 290 | </tr> | 290 | </tr> |
607 | 291 | <tr> | 291 | <tr> |
608 | @@ -298,7 +298,7 @@ | |||
609 | 298 | <para style="terp_tblheader_Details"><b>Total:</b></para> | 298 | <para style="terp_tblheader_Details"><b>Total:</b></para> |
610 | 299 | </td> | 299 | </td> |
611 | 300 | <td> | 300 | <td> |
613 | 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> |
614 | 302 | </td> | 302 | </td> |
615 | 303 | </tr> | 303 | </tr> |
616 | 304 | </blockTable> | 304 | </blockTable> |
617 | @@ -331,10 +331,10 @@ | |||
618 | 331 | <para style="terp_default_8">[[ t.name ]]</para> | 331 | <para style="terp_default_8">[[ t.name ]]</para> |
619 | 332 | </td> | 332 | </td> |
620 | 333 | <td> | 333 | <td> |
622 | 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> |
623 | 335 | </td> | 335 | </td> |
624 | 336 | <td> | 336 | <td> |
626 | 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> |
627 | 338 | </td> | 338 | </td> |
628 | 339 | <td> | 339 | <td> |
629 | 340 | <para style="terp_default_8"> | 340 | <para style="terp_default_8"> |
630 | 341 | 341 | ||
631 | === modified file 'account/report/account_treasury_report.py' | |||
632 | --- account/report/account_treasury_report.py 2013-04-15 10:23:49 +0000 | |||
633 | +++ account/report/account_treasury_report.py 2013-10-29 13:27:40 +0000 | |||
634 | @@ -47,8 +47,8 @@ | |||
635 | 47 | 'credit': fields.float('Credit', readonly=True), | 47 | 'credit': fields.float('Credit', readonly=True), |
636 | 48 | 'balance': fields.float('Balance', readonly=True), | 48 | 'balance': fields.float('Balance', readonly=True), |
637 | 49 | 'date': fields.date('Beginning of Period Date', readonly=True), | 49 | 'date': fields.date('Beginning of Period Date', readonly=True), |
640 | 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'), |
641 | 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'), |
642 | 52 | 'company_id': fields.many2one('res.company', 'Company', readonly=True), | 52 | 'company_id': fields.many2one('res.company', 'Company', readonly=True), |
643 | 53 | } | 53 | } |
644 | 54 | 54 | ||
645 | 55 | 55 | ||
646 | === modified file 'account/res_config.py' | |||
647 | --- account/res_config.py 2013-09-17 12:38:14 +0000 | |||
648 | +++ account/res_config.py 2013-10-29 13:27:40 +0000 | |||
649 | @@ -330,12 +330,12 @@ | |||
650 | 330 | fiscalyear.create_period3(cr, uid, [fiscalyear_id]) | 330 | fiscalyear.create_period3(cr, uid, [fiscalyear_id]) |
651 | 331 | 331 | ||
652 | 332 | def get_default_dp(self, cr, uid, fields, context=None): | 332 | def get_default_dp(self, cr, uid, fields, context=None): |
654 | 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') |
655 | 334 | return {'decimal_precision': dp.digits} | 334 | return {'decimal_precision': dp.digits} |
656 | 335 | 335 | ||
657 | 336 | def set_default_dp(self, cr, uid, ids, context=None): | 336 | def set_default_dp(self, cr, uid, ids, context=None): |
658 | 337 | config = self.browse(cr, uid, ids[0], context) | 337 | config = self.browse(cr, uid, ids[0], context) |
660 | 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') |
661 | 339 | dp.write({'digits': config.decimal_precision}) | 339 | dp.write({'digits': config.decimal_precision}) |
662 | 340 | 340 | ||
663 | 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): |
664 | 342 | 342 | ||
665 | === modified file 'account/test/price_accuracy00.yml' | |||
666 | --- account/test/price_accuracy00.yml 2012-11-29 22:26:45 +0000 | |||
667 | +++ account/test/price_accuracy00.yml 2013-10-29 13:27:40 +0000 | |||
668 | @@ -6,7 +6,7 @@ | |||
669 | 6 | Given the price accuracy for the account module is configured with two | 6 | Given the price accuracy for the account module is configured with two |
670 | 7 | digits | 7 | digits |
671 | 8 | - | 8 | - |
673 | 9 | !record {model: decimal.precision, id: product.decimal_account}: | 9 | !record {model: decimal.precision, id: product.decimal_amount}: |
674 | 10 | digits: 2 | 10 | digits: 2 |
675 | 11 | - | 11 | - |
676 | 12 | And we have a tax defined | 12 | And we have a tax defined |
677 | @@ -61,7 +61,7 @@ | |||
678 | 61 | - | 61 | - |
679 | 62 | Then, I change the precision of numbers to 3 digits. | 62 | Then, I change the precision of numbers to 3 digits. |
680 | 63 | - | 63 | - |
682 | 64 | !record {model: decimal.precision, id: product.decimal_account}: | 64 | !record {model: decimal.precision, id: product.decimal_amount}: |
683 | 65 | digits: 3 | 65 | digits: 3 |
684 | 66 | - | 66 | - |
685 | 67 | And I create another invoice with the same content. | 67 | And I create another invoice with the same content. |
686 | 68 | 68 | ||
687 | === modified file 'account/wizard/account_reconcile.py' | |||
688 | --- account/wizard/account_reconcile.py 2013-04-18 10:39:07 +0000 | |||
689 | +++ account/wizard/account_reconcile.py 2013-10-29 13:27:40 +0000 | |||
690 | @@ -33,9 +33,9 @@ | |||
691 | 33 | _description = 'Account move line reconcile' | 33 | _description = 'Account move line reconcile' |
692 | 34 | _columns = { | 34 | _columns = { |
693 | 35 | 'trans_nbr': fields.integer('# of Transaction', readonly=True), | 35 | 'trans_nbr': fields.integer('# of Transaction', readonly=True), |
697 | 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')), |
698 | 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')), |
699 | 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')), |
700 | 39 | } | 39 | } |
701 | 40 | 40 | ||
702 | 41 | def default_get(self, cr, uid, fields, context=None): | 41 | def default_get(self, cr, uid, fields, context=None): |
703 | 42 | 42 | ||
704 | === modified file 'account/wizard/pos_box.py' | |||
705 | --- account/wizard/pos_box.py 2013-06-03 12:18:52 +0000 | |||
706 | +++ account/wizard/pos_box.py 2013-10-29 13:27:40 +0000 | |||
707 | @@ -9,7 +9,7 @@ | |||
708 | 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 |
709 | 10 | # in the context of the action | 10 | # in the context of the action |
710 | 11 | 'amount' : fields.float('Amount', | 11 | 'amount' : fields.float('Amount', |
712 | 12 | digits_compute = dp.get_precision('Account'), | 12 | digits_compute = dp.get_precision('Amount'), |
713 | 13 | required=True), | 13 | required=True), |
714 | 14 | } | 14 | } |
715 | 15 | 15 | ||
716 | 16 | 16 | ||
717 | === modified file 'account_analytic_analysis/account_analytic_analysis.py' | |||
718 | --- account_analytic_analysis/account_analytic_analysis.py 2013-10-03 11:12:22 +0000 | |||
719 | +++ account_analytic_analysis/account_analytic_analysis.py 2013-10-29 13:27:40 +0000 | |||
720 | @@ -48,10 +48,10 @@ | |||
721 | 48 | 'product_id': fields.many2one('product.product','Product',required=True), | 48 | 'product_id': fields.many2one('product.product','Product',required=True), |
722 | 49 | 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'), | 49 | 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'), |
723 | 50 | 'name': fields.text('Description', required=True), | 50 | 'name': fields.text('Description', required=True), |
725 | 51 | 'quantity': fields.float('Quantity', required=True), | 51 | 'quantity': fields.float('Quantity', required=True, digits_compute=dp.get_precision('Quantity')), |
726 | 52 | 'uom_id': fields.many2one('product.uom', 'Unit of Measure',required=True), | 52 | 'uom_id': fields.many2one('product.uom', 'Unit of Measure',required=True), |
729 | 53 | 'price_unit': fields.float('Unit Price', required=True), | 53 | 'price_unit': fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Price')), |
730 | 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')), |
731 | 55 | } | 55 | } |
732 | 56 | _defaults = { | 56 | _defaults = { |
733 | 57 | 'quantity' : 1, | 57 | 'quantity' : 1, |
734 | @@ -453,16 +453,16 @@ | |||
735 | 453 | }), | 453 | }), |
736 | 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', |
737 | 455 | help="Total customer invoiced amount for this account.", | 455 | help="Total customer invoiced amount for this account.", |
739 | 456 | digits_compute=dp.get_precision('Account')), | 456 | digits_compute=dp.get_precision('Amount')), |
740 | 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', |
741 | 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.", |
743 | 459 | digits_compute=dp.get_precision('Account')), | 459 | digits_compute=dp.get_precision('Amount')), |
744 | 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', |
745 | 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.", |
747 | 462 | digits_compute=dp.get_precision('Account')), | 462 | digits_compute=dp.get_precision('Amount')), |
748 | 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', |
749 | 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.", |
751 | 465 | digits_compute=dp.get_precision('Account')), | 465 | digits_compute=dp.get_precision('Amount')), |
752 | 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', |
753 | 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'."), |
754 | 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', |
755 | @@ -485,19 +485,19 @@ | |||
756 | 485 | help="Sum of timesheet lines invoiced for this contract."), | 485 | help="Sum of timesheet lines invoiced for this contract."), |
757 | 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', |
758 | 487 | help="Computed using the formula: Max Invoice Price - Invoiced Amount.", | 487 | help="Computed using the formula: Max Invoice Price - Invoiced Amount.", |
760 | 488 | digits_compute=dp.get_precision('Account')), | 488 | digits_compute=dp.get_precision('Amount')), |
761 | 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)', |
762 | 490 | help="Computed using the formula: Invoiced Amount / Total Time", | 490 | help="Computed using the formula: Invoiced Amount / Total Time", |
764 | 491 | digits_compute=dp.get_precision('Account')), | 491 | digits_compute=dp.get_precision('Amount')), |
765 | 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', |
766 | 493 | help="Computed using the formula: Invoiced Amount - Total Costs.", | 493 | help="Computed using the formula: Invoiced Amount - Total Costs.", |
768 | 494 | digits_compute=dp.get_precision('Account')), | 494 | digits_compute=dp.get_precision('Amount')), |
769 | 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', |
770 | 496 | help="Computed using the formula: Theoretical Revenue - Total Costs", | 496 | help="Computed using the formula: Theoretical Revenue - Total Costs", |
772 | 497 | digits_compute=dp.get_precision('Account')), | 497 | digits_compute=dp.get_precision('Amount')), |
773 | 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 (%)', |
774 | 499 | help="Computes using the formula: (Real Margin / Total Costs) * 100.", | 499 | help="Computes using the formula: (Real Margin / Total Costs) * 100.", |
776 | 500 | digits_compute=dp.get_precision('Account')), | 500 | digits_compute=dp.get_precision('Amount')), |
777 | 501 | 'fix_price_invoices' : fields.boolean('Fixed Price'), | 501 | 'fix_price_invoices' : fields.boolean('Fixed Price'), |
778 | 502 | 'invoice_on_timesheets' : fields.boolean("On Timesheets"), | 502 | 'invoice_on_timesheets' : fields.boolean("On Timesheets"), |
779 | 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'), |
780 | 504 | 504 | ||
781 | === modified file 'account_asset/account_asset.py' | |||
782 | --- account_asset/account_asset.py 2013-04-18 10:39:07 +0000 | |||
783 | +++ account_asset/account_asset.py 2013-10-29 13:27:40 +0000 | |||
784 | @@ -242,7 +242,7 @@ | |||
785 | 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)]}), |
786 | 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)]}), |
787 | 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)]}), |
789 | 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)]}), |
790 | 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)]}), |
791 | 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)]}), |
792 | 248 | 'note': fields.text('Note'), | 248 | 'note': fields.text('Note'), |
793 | @@ -263,7 +263,7 @@ | |||
794 | 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"), |
795 | 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)]}), |
796 | 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)]}), |
798 | 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'), |
799 | 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)]}, |
800 | 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"\ |
801 | 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" \ |
802 | @@ -271,7 +271,7 @@ | |||
803 | 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'), |
804 | 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), |
805 | 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)]}), |
807 | 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)]}), |
808 | 275 | } | 275 | } |
809 | 276 | _defaults = { | 276 | _defaults = { |
810 | 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'), |
811 | @@ -376,9 +376,9 @@ | |||
812 | 376 | 'sequence': fields.integer('Sequence', required=True), | 376 | 'sequence': fields.integer('Sequence', required=True), |
813 | 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'), |
814 | 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'), |
818 | 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), |
819 | 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), |
820 | 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), |
821 | 382 | 'depreciation_date': fields.date('Depreciation Date', select=1), | 382 | 'depreciation_date': fields.date('Depreciation Date', select=1), |
822 | 383 | 'move_id': fields.many2one('account.move', 'Depreciation Entry'), | 383 | 'move_id': fields.many2one('account.move', 'Depreciation Entry'), |
823 | 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) |
824 | 385 | 385 | ||
825 | === modified file 'account_bank_statement_extensions/account_bank_statement.py' | |||
826 | --- account_bank_statement_extensions/account_bank_statement.py 2013-04-15 10:23:49 +0000 | |||
827 | +++ account_bank_statement_extensions/account_bank_statement.py 2013-10-29 13:27:40 +0000 | |||
828 | @@ -71,7 +71,7 @@ | |||
829 | 71 | ('coda', 'CODA'), | 71 | ('coda', 'CODA'), |
830 | 72 | ('manual', 'Manual'), | 72 | ('manual', 'Manual'), |
831 | 73 | ], 'Type', required=True), | 73 | ], 'Type', required=True), |
833 | 74 | 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')), | 74 | 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')), |
834 | 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'), |
835 | 76 | } | 76 | } |
836 | 77 | _rec_name = 'code' | 77 | _rec_name = 'code' |
837 | 78 | 78 | ||
838 | === modified file 'account_budget/account_budget.py' | |||
839 | --- account_budget/account_budget.py 2013-04-15 10:23:49 +0000 | |||
840 | +++ account_budget/account_budget.py 2013-10-29 13:27:40 +0000 | |||
841 | @@ -193,9 +193,9 @@ | |||
842 | 193 | 'date_from': fields.date('Start Date', required=True), | 193 | 'date_from': fields.date('Start Date', required=True), |
843 | 194 | 'date_to': fields.date('End Date', required=True), | 194 | 'date_to': fields.date('End Date', required=True), |
844 | 195 | 'paid_date': fields.date('Paid Date'), | 195 | 'paid_date': fields.date('Paid Date'), |
848 | 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')), |
849 | 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')), |
850 | 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')), |
851 | 199 | 'percentage':fields.function(_perc, string='Percentage', type='float'), | 199 | 'percentage':fields.function(_perc, string='Percentage', type='float'), |
852 | 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) |
853 | 201 | } | 201 | } |
854 | 202 | 202 | ||
855 | === modified file 'account_budget/report/budget_report.rml' | |||
856 | --- account_budget/report/budget_report.rml 2011-12-21 09:08:11 +0000 | |||
857 | +++ account_budget/report/budget_report.rml 2013-10-29 13:27:40 +0000 | |||
858 | @@ -148,13 +148,13 @@ | |||
859 | 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> |
860 | 149 | </td> | 149 | </td> |
861 | 150 | <td> | 150 | <td> |
869 | 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> |
870 | 152 | </td> | 152 | </td> |
871 | 153 | <td> | 153 | <td> |
872 | 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> |
873 | 155 | </td> | 155 | </td> |
874 | 156 | <td> | 156 | <td> |
875 | 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> |
876 | 158 | </td> | 158 | </td> |
877 | 159 | <td> | 159 | <td> |
878 | 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> |
879 | @@ -168,13 +168,13 @@ | |||
880 | 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> |
881 | 169 | </td> | 169 | </td> |
882 | 170 | <td> | 170 | <td> |
890 | 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> |
891 | 172 | </td> | 172 | </td> |
892 | 173 | <td> | 173 | <td> |
893 | 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> |
894 | 175 | </td> | 175 | </td> |
895 | 176 | <td> | 176 | <td> |
896 | 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> |
897 | 178 | </td> | 178 | </td> |
898 | 179 | <td> | 179 | <td> |
899 | 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> |
900 | 181 | 181 | ||
901 | === modified file 'account_budget/report/crossovered_budget_report.rml' | |||
902 | --- account_budget/report/crossovered_budget_report.rml 2011-12-21 09:08:11 +0000 | |||
903 | +++ account_budget/report/crossovered_budget_report.rml 2013-10-29 13:27:40 +0000 | |||
904 | @@ -163,13 +163,13 @@ | |||
905 | 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> |
906 | 164 | </td> | 164 | </td> |
907 | 165 | <td> | 165 | <td> |
915 | 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> |
916 | 167 | </td> | 167 | </td> |
917 | 168 | <td> | 168 | <td> |
918 | 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> |
919 | 170 | </td> | 170 | </td> |
920 | 171 | <td> | 171 | <td> |
921 | 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> |
922 | 173 | </td> | 173 | </td> |
923 | 174 | <td> | 174 | <td> |
924 | 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> |
925 | @@ -183,13 +183,13 @@ | |||
926 | 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> |
927 | 184 | </td> | 184 | </td> |
928 | 185 | <td> | 185 | <td> |
936 | 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> |
937 | 187 | </td> | 187 | </td> |
938 | 188 | <td> | 188 | <td> |
939 | 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> |
940 | 190 | </td> | 190 | </td> |
941 | 191 | <td> | 191 | <td> |
942 | 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> |
943 | 193 | </td> | 193 | </td> |
944 | 194 | <td> | 194 | <td> |
945 | 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> |
946 | 196 | 196 | ||
947 | === modified file 'account_followup/account_followup.py' | |||
948 | --- account_followup/account_followup.py 2013-10-08 17:07:14 +0000 | |||
949 | +++ account_followup/account_followup.py 2013-10-29 13:27:40 +0000 | |||
950 | @@ -274,7 +274,7 @@ | |||
951 | 274 | strbegin = "<TD><B>" | 274 | strbegin = "<TD><B>" |
952 | 275 | strend = "</B></TD>" | 275 | strend = "</B></TD>" |
953 | 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>" |
955 | 277 | total = rml_parse.formatLang(total, dp='Account', currency_obj=currency) | 277 | total = rml_parse.formatLang(total, dp='Amount', currency_obj=currency) |
956 | 278 | followup_table += '''<tr> </tr> | 278 | followup_table += '''<tr> </tr> |
957 | 279 | </table> | 279 | </table> |
958 | 280 | <center>''' + _("Amount due") + ''' : %s </center>''' % (total) | 280 | <center>''' + _("Amount due") + ''' : %s </center>''' % (total) |
959 | 281 | 281 | ||
960 | === modified file 'account_followup/wizard/account_followup_print.py' | |||
961 | --- account_followup/wizard/account_followup_print.py 2013-10-08 17:23:19 +0000 | |||
962 | +++ account_followup/wizard/account_followup_print.py 2013-10-29 13:27:40 +0000 | |||
963 | @@ -25,6 +25,8 @@ | |||
964 | 25 | from openerp import tools | 25 | from openerp import tools |
965 | 26 | from openerp.osv import fields, osv | 26 | from openerp.osv import fields, osv |
966 | 27 | from openerp.tools.translate import _ | 27 | from openerp.tools.translate import _ |
967 | 28 | import openerp.addons.decimal_precision as dp | ||
968 | 29 | |||
969 | 28 | 30 | ||
970 | 29 | class account_followup_stat_by_partner(osv.osv): | 31 | class account_followup_stat_by_partner(osv.osv): |
971 | 30 | _name = "account_followup.stat.by.partner" | 32 | _name = "account_followup.stat.by.partner" |
972 | @@ -38,7 +40,7 @@ | |||
973 | 38 | 'date_followup':fields.date('Latest follow-up', readonly=True), | 40 | 'date_followup':fields.date('Latest follow-up', readonly=True), |
974 | 39 | 'max_followup_id': fields.many2one('account_followup.followup.line', | 41 | 'max_followup_id': fields.many2one('account_followup.followup.line', |
975 | 40 | 'Max Follow Up Level', readonly=True, ondelete="cascade"), | 42 | 'Max Follow Up Level', readonly=True, ondelete="cascade"), |
977 | 41 | 'balance':fields.float('Balance', readonly=True), | 43 | 'balance':fields.float('Balance', readonly=True, digits_compute=dp.get_precision('Amount')), |
978 | 42 | 'company_id': fields.many2one('res.company', 'Company', readonly=True), | 44 | 'company_id': fields.many2one('res.company', 'Company', readonly=True), |
979 | 43 | } | 45 | } |
980 | 44 | 46 | ||
981 | 45 | 47 | ||
982 | === modified file 'account_payment/account_payment.py' | |||
983 | --- account_payment/account_payment.py 2013-04-15 10:23:49 +0000 | |||
984 | +++ account_payment/account_payment.py 2013-10-29 13:27:40 +0000 | |||
985 | @@ -23,6 +23,8 @@ | |||
986 | 23 | import time | 23 | import time |
987 | 24 | 24 | ||
988 | 25 | from openerp.osv import fields, osv | 25 | from openerp.osv import fields, osv |
989 | 26 | from openerp.addons.decimal_precision import decimal_precision as dp | ||
990 | 27 | |||
991 | 26 | 28 | ||
992 | 27 | _logger = logging.getLogger(__name__) | 29 | _logger = logging.getLogger(__name__) |
993 | 28 | 30 | ||
994 | @@ -96,7 +98,7 @@ | |||
995 | 96 | ('done', 'Done')], 'Status', select=True, | 98 | ('done', 'Done')], 'Status', select=True, |
996 | 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\'.'), |
997 | 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)]}), |
999 | 99 | 'total': fields.function(_total, string="Total", type='float'), | 101 | 'total': fields.function(_total, string="Total", type='float', digits_compute= dp.get_precision('Amount')), |
1000 | 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)]}), |
1001 | 101 | 'date_prefered': fields.selection([ | 103 | 'date_prefered': fields.selection([ |
1002 | 102 | ('now', 'Directly'), | 104 | ('now', 'Directly'), |
1003 | @@ -307,7 +309,7 @@ | |||
1004 | 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 ?'"), |
1005 | 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.'), |
1006 | 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.'), |
1008 | 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'), |
1009 | 311 | required=True, help='Payment amount in the partner currency'), | 313 | required=True, help='Payment amount in the partner currency'), |
1010 | 312 | 'currency': fields.many2one('res.currency','Partner Currency', required=True), | 314 | 'currency': fields.many2one('res.currency','Partner Currency', required=True), |
1011 | 313 | 'company_currency': fields.many2one('res.currency', 'Company Currency', readonly=True), | 315 | 'company_currency': fields.many2one('res.currency', 'Company Currency', readonly=True), |
1012 | 314 | 316 | ||
1013 | === modified file 'account_voucher/account_voucher.py' | |||
1014 | --- account_voucher/account_voucher.py 2013-08-23 15:46:55 +0000 | |||
1015 | +++ account_voucher/account_voucher.py 2013-10-29 13:27:40 +0000 | |||
1016 | @@ -357,8 +357,8 @@ | |||
1017 | 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. \ |
1018 | 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 \ |
1019 | 359 | \n* The \'Cancelled\' status is used when user cancel voucher.'), | 359 | \n* The \'Cancelled\' status is used when user cancel voucher.'), |
1022 | 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)]}), |
1023 | 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)]}), |
1024 | 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."), |
1025 | 363 | 'number': fields.char('Number', size=32, readonly=True,), | 363 | 'number': fields.char('Number', size=32, readonly=True,), |
1026 | 364 | 'move_id':fields.many2one('account.move', 'Account Entry'), | 364 | 'move_id':fields.many2one('account.move', 'Account Entry'), |
1027 | @@ -380,7 +380,7 @@ | |||
1028 | 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)]}), |
1029 | 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)]}), |
1030 | 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)]}), |
1032 | 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."), |
1033 | 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)]}), |
1034 | 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)]}, |
1035 | 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.'), |
1036 | @@ -1182,7 +1182,7 @@ | |||
1037 | 1182 | ctx.update({ | 1182 | ctx.update({ |
1038 | 1183 | 'voucher_special_currency_rate': voucher_currency.rate * voucher.payment_rate , | 1183 | 'voucher_special_currency_rate': voucher_currency.rate * voucher.payment_rate , |
1039 | 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,}) |
1041 | 1185 | prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') | 1185 | prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Amount') |
1042 | 1186 | for line in voucher.line_ids: | 1186 | for line in voucher.line_ids: |
1043 | 1187 | #create one move line per voucher line where amount is not 0.0 | 1187 | #create one move line per voucher line where amount is not 0.0 |
1044 | 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) |
1045 | @@ -1481,16 +1481,16 @@ | |||
1046 | 1481 | 'name':fields.char('Description', size=256), | 1481 | 'name':fields.char('Description', size=256), |
1047 | 1482 | 'account_id':fields.many2one('account.account','Account', required=True), | 1482 | 'account_id':fields.many2one('account.account','Account', required=True), |
1048 | 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'), |
1051 | 1484 | 'untax_amount':fields.float('Untax Amount'), | 1484 | 'untax_amount':fields.float('Untax Amount', digits_compute=dp.get_precision('Amount')), |
1052 | 1485 | 'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')), | 1485 | 'amount':fields.float('Amount', digits_compute=dp.get_precision('Amount')), |
1053 | 1486 | 'reconcile': fields.boolean('Full Reconcile'), | 1486 | 'reconcile': fields.boolean('Full Reconcile'), |
1054 | 1487 | 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'), | 1487 | 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'), |
1055 | 1488 | 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), | 1488 | 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), |
1056 | 1489 | 'move_line_id': fields.many2one('account.move.line', 'Journal Item'), | 1489 | 'move_line_id': fields.many2one('account.move.line', 'Journal Item'), |
1057 | 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), |
1058 | 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), |
1061 | 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')), |
1062 | 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')), |
1063 | 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), |
1064 | 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), |
1065 | 1496 | } | 1496 | } |
1066 | 1497 | 1497 | ||
1067 | === modified file 'analytic/analytic.py' | |||
1068 | --- analytic/analytic.py 2013-09-10 12:48:03 +0000 | |||
1069 | +++ analytic/analytic.py 2013-10-29 13:27:40 +0000 | |||
1070 | @@ -185,9 +185,9 @@ | |||
1071 | 185 | 'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'), | 185 | 'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'), |
1072 | 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'), |
1073 | 187 | 'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'), | 187 | 'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'), |
1077 | 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')), |
1078 | 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')), |
1079 | 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')), |
1080 | 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'), |
1081 | 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.)'), |
1082 | 193 | 'partner_id': fields.many2one('res.partner', 'Customer'), | 193 | 'partner_id': fields.many2one('res.partner', 'Customer'), |
1083 | @@ -315,7 +315,7 @@ | |||
1084 | 315 | _columns = { | 315 | _columns = { |
1085 | 316 | 'name': fields.char('Description', size=256, required=True), | 316 | 'name': fields.char('Description', size=256, required=True), |
1086 | 317 | 'date': fields.date('Date', required=True, select=True), | 317 | 'date': fields.date('Date', required=True, select=True), |
1088 | 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')), |
1089 | 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.'), |
1090 | 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')]), |
1091 | 321 | 'user_id': fields.many2one('res.users', 'User'), | 321 | 'user_id': fields.many2one('res.users', 'User'), |
1092 | 322 | 322 | ||
1093 | === modified file 'analytic_contract_hr_expense/analytic_contract_hr_expense.py' | |||
1094 | --- analytic_contract_hr_expense/analytic_contract_hr_expense.py 2013-04-29 15:14:10 +0000 | |||
1095 | +++ analytic_contract_hr_expense/analytic_contract_hr_expense.py 2013-10-29 13:27:40 +0000 | |||
1096 | @@ -112,7 +112,7 @@ | |||
1097 | 112 | 'est_expenses': fields.float('Estimation of Expenses to Invoice'), | 112 | 'est_expenses': fields.float('Estimation of Expenses to Invoice'), |
1098 | 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', |
1099 | 114 | help="Total customer invoiced amount for this account.", | 114 | help="Total customer invoiced amount for this account.", |
1101 | 115 | digits_compute=dp.get_precision('Account')), | 115 | digits_compute=dp.get_precision('Amount')), |
1102 | 116 | } | 116 | } |
1103 | 117 | 117 | ||
1104 | 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): |
1105 | 119 | 119 | ||
1106 | === modified file 'analytic_user_function/analytic_user_function.py' | |||
1107 | --- analytic_user_function/analytic_user_function.py 2013-08-23 15:46:55 +0000 | |||
1108 | +++ analytic_user_function/analytic_user_function.py 2013-10-29 13:27:40 +0000 | |||
1109 | @@ -31,7 +31,7 @@ | |||
1110 | 31 | 'product_id': fields.many2one("product.product", "Service", required=True,), | 31 | 'product_id': fields.many2one("product.product", "Service", required=True,), |
1111 | 32 | 'account_id': fields.many2one("account.analytic.account", "Analytic Account", required=True,), | 32 | 'account_id': fields.many2one("account.analytic.account", "Analytic Account", required=True,), |
1112 | 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), |
1114 | 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), |
1115 | 35 | } | 35 | } |
1116 | 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): |
1117 | 37 | if not user_id: | 37 | if not user_id: |
1118 | 38 | 38 | ||
1119 | === modified file 'decimal_precision/__openerp__.py' | |||
1120 | --- decimal_precision/__openerp__.py 2012-11-29 22:26:45 +0000 | |||
1121 | +++ decimal_precision/__openerp__.py 2013-10-29 13:27:40 +0000 | |||
1122 | @@ -33,6 +33,7 @@ | |||
1123 | 33 | 'category' : 'Hidden/Dependency', | 33 | 'category' : 'Hidden/Dependency', |
1124 | 34 | 'data': [ | 34 | 'data': [ |
1125 | 35 | 'decimal_precision_view.xml', | 35 | 'decimal_precision_view.xml', |
1126 | 36 | 'decimal_precision_data.xml', | ||
1127 | 36 | 'security/ir.model.access.csv', | 37 | 'security/ir.model.access.csv', |
1128 | 37 | ], | 38 | ], |
1129 | 38 | 'demo': [], | 39 | 'demo': [], |
1130 | 39 | 40 | ||
1131 | === added file 'decimal_precision/decimal_precision_data.xml' | |||
1132 | --- decimal_precision/decimal_precision_data.xml 1970-01-01 00:00:00 +0000 | |||
1133 | +++ decimal_precision/decimal_precision_data.xml 2013-10-29 13:27:40 +0000 | |||
1134 | @@ -0,0 +1,12 @@ | |||
1135 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
1136 | 2 | <openerp> | ||
1137 | 3 | <data noupdate="1"> | ||
1138 | 4 | |||
1139 | 5 | <!-- Decimal Precision --> | ||
1140 | 6 | <record forcecreate="True" id="decimal_price" model="decimal.precision"> | ||
1141 | 7 | <field name="name">Price</field> | ||
1142 | 8 | <field name="digits">2</field> | ||
1143 | 9 | </record> | ||
1144 | 10 | |||
1145 | 11 | </data> | ||
1146 | 12 | </openerp> | ||
1147 | 0 | \ No newline at end of file | 13 | \ No newline at end of file |
1148 | 1 | 14 | ||
1149 | === modified file 'delivery/delivery.py' | |||
1150 | --- delivery/delivery.py 2013-04-15 10:23:49 +0000 | |||
1151 | +++ delivery/delivery.py 2013-10-29 13:27:40 +0000 | |||
1152 | @@ -236,8 +236,8 @@ | |||
1153 | 236 | 'max_value': fields.float('Maximum Value', required=True), | 236 | 'max_value': fields.float('Maximum Value', required=True), |
1154 | 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), |
1155 | 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), |
1158 | 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), |
1159 | 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), |
1160 | 241 | } | 241 | } |
1161 | 242 | _defaults = { | 242 | _defaults = { |
1162 | 243 | 'type': lambda *args: 'weight', | 243 | 'type': lambda *args: 'weight', |
1163 | 244 | 244 | ||
1164 | === modified file 'delivery/stock.py' | |||
1165 | --- delivery/stock.py 2013-04-15 10:23:49 +0000 | |||
1166 | +++ delivery/stock.py 2013-10-29 13:27:40 +0000 | |||
1167 | @@ -54,12 +54,12 @@ | |||
1168 | 54 | _columns = { | 54 | _columns = { |
1169 | 55 | 'carrier_id':fields.many2one("delivery.carrier","Carrier"), | 55 | 'carrier_id':fields.many2one("delivery.carrier","Carrier"), |
1170 | 56 | 'volume': fields.float('Volume'), | 56 | 'volume': fields.float('Volume'), |
1172 | 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', |
1173 | 58 | store={ | 58 | store={ |
1174 | 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), |
1175 | 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), |
1176 | 61 | }), | 61 | }), |
1178 | 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', |
1179 | 63 | store={ | 63 | store={ |
1180 | 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), |
1181 | 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), |
1182 | @@ -167,11 +167,11 @@ | |||
1183 | 167 | return res | 167 | return res |
1184 | 168 | 168 | ||
1185 | 169 | _columns = { | 169 | _columns = { |
1187 | 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', |
1188 | 171 | store={ | 171 | store={ |
1189 | 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), |
1190 | 173 | }), | 173 | }), |
1192 | 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', |
1193 | 175 | store={ | 175 | store={ |
1194 | 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), |
1195 | 177 | }), | 177 | }), |
1196 | @@ -200,12 +200,12 @@ | |||
1197 | 200 | _columns = { | 200 | _columns = { |
1198 | 201 | 'carrier_id':fields.many2one("delivery.carrier","Carrier"), | 201 | 'carrier_id':fields.many2one("delivery.carrier","Carrier"), |
1199 | 202 | 'volume': fields.float('Volume'), | 202 | 'volume': fields.float('Volume'), |
1201 | 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', |
1202 | 204 | store={ | 204 | store={ |
1203 | 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), |
1204 | 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), |
1205 | 207 | }), | 207 | }), |
1207 | 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', |
1208 | 209 | store={ | 209 | store={ |
1209 | 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), |
1210 | 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), |
1211 | @@ -224,12 +224,12 @@ | |||
1212 | 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) |
1213 | 225 | 225 | ||
1214 | 226 | _columns = { | 226 | _columns = { |
1216 | 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', |
1217 | 228 | store={ | 228 | store={ |
1218 | 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), |
1219 | 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), |
1220 | 231 | }), | 231 | }), |
1222 | 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', |
1223 | 233 | store={ | 233 | store={ |
1224 | 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), |
1225 | 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), |
1226 | 236 | 236 | ||
1227 | === modified file 'hr_contract/hr_contract.py' | |||
1228 | --- hr_contract/hr_contract.py 2013-06-27 11:00:29 +0000 | |||
1229 | +++ hr_contract/hr_contract.py 2013-10-29 13:27:40 +0000 | |||
1230 | @@ -21,6 +21,7 @@ | |||
1231 | 21 | import time | 21 | import time |
1232 | 22 | 22 | ||
1233 | 23 | from openerp.osv import fields, osv | 23 | from openerp.osv import fields, osv |
1234 | 24 | import openerp.addons.decimal_precision as dp | ||
1235 | 24 | 25 | ||
1236 | 25 | class hr_employee(osv.osv): | 26 | class hr_employee(osv.osv): |
1237 | 26 | _name = "hr.employee" | 27 | _name = "hr.employee" |
1238 | @@ -71,7 +72,7 @@ | |||
1239 | 71 | 'trial_date_start': fields.date('Trial Start Date'), | 72 | 'trial_date_start': fields.date('Trial Start Date'), |
1240 | 72 | 'trial_date_end': fields.date('Trial End Date'), | 73 | 'trial_date_end': fields.date('Trial End Date'), |
1241 | 73 | 'working_hours': fields.many2one('resource.calendar','Working Schedule'), | 74 | 'working_hours': fields.many2one('resource.calendar','Working Schedule'), |
1243 | 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"), |
1244 | 75 | 'advantages': fields.text('Advantages'), | 76 | 'advantages': fields.text('Advantages'), |
1245 | 76 | 'notes': fields.text('Notes'), | 77 | 'notes': fields.text('Notes'), |
1246 | 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), |
1247 | 78 | 79 | ||
1248 | === modified file 'hr_expense/hr_expense.py' | |||
1249 | --- hr_expense/hr_expense.py 2013-09-10 12:48:03 +0000 | |||
1250 | +++ hr_expense/hr_expense.py 2013-10-29 13:27:40 +0000 | |||
1251 | @@ -77,7 +77,7 @@ | |||
1252 | 77 | 'account_move_id': fields.many2one('account.move', 'Ledger Posting'), | 77 | 'account_move_id': fields.many2one('account.move', 'Ledger Posting'), |
1253 | 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)]} ), |
1254 | 79 | 'note': fields.text('Note'), | 79 | 'note': fields.text('Note'), |
1256 | 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'), |
1257 | 81 | store={ | 81 | store={ |
1258 | 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) |
1259 | 83 | }), | 83 | }), |
1260 | @@ -414,9 +414,9 @@ | |||
1261 | 414 | 'name': fields.char('Expense Note', size=128, required=True), | 414 | 'name': fields.char('Expense Note', size=128, required=True), |
1262 | 415 | 'date_value': fields.date('Date', required=True), | 415 | 'date_value': fields.date('Date', required=True), |
1263 | 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), |
1267 | 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')), |
1268 | 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')), |
1269 | 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')), |
1270 | 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)]), |
1271 | 421 | 'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True), | 421 | 'uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True), |
1272 | 422 | 'description': fields.text('Description'), | 422 | 'description': fields.text('Description'), |
1273 | 423 | 423 | ||
1274 | === modified file 'hr_expense/report/hr_expense_report.py' | |||
1275 | --- hr_expense/report/hr_expense_report.py 2013-04-15 10:23:49 +0000 | |||
1276 | +++ hr_expense/report/hr_expense_report.py 2013-10-29 13:27:40 +0000 | |||
1277 | @@ -47,11 +47,11 @@ | |||
1278 | 47 | 'company_id':fields.many2one('res.company', 'Company', readonly=True), | 47 | 'company_id':fields.many2one('res.company', 'Company', readonly=True), |
1279 | 48 | 'user_id':fields.many2one('res.users', 'Validation User', readonly=True), | 48 | 'user_id':fields.many2one('res.users', 'Validation User', readonly=True), |
1280 | 49 | 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True), | 49 | 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True), |
1282 | 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')), |
1283 | 51 | 'delay_valid':fields.float('Delay to Valid', readonly=True), | 51 | 'delay_valid':fields.float('Delay to Valid', readonly=True), |
1284 | 52 | 'delay_confirm':fields.float('Delay to Confirm', readonly=True), | 52 | 'delay_confirm':fields.float('Delay to Confirm', readonly=True), |
1285 | 53 | 'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True), | 53 | 'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True), |
1287 | 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')), |
1288 | 55 | 'nbr':fields.integer('# of Lines', readonly=True), | 55 | 'nbr':fields.integer('# of Lines', readonly=True), |
1289 | 56 | 'no_of_products':fields.integer('# of Products', readonly=True), | 56 | 'no_of_products':fields.integer('# of Products', readonly=True), |
1290 | 57 | 'no_of_account':fields.integer('# of Accounts', readonly=True), | 57 | 'no_of_account':fields.integer('# of Accounts', readonly=True), |
1291 | 58 | 58 | ||
1292 | === modified file 'hr_payroll/hr_payroll.py' | |||
1293 | --- hr_payroll/hr_payroll.py 2013-04-29 15:14:10 +0000 | |||
1294 | +++ hr_payroll/hr_payroll.py 2013-10-29 13:27:40 +0000 | |||
1295 | @@ -748,7 +748,7 @@ | |||
1296 | 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), |
1297 | 749 | 'sequence': fields.integer('Sequence', required=True, select=True), | 749 | 'sequence': fields.integer('Sequence', required=True, select=True), |
1298 | 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"), |
1300 | 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."), |
1301 | 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"), |
1302 | 753 | } | 753 | } |
1303 | 754 | _order = 'payslip_id, sequence' | 754 | _order = 'payslip_id, sequence' |
1304 | @@ -781,8 +781,8 @@ | |||
1305 | 781 | ('fix','Fixed Amount'), | 781 | ('fix','Fixed Amount'), |
1306 | 782 | ('code','Python Code'), | 782 | ('code','Python Code'), |
1307 | 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."), |
1310 | 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')), |
1311 | 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%'), |
1312 | 786 | 'amount_python_compute':fields.text('Python Code'), | 786 | 'amount_python_compute':fields.text('Python Code'), |
1313 | 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'), |
1314 | 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'), |
1315 | @@ -931,10 +931,10 @@ | |||
1316 | 931 | 'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True), | 931 | 'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True), |
1317 | 932 | 'employee_id':fields.many2one('hr.employee', 'Employee', required=True), | 932 | 'employee_id':fields.many2one('hr.employee', 'Employee', required=True), |
1318 | 933 | 'contract_id':fields.many2one('hr.contract', 'Contract', required=True, select=True), | 933 | 'contract_id':fields.many2one('hr.contract', 'Contract', required=True, select=True), |
1323 | 934 | 'rate': fields.float('Rate (%)', digits_compute=dp.get_precision('Payroll Rate')), | 934 | 'rate': fields.float('Rate (%)', digits_compute=dp.get_precision('Price')), |
1324 | 935 | 'amount': fields.float('Amount', digits_compute=dp.get_precision('Payroll')), | 935 | 'amount': fields.float('Amount', digits_compute=dp.get_precision('Amount')), |
1325 | 936 | 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Payroll')), | 936 | 'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')), |
1326 | 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 ), |
1327 | 938 | } | 938 | } |
1328 | 939 | 939 | ||
1329 | 940 | _defaults = { | 940 | _defaults = { |
1330 | @@ -972,7 +972,7 @@ | |||
1331 | 972 | 972 | ||
1332 | 973 | _columns = { | 973 | _columns = { |
1333 | 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), |
1335 | 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."), |
1336 | 976 | } | 976 | } |
1337 | 977 | 977 | ||
1338 | 978 | 978 | ||
1339 | 979 | 979 | ||
1340 | === modified file 'hr_payroll/hr_payroll_data.xml' | |||
1341 | --- hr_payroll/hr_payroll_data.xml 2012-06-20 13:04:49 +0000 | |||
1342 | +++ hr_payroll/hr_payroll_data.xml 2013-10-29 13:27:40 +0000 | |||
1343 | @@ -77,18 +77,5 @@ | |||
1344 | 77 | <field name="company_id" ref="base.main_company"/> | 77 | <field name="company_id" ref="base.main_company"/> |
1345 | 78 | </record> | 78 | </record> |
1346 | 79 | 79 | ||
1347 | 80 | <!-- Decimal Precision --> | ||
1348 | 81 | |||
1349 | 82 | <record forcecreate="True" id="decimal_payroll" model="decimal.precision"> | ||
1350 | 83 | <field name="name">Payroll</field> | ||
1351 | 84 | <field name="digits">2</field> | ||
1352 | 85 | </record> | ||
1353 | 86 | |||
1354 | 87 | <record forcecreate="True" id="decimal_payroll_rate" model="decimal.precision"> | ||
1355 | 88 | <field name="name">Payroll Rate</field> | ||
1356 | 89 | <field name="digits">4</field> | ||
1357 | 90 | </record> | ||
1358 | 91 | |||
1359 | 92 | |||
1360 | 93 | </data> | 80 | </data> |
1361 | 94 | </openerp> | 81 | </openerp> |
1362 | 95 | 82 | ||
1363 | === modified file 'hr_recruitment/report/hr_recruitment_report.py' | |||
1364 | --- hr_recruitment/report/hr_recruitment_report.py 2013-08-19 09:31:36 +0000 | |||
1365 | +++ hr_recruitment/report/hr_recruitment_report.py 2013-10-29 13:27:40 +0000 | |||
1366 | @@ -53,10 +53,10 @@ | |||
1367 | 53 | 'type_id': fields.many2one('hr.recruitment.degree', 'Degree'), | 53 | 'type_id': fields.many2one('hr.recruitment.degree', 'Degree'), |
1368 | 54 | 'department_id': fields.many2one('hr.department','Department',readonly=True), | 54 | 'department_id': fields.many2one('hr.department','Department',readonly=True), |
1369 | 55 | 'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'), | 55 | 'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'), |
1374 | 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')), |
1375 | 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')), |
1376 | 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')), |
1377 | 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')), |
1378 | 60 | 'partner_id': fields.many2one('res.partner', 'Partner',readonly=True), | 60 | 'partner_id': fields.many2one('res.partner', 'Partner',readonly=True), |
1379 | 61 | 'available': fields.float("Availability"), | 61 | 'available': fields.float("Availability"), |
1380 | 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", |
1381 | 63 | 63 | ||
1382 | === modified file 'hr_timesheet_invoice/report/report_analytic.py' | |||
1383 | --- hr_timesheet_invoice/report/report_analytic.py 2013-04-15 10:23:49 +0000 | |||
1384 | +++ hr_timesheet_invoice/report/report_analytic.py 2013-10-29 13:27:40 +0000 | |||
1385 | @@ -71,8 +71,8 @@ | |||
1386 | 71 | 'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True), | 71 | 'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True), |
1387 | 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), |
1388 | 73 | 'unit_amount': fields.float('Units', readonly=True), | 73 | 'unit_amount': fields.float('Units', readonly=True), |
1391 | 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')), |
1392 | 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')), |
1393 | 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'), |
1394 | 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), |
1395 | 78 | } | 78 | } |
1396 | 79 | 79 | ||
1397 | === modified file 'hr_timesheet_sheet/report/hr_timesheet_report.py' | |||
1398 | --- hr_timesheet_sheet/report/hr_timesheet_report.py 2013-04-15 10:23:49 +0000 | |||
1399 | +++ hr_timesheet_sheet/report/hr_timesheet_report.py 2013-10-29 13:27:40 +0000 | |||
1400 | @@ -42,7 +42,7 @@ | |||
1401 | 42 | 'user_id': fields.many2one('res.users', 'User',readonly=True), | 42 | 'user_id': fields.many2one('res.users', 'User',readonly=True), |
1402 | 43 | 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True), | 43 | 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True), |
1403 | 44 | 'company_id': fields.many2one('res.company', 'Company',readonly=True), | 44 | 'company_id': fields.many2one('res.company', 'Company',readonly=True), |
1405 | 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')), |
1406 | 46 | 'quantity': fields.float('Time',readonly=True), | 46 | 'quantity': fields.float('Time',readonly=True), |
1407 | 47 | } | 47 | } |
1408 | 48 | 48 | ||
1409 | 49 | 49 | ||
1410 | === modified file 'l10n_be_hr_payroll/l10n_be_hr_payroll.py' | |||
1411 | --- l10n_be_hr_payroll/l10n_be_hr_payroll.py 2013-04-15 10:23:49 +0000 | |||
1412 | +++ l10n_be_hr_payroll/l10n_be_hr_payroll.py 2013-10-29 13:27:40 +0000 | |||
1413 | @@ -27,16 +27,16 @@ | |||
1414 | 27 | _inherit = 'hr.contract' | 27 | _inherit = 'hr.contract' |
1415 | 28 | 28 | ||
1416 | 29 | _columns = { | 29 | _columns = { |
1427 | 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')), |
1428 | 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')), |
1429 | 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')), |
1430 | 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')), |
1431 | 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')), |
1432 | 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')), |
1433 | 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')), |
1434 | 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')), |
1435 | 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')), |
1436 | 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')), |
1437 | 40 | } | 40 | } |
1438 | 41 | 41 | ||
1439 | 42 | 42 | ||
1440 | 43 | 43 | ||
1441 | === modified file 'l10n_br/account.py' | |||
1442 | --- l10n_br/account.py 2013-03-27 11:49:36 +0000 | |||
1443 | +++ l10n_br/account.py 2013-10-29 13:27:40 +0000 | |||
1444 | @@ -93,7 +93,7 @@ | |||
1445 | 93 | def get_precision_tax(): | 93 | def get_precision_tax(): |
1446 | 94 | def change_digit_tax(cr): | 94 | def change_digit_tax(cr): |
1447 | 95 | decimal_precision = openerp.registry(cr.dbname)['decimal.precision'] | 95 | decimal_precision = openerp.registry(cr.dbname)['decimal.precision'] |
1449 | 96 | res = decimal_precision.precision_get(cr, 1, 'Account') | 96 | res = decimal_precision.precision_get(cr, 1, 'Amount') |
1450 | 97 | return (16, res+2) | 97 | return (16, res+2) |
1451 | 98 | return change_digit_tax | 98 | return change_digit_tax |
1452 | 99 | 99 | ||
1453 | 100 | 100 | ||
1454 | === modified file 'l10n_fr_hr_payroll/l10n_fr_hr_payroll.py' | |||
1455 | --- l10n_fr_hr_payroll/l10n_fr_hr_payroll.py 2013-04-15 10:23:49 +0000 | |||
1456 | +++ l10n_fr_hr_payroll/l10n_fr_hr_payroll.py 2013-10-29 13:27:40 +0000 | |||
1457 | @@ -27,9 +27,9 @@ | |||
1458 | 27 | _inherit = 'res.company' | 27 | _inherit = 'res.company' |
1459 | 28 | 28 | ||
1460 | 29 | _columns = { | 29 | _columns = { |
1462 | 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')), |
1463 | 31 | 'nombre_employes': fields.integer('Nombre d\'employes'), | 31 | 'nombre_employes': fields.integer('Nombre d\'employes'), |
1465 | 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')), |
1466 | 33 | 'org_ss': fields.char('Organisme de securite sociale', size=64), | 33 | 'org_ss': fields.char('Organisme de securite sociale', size=64), |
1467 | 34 | 'conv_coll': fields.char('Convention collective', size=64), | 34 | 'conv_coll': fields.char('Convention collective', size=64), |
1468 | 35 | } | 35 | } |
1469 | 36 | 36 | ||
1470 | === modified file 'l10n_in_hr_payroll/l10n_in_hr_payroll.py' | |||
1471 | --- l10n_in_hr_payroll/l10n_in_hr_payroll.py 2013-06-27 07:09:42 +0000 | |||
1472 | +++ l10n_in_hr_payroll/l10n_in_hr_payroll.py 2013-10-29 13:27:40 +0000 | |||
1473 | @@ -40,12 +40,12 @@ | |||
1474 | 40 | _description = 'HR Contract' | 40 | _description = 'HR Contract' |
1475 | 41 | 41 | ||
1476 | 42 | _columns = { | 42 | _columns = { |
1478 | 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"), |
1479 | 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"), |
1484 | 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"), |
1485 | 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(%)"), |
1486 | 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(%)"), |
1487 | 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')), |
1488 | 49 | } | 49 | } |
1489 | 50 | 50 | ||
1490 | 51 | 51 | ||
1491 | @@ -235,7 +235,7 @@ | |||
1492 | 235 | 'name': fields.char('Bank Account No.', size=25, required=True), | 235 | 'name': fields.char('Bank Account No.', size=25, required=True), |
1493 | 236 | 'ifsc_code': fields.char('IFSC Code', size=16), | 236 | 'ifsc_code': fields.char('IFSC Code', size=16), |
1494 | 237 | 'employee_id': fields.many2one('hr.employee', 'Employee', required=True), | 237 | 'employee_id': fields.many2one('hr.employee', 'Employee', required=True), |
1496 | 238 | 'bysal': fields.float('By Salary', digits_compute=dp.get_precision('Payroll')), | 238 | 'bysal': fields.float('By Salary', digits_compute=dp.get_precision('Price')), |
1497 | 239 | 'debit_credit': fields.char('C/D', size=3, required=False), | 239 | 'debit_credit': fields.char('C/D', size=3, required=False), |
1498 | 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), |
1499 | 241 | 'ifsc': fields.related('advice_id', 'neft', type='boolean', string='IFSC'), | 241 | 'ifsc': fields.related('advice_id', 'neft', type='boolean', string='IFSC'), |
1500 | 242 | 242 | ||
1501 | === modified file 'lunch/lunch.py' | |||
1502 | --- lunch/lunch.py 2013-08-23 14:31:14 +0000 | |||
1503 | +++ lunch/lunch.py 2013-10-29 13:27:40 +0000 | |||
1504 | @@ -435,7 +435,7 @@ | |||
1505 | 435 | 'name': fields.char('Product', required=True, size=64), | 435 | 'name': fields.char('Product', required=True, size=64), |
1506 | 436 | 'category_id': fields.many2one('lunch.product.category', 'Category', required=True), | 436 | 'category_id': fields.many2one('lunch.product.category', 'Category', required=True), |
1507 | 437 | 'description': fields.text('Description', size=256), | 437 | 'description': fields.text('Description', size=256), |
1509 | 438 | 'price': fields.float('Price', digits=(16,2)), #TODO: use decimal precision of 'Account', move it from product to decimal_precision | 438 | 'price': fields.float('Price', digits=(16,2)), #TODO: use decimal precision of 'Amount', move it from product to decimal_precision |
1510 | 439 | 'supplier': fields.many2one('res.partner', 'Supplier'), | 439 | 'supplier': fields.many2one('res.partner', 'Supplier'), |
1511 | 440 | } | 440 | } |
1512 | 441 | 441 | ||
1513 | 442 | 442 | ||
1514 | === modified file 'marketing_campaign/marketing_campaign.py' | |||
1515 | --- marketing_campaign/marketing_campaign.py 2013-04-15 10:23:49 +0000 | |||
1516 | +++ marketing_campaign/marketing_campaign.py 2013-10-29 13:27:40 +0000 | |||
1517 | @@ -119,7 +119,7 @@ | |||
1518 | 119 | 'Status',), | 119 | 'Status',), |
1519 | 120 | 'activity_ids': fields.one2many('marketing.campaign.activity', | 120 | 'activity_ids': fields.one2many('marketing.campaign.activity', |
1520 | 121 | 'campaign_id', 'Activities'), | 121 | 'campaign_id', 'Activities'), |
1522 | 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')), |
1523 | 123 | } | 123 | } |
1524 | 124 | 124 | ||
1525 | 125 | _defaults = { | 125 | _defaults = { |
1526 | @@ -432,8 +432,8 @@ | |||
1527 | 432 | 'from_ids': fields.one2many('marketing.campaign.transition', | 432 | 'from_ids': fields.one2many('marketing.campaign.transition', |
1528 | 433 | 'activity_to_id', | 433 | 'activity_to_id', |
1529 | 434 | 'Previous Activities'), | 434 | 'Previous Activities'), |
1532 | 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')), |
1533 | 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')), |
1534 | 437 | 'signal': fields.char('Signal', size=128, | 437 | 'signal': fields.char('Signal', size=128, |
1535 | 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'), |
1536 | 439 | 'keep_if_condition_not_met': fields.boolean("Don't Delete Workitems", | 439 | 'keep_if_condition_not_met': fields.boolean("Don't Delete Workitems", |
1537 | 440 | 440 | ||
1538 | === modified file 'marketing_campaign/report/campaign_analysis.py' | |||
1539 | --- marketing_campaign/report/campaign_analysis.py 2013-04-15 10:23:49 +0000 | |||
1540 | +++ marketing_campaign/report/campaign_analysis.py 2013-10-29 13:27:40 +0000 | |||
1541 | @@ -63,8 +63,8 @@ | |||
1542 | 63 | 'country_id': fields.related('partner_id', 'country_id', | 63 | 'country_id': fields.related('partner_id', 'country_id', |
1543 | 64 | type='many2one', relation='res.country',string='Country'), | 64 | type='many2one', relation='res.country',string='Country'), |
1544 | 65 | 'total_cost' : fields.function(_total_cost, string='Cost', | 65 | 'total_cost' : fields.function(_total_cost, string='Cost', |
1547 | 66 | type="float", digits_compute=dp.get_precision('Account')), | 66 | type="float", digits_compute=dp.get_precision('Amount')), |
1548 | 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')), |
1549 | 68 | 'count' : fields.integer('# of Actions', readonly=True), | 68 | 'count' : fields.integer('# of Actions', readonly=True), |
1550 | 69 | 'state': fields.selection([('todo', 'To Do'), | 69 | 'state': fields.selection([('todo', 'To Do'), |
1551 | 70 | ('exception', 'Exception'), ('done', 'Done'), | 70 | ('exception', 'Exception'), ('done', 'Done'), |
1552 | 71 | 71 | ||
1553 | === modified file 'membership/membership.py' | |||
1554 | --- membership/membership.py 2013-06-05 07:04:25 +0000 | |||
1555 | +++ membership/membership.py 2013-10-29 13:27:40 +0000 | |||
1556 | @@ -146,7 +146,7 @@ | |||
1557 | 146 | 'date_to': fields.date('To', readonly=True), | 146 | 'date_to': fields.date('To', readonly=True), |
1558 | 147 | 'date_cancel': fields.date('Cancel date'), | 147 | 'date_cancel': fields.date('Cancel date'), |
1559 | 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"), |
1561 | 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'), |
1562 | 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), |
1563 | 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), |
1564 | 152 | 'state': fields.function(_state, | 152 | 'state': fields.function(_state, |
1565 | 153 | 153 | ||
1566 | === modified file 'membership/report/report_membership.py' | |||
1567 | --- membership/report/report_membership.py 2013-04-15 10:23:49 +0000 | |||
1568 | +++ membership/report/report_membership.py 2013-10-29 13:27:40 +0000 | |||
1569 | @@ -53,8 +53,8 @@ | |||
1570 | 53 | 'num_waiting': fields.integer('# Waiting', readonly=True), | 53 | 'num_waiting': fields.integer('# Waiting', readonly=True), |
1571 | 54 | 'num_invoiced': fields.integer('# Invoiced', readonly=True), | 54 | 'num_invoiced': fields.integer('# Invoiced', readonly=True), |
1572 | 55 | 'num_paid': fields.integer('# Paid', readonly=True), | 55 | 'num_paid': fields.integer('# Paid', readonly=True), |
1575 | 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), |
1576 | 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), |
1577 | 58 | 'partner_id': fields.many2one('res.partner', 'Member', readonly=True), | 58 | 'partner_id': fields.many2one('res.partner', 'Member', readonly=True), |
1578 | 59 | 'associate_member_id': fields.many2one('res.partner', 'Associate Member', readonly=True), | 59 | 'associate_member_id': fields.many2one('res.partner', 'Associate Member', readonly=True), |
1579 | 60 | 'membership_id': fields.many2one('product.product', 'Membership Product', readonly=True), | 60 | 'membership_id': fields.many2one('product.product', 'Membership Product', readonly=True), |
1580 | 61 | 61 | ||
1581 | === modified file 'membership/wizard/membership_invoice.py' | |||
1582 | --- membership/wizard/membership_invoice.py 2013-04-15 10:23:49 +0000 | |||
1583 | +++ membership/wizard/membership_invoice.py 2013-10-29 13:27:40 +0000 | |||
1584 | @@ -29,7 +29,7 @@ | |||
1585 | 29 | _description = "Membership Invoice" | 29 | _description = "Membership Invoice" |
1586 | 30 | _columns = { | 30 | _columns = { |
1587 | 31 | 'product_id': fields.many2one('product.product','Membership', required=True), | 31 | 'product_id': fields.many2one('product.product','Membership', required=True), |
1589 | 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), |
1590 | 33 | } | 33 | } |
1591 | 34 | def onchange_product(self, cr, uid, ids, product_id=False): | 34 | def onchange_product(self, cr, uid, ids, product_id=False): |
1592 | 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. |
1593 | 36 | 36 | ||
1594 | === modified file 'mrp/mrp.py' | |||
1595 | --- mrp/mrp.py 2013-10-03 11:12:22 +0000 | |||
1596 | +++ mrp/mrp.py 2013-10-29 13:27:40 +0000 | |||
1597 | @@ -203,9 +203,9 @@ | |||
1598 | 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."), |
1599 | 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."), |
1600 | 205 | 'product_id': fields.many2one('product.product', 'Product', required=True), | 205 | 'product_id': fields.many2one('product.product', 'Product', required=True), |
1602 | 206 | 'product_uos_qty': fields.float('Product UOS Qty'), | 206 | 'product_uos_qty': fields.float('Product UOS Qty', digits_compute= dp.get_precision('Quantity')), |
1603 | 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."), |
1605 | 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')), |
1606 | 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"), |
1607 | 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."), |
1608 | 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."), |
1609 | @@ -444,9 +444,9 @@ | |||
1610 | 444 | select=True, readonly=True, states=dict.fromkeys(['draft', 'confirmed'], [('readonly', False)])), | 444 | select=True, readonly=True, states=dict.fromkeys(['draft', 'confirmed'], [('readonly', False)])), |
1611 | 445 | 445 | ||
1612 | 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)]}), |
1614 | 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)]}), |
1615 | 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)]}), |
1617 | 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)]}), |
1618 | 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)]}), |
1619 | 451 | 'progress': fields.function(_get_progress, type='float', | 451 | 'progress': fields.function(_get_progress, type='float', |
1620 | 452 | string='Production progress'), | 452 | string='Production progress'), |
1621 | @@ -1093,9 +1093,9 @@ | |||
1622 | 1093 | _columns = { | 1093 | _columns = { |
1623 | 1094 | 'name': fields.char('Name', size=64, required=True), | 1094 | 'name': fields.char('Name', size=64, required=True), |
1624 | 1095 | 'product_id': fields.many2one('product.product', 'Product', required=True), | 1095 | 'product_id': fields.many2one('product.product', 'Product', required=True), |
1626 | 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), |
1627 | 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), |
1629 | 1098 | 'product_uos_qty': fields.float('Product UOS Quantity'), | 1098 | 'product_uos_qty': fields.float('Product UOS Quantity', digits_compute= dp.get_precision('Quantity')), |
1630 | 1099 | 'product_uos': fields.many2one('product.uom', 'Product UOS'), | 1099 | 'product_uos': fields.many2one('product.uom', 'Product UOS'), |
1631 | 1100 | 'production_id': fields.many2one('mrp.production', 'Production Order', select=True), | 1100 | 'production_id': fields.many2one('mrp.production', 'Production Order', select=True), |
1632 | 1101 | } | 1101 | } |
1633 | 1102 | 1102 | ||
1634 | === modified file 'mrp/report/price.py' | |||
1635 | --- mrp/report/price.py 2013-03-27 13:47:02 +0000 | |||
1636 | +++ mrp/report/price.py 2013-10-29 13:27:40 +0000 | |||
1637 | @@ -139,7 +139,7 @@ | |||
1638 | 139 | </row> | 139 | </row> |
1639 | 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')) |
1640 | 141 | 141 | ||
1642 | 142 | purchase_price_digits = rml_obj.get_digits(dp='Product Price') | 142 | purchase_price_digits = rml_obj.get_digits(dp='Price') |
1643 | 143 | 143 | ||
1644 | 144 | for product in product_pool.browse(cr, uid, ids, context=context): | 144 | for product in product_pool.browse(cr, uid, ids, context=context): |
1645 | 145 | product_uom_name = to_xml(product.uom_id.name) | 145 | product_uom_name = to_xml(product.uom_id.name) |
1646 | 146 | 146 | ||
1647 | === modified file 'mrp/wizard/change_production_qty.py' | |||
1648 | --- mrp/wizard/change_production_qty.py 2013-04-15 10:23:49 +0000 | |||
1649 | +++ mrp/wizard/change_production_qty.py 2013-10-29 13:27:40 +0000 | |||
1650 | @@ -28,7 +28,7 @@ | |||
1651 | 28 | _description = 'Change Quantity of Products' | 28 | _description = 'Change Quantity of Products' |
1652 | 29 | 29 | ||
1653 | 30 | _columns = { | 30 | _columns = { |
1655 | 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), |
1656 | 32 | } | 32 | } |
1657 | 33 | 33 | ||
1658 | 34 | def default_get(self, cr, uid, fields, context=None): | 34 | def default_get(self, cr, uid, fields, context=None): |
1659 | 35 | 35 | ||
1660 | === modified file 'mrp/wizard/mrp_product_produce.py' | |||
1661 | --- mrp/wizard/mrp_product_produce.py 2013-04-15 10:23:49 +0000 | |||
1662 | +++ mrp/wizard/mrp_product_produce.py 2013-10-29 13:27:40 +0000 | |||
1663 | @@ -27,7 +27,7 @@ | |||
1664 | 27 | _description = "Product Produce" | 27 | _description = "Product Produce" |
1665 | 28 | 28 | ||
1666 | 29 | _columns = { | 29 | _columns = { |
1668 | 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), |
1669 | 31 | 'mode': fields.selection([('consume_produce', 'Consume & Produce'), | 31 | 'mode': fields.selection([('consume_produce', 'Consume & Produce'), |
1670 | 32 | ('consume', 'Consume Only')], 'Mode', required=True, | 32 | ('consume', 'Consume Only')], 'Mode', required=True, |
1671 | 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" |
1672 | 34 | 34 | ||
1673 | === modified file 'mrp_byproduct/mrp_byproduct.py' | |||
1674 | --- mrp_byproduct/mrp_byproduct.py 2013-04-15 10:23:49 +0000 | |||
1675 | +++ mrp_byproduct/mrp_byproduct.py 2013-10-29 13:27:40 +0000 | |||
1676 | @@ -29,7 +29,7 @@ | |||
1677 | 29 | _description = 'Byproduct' | 29 | _description = 'Byproduct' |
1678 | 30 | _columns={ | 30 | _columns={ |
1679 | 31 | 'product_id': fields.many2one('product.product', 'Product', required=True), | 31 | 'product_id': fields.many2one('product.product', 'Product', required=True), |
1681 | 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), |
1682 | 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), |
1683 | 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.\ |
1684 | 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.\ |
1685 | 36 | 36 | ||
1686 | === modified file 'mrp_operations/report/mrp_workorder_analysis.py' | |||
1687 | --- mrp_operations/report/mrp_workorder_analysis.py 2013-04-15 10:23:49 +0000 | |||
1688 | +++ mrp_operations/report/mrp_workorder_analysis.py 2013-10-29 13:27:40 +0000 | |||
1689 | @@ -35,7 +35,7 @@ | |||
1690 | 35 | 'nbr': fields.integer('# of Lines', readonly=True), | 35 | 'nbr': fields.integer('# of Lines', readonly=True), |
1691 | 36 | 'date': fields.date('Date', readonly=True), | 36 | 'date': fields.date('Date', readonly=True), |
1692 | 37 | 'product_id': fields.many2one('product.product', 'Product', readonly=True), | 37 | 'product_id': fields.many2one('product.product', 'Product', readonly=True), |
1694 | 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), |
1695 | 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), |
1696 | 40 | 'total_hours': fields.float('Total Hours', readonly=True), | 40 | 'total_hours': fields.float('Total Hours', readonly=True), |
1697 | 41 | 'total_cycles': fields.float('Total Cycles', readonly=True), | 41 | 'total_cycles': fields.float('Total Cycles', readonly=True), |
1698 | 42 | 42 | ||
1699 | === modified file 'mrp_repair/mrp_repair.py' | |||
1700 | --- mrp_repair/mrp_repair.py 2013-10-18 12:58:18 +0000 | |||
1701 | +++ mrp_repair/mrp_repair.py 2013-10-29 13:27:40 +0000 | |||
1702 | @@ -158,17 +158,17 @@ | |||
1703 | 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)]}), |
1704 | 159 | 'invoiced': fields.boolean('Invoiced', readonly=True), | 159 | 'invoiced': fields.boolean('Invoiced', readonly=True), |
1705 | 160 | 'repaired': fields.boolean('Repaired', readonly=True), | 160 | 'repaired': fields.boolean('Repaired', readonly=True), |
1717 | 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'), |
1718 | 162 | store={ | 162 | store={ |
1719 | 163 | 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10), | 163 | 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10), |
1720 | 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), |
1721 | 165 | }), | 165 | }), |
1722 | 166 | 'amount_tax': fields.function(_amount_tax, string='Taxes', | 166 | 'amount_tax': fields.function(_amount_tax, string='Taxes', digits_compute=dp.get_precision('Amount'), |
1723 | 167 | store={ | 167 | store={ |
1724 | 168 | 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10), | 168 | 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10), |
1725 | 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), |
1726 | 170 | }), | 170 | }), |
1727 | 171 | 'amount_total': fields.function(_amount_total, string='Total', | 171 | 'amount_total': fields.function(_amount_total, string='Total', digits_compute=dp.get_precision('Amount'), |
1728 | 172 | store={ | 172 | store={ |
1729 | 173 | 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10), | 173 | 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10), |
1730 | 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), |
1731 | @@ -636,10 +636,10 @@ | |||
1732 | 636 | 'to_invoice': fields.boolean('To Invoice'), | 636 | 'to_invoice': fields.boolean('To Invoice'), |
1733 | 637 | 'product_id': fields.many2one('product.product', 'Product', required=True), | 637 | 'product_id': fields.many2one('product.product', 'Product', required=True), |
1734 | 638 | 'invoiced': fields.boolean('Invoiced',readonly=True), | 638 | 'invoiced': fields.boolean('Invoiced',readonly=True), |
1737 | 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')), |
1738 | 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')), |
1739 | 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'), |
1741 | 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), |
1742 | 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), |
1743 | 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)]"), |
1744 | 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), |
1745 | @@ -729,10 +729,10 @@ | |||
1746 | 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), |
1747 | 730 | 'name': fields.char('Description', size=64, select=True,required=True), | 730 | 'name': fields.char('Description', size=64, select=True,required=True), |
1748 | 731 | 'product_id': fields.many2one('product.product', 'Product'), | 731 | 'product_id': fields.many2one('product.product', 'Product'), |
1751 | 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), |
1752 | 733 | 'price_unit': fields.float('Unit Price', required=True), | 733 | 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Price'), required=True), |
1753 | 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), |
1755 | 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')), |
1756 | 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'), |
1757 | 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), |
1758 | 738 | 'to_invoice': fields.boolean('To Invoice'), | 738 | 'to_invoice': fields.boolean('To Invoice'), |
1759 | 739 | 739 | ||
1760 | === modified file 'mrp_repair/report/order.rml' | |||
1761 | --- mrp_repair/report/order.rml 2012-11-29 22:26:45 +0000 | |||
1762 | +++ mrp_repair/report/order.rml 2013-10-29 13:27:40 +0000 | |||
1763 | @@ -367,7 +367,7 @@ | |||
1764 | 367 | <para style="terp_default_9">Taxes:</para> | 367 | <para style="terp_default_9">Taxes:</para> |
1765 | 368 | </td> | 368 | </td> |
1766 | 369 | <td> | 369 | <td> |
1768 | 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> |
1769 | 371 | </td> | 371 | </td> |
1770 | 372 | </tr> | 372 | </tr> |
1771 | 373 | <tr> | 373 | <tr> |
1772 | 374 | 374 | ||
1773 | === modified file 'point_of_sale/point_of_sale.py' | |||
1774 | --- point_of_sale/point_of_sale.py 2013-10-18 12:58:18 +0000 | |||
1775 | +++ point_of_sale/point_of_sale.py 2013-10-29 13:27:40 +0000 | |||
1776 | @@ -230,13 +230,13 @@ | |||
1777 | 230 | 230 | ||
1778 | 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', |
1779 | 232 | type='float', | 232 | type='float', |
1781 | 233 | digits_compute=dp.get_precision('Account'), | 233 | digits_compute=dp.get_precision('Amount'), |
1782 | 234 | string="Ending Balance", | 234 | string="Ending Balance", |
1783 | 235 | help="Computed using the cash control lines", | 235 | help="Computed using the cash control lines", |
1784 | 236 | readonly=True), | 236 | readonly=True), |
1785 | 237 | 'cash_register_balance_start' : fields.related('cash_register_id', 'balance_start', | 237 | 'cash_register_balance_start' : fields.related('cash_register_id', 'balance_start', |
1786 | 238 | type='float', | 238 | type='float', |
1788 | 239 | digits_compute=dp.get_precision('Account'), | 239 | digits_compute=dp.get_precision('Amount'), |
1789 | 240 | string="Starting Balance", | 240 | string="Starting Balance", |
1790 | 241 | help="Computed using the cash control at the opening.", | 241 | help="Computed using the cash control at the opening.", |
1791 | 242 | readonly=True), | 242 | readonly=True), |
1792 | @@ -245,7 +245,7 @@ | |||
1793 | 245 | readonly=True), | 245 | readonly=True), |
1794 | 246 | 'cash_register_balance_end' : fields.related('cash_register_id', 'balance_end', | 246 | 'cash_register_balance_end' : fields.related('cash_register_id', 'balance_end', |
1795 | 247 | type='float', | 247 | type='float', |
1797 | 248 | digits_compute=dp.get_precision('Account'), | 248 | digits_compute=dp.get_precision('Amount'), |
1798 | 249 | string="Computed Balance", | 249 | string="Computed Balance", |
1799 | 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.", |
1800 | 251 | readonly=True), | 251 | readonly=True), |
1801 | @@ -621,10 +621,10 @@ | |||
1802 | 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), |
1803 | 622 | 'date_order': fields.datetime('Order Date', readonly=True, select=True), | 622 | 'date_order': fields.datetime('Order Date', readonly=True, select=True), |
1804 | 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."), |
1809 | 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'), |
1810 | 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'), |
1811 | 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'), |
1812 | 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'), |
1813 | 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), |
1814 | 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), |
1815 | 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), |
1816 | @@ -1229,11 +1229,11 @@ | |||
1817 | 1229 | 'name': fields.char('Line No', size=32, required=True), | 1229 | 'name': fields.char('Line No', size=32, required=True), |
1818 | 1230 | 'notice': fields.char('Discount Notice', size=128), | 1230 | 'notice': fields.char('Discount Notice', size=128), |
1819 | 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), |
1822 | 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')), |
1823 | 1233 | 'qty': fields.float('Quantity', digits=(16, 2)), | 1233 | 'qty': fields.float('Quantity', digits_compute=dp.get_precision('Quantity')), |
1824 | 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), |
1825 | 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), |
1827 | 1236 | 'discount': fields.float('Discount (%)', digits=(16, 2)), | 1236 | 'discount': fields.float('Discount (%)', digits_compute=dp.get_precision('Price')), |
1828 | 1237 | 'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'), | 1237 | 'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'), |
1829 | 1238 | 'create_date': fields.datetime('Creation Date', readonly=True), | 1238 | 'create_date': fields.datetime('Creation Date', readonly=True), |
1830 | 1239 | } | 1239 | } |
1831 | 1240 | 1240 | ||
1832 | === modified file 'point_of_sale/report/account_statement.rml' | |||
1833 | --- point_of_sale/report/account_statement.rml 2012-11-29 22:26:45 +0000 | |||
1834 | +++ point_of_sale/report/account_statement.rml 2013-10-29 13:27:40 +0000 | |||
1835 | @@ -214,10 +214,10 @@ | |||
1836 | 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> |
1837 | 215 | </td> | 215 | </td> |
1838 | 216 | <td> | 216 | <td> |
1840 | 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> |
1841 | 218 | </td> | 218 | </td> |
1842 | 219 | <td> | 219 | <td> |
1844 | 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> |
1845 | 221 | </td> | 221 | </td> |
1846 | 222 | </tr> | 222 | </tr> |
1847 | 223 | </blockTable> | 223 | </blockTable> |
1848 | @@ -250,7 +250,7 @@ | |||
1849 | 250 | <para style="terp_default_9">[[ line_ids.partner_id.name ]]</para> | 250 | <para style="terp_default_9">[[ line_ids.partner_id.name ]]</para> |
1850 | 251 | </td> | 251 | </td> |
1851 | 252 | <td> | 252 | <td> |
1853 | 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> |
1854 | 254 | </td> | 254 | </td> |
1855 | 255 | </tr> | 255 | </tr> |
1856 | 256 | </blockTable> | 256 | </blockTable> |
1857 | @@ -267,7 +267,7 @@ | |||
1858 | 267 | <para style="terp_tblheader_Details">Total :</para> | 267 | <para style="terp_tblheader_Details">Total :</para> |
1859 | 268 | </td> | 268 | </td> |
1860 | 269 | <td> | 269 | <td> |
1862 | 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> |
1863 | 271 | </td> | 271 | </td> |
1864 | 272 | </tr> | 272 | </tr> |
1865 | 273 | </blockTable> | 273 | </blockTable> |
1866 | 274 | 274 | ||
1867 | === modified file 'point_of_sale/report/pos_details.rml' | |||
1868 | --- point_of_sale/report/pos_details.rml 2012-11-29 22:26:45 +0000 | |||
1869 | +++ point_of_sale/report/pos_details.rml 2013-10-29 13:27:40 +0000 | |||
1870 | @@ -320,7 +320,7 @@ | |||
1871 | 320 | <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para> | 320 | <para style="terp_default_9">[[ p['name'] or removeParentNode('para') ]]</para> |
1872 | 321 | </td> | 321 | </td> |
1873 | 322 | <td> | 322 | <td> |
1875 | 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> |
1876 | 324 | </td> | 324 | </td> |
1877 | 325 | </tr> | 325 | </tr> |
1878 | 326 | </blockTable> | 326 | </blockTable> |
1879 | 327 | 327 | ||
1880 | === modified file 'portal/acquirer.py' | |||
1881 | --- portal/acquirer.py 2012-11-30 09:45:01 +0000 | |||
1882 | +++ portal/acquirer.py 2013-10-29 13:27:40 +0000 | |||
1883 | @@ -80,7 +80,7 @@ | |||
1884 | 80 | return '' | 80 | return '' |
1885 | 81 | else: | 81 | else: |
1886 | 82 | payment_header = _('Pay safely online') | 82 | payment_header = _('Pay safely online') |
1888 | 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')) |
1889 | 84 | currency_str = currency.symbol or currency.name | 84 | currency_str = currency.symbol or currency.name |
1890 | 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)) |
1891 | 86 | result = """<div class="payment_acquirers"> | 86 | result = """<div class="payment_acquirers"> |
1892 | 87 | 87 | ||
1893 | === modified file 'procurement/procurement.py' | |||
1894 | --- procurement/procurement.py 2013-10-21 14:53:34 +0000 | |||
1895 | +++ procurement/procurement.py 2013-10-29 13:27:40 +0000 | |||
1896 | @@ -92,9 +92,9 @@ | |||
1897 | 92 | 'date_planned': fields.datetime('Scheduled date', required=True, select=True), | 92 | 'date_planned': fields.datetime('Scheduled date', required=True, select=True), |
1898 | 93 | 'date_close': fields.datetime('Date Closed'), | 93 | 'date_close': fields.datetime('Date Closed'), |
1899 | 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), |
1901 | 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), |
1902 | 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), |
1904 | 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), |
1905 | 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), |
1906 | 99 | 'move_id': fields.many2one('stock.move', 'Reservation', ondelete='set null'), | 99 | 'move_id': fields.many2one('stock.move', 'Reservation', ondelete='set null'), |
1907 | 100 | 'close_move': fields.boolean('Close Move at end'), | 100 | 'close_move': fields.boolean('Close Move at end'), |
1908 | @@ -528,10 +528,10 @@ | |||
1909 | 528 | 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade"), | 528 | 'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade"), |
1910 | 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')]), |
1911 | 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), |
1913 | 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'), |
1914 | 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 "\ |
1915 | 533 | "a procurement to bring the forecasted quantity to the Max Quantity."), | 533 | "a procurement to bring the forecasted quantity to the Max Quantity."), |
1917 | 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'), |
1918 | 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 "\ |
1919 | 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."), |
1920 | 537 | 'qty_multiple': fields.integer('Qty Multiple', required=True, | 537 | 'qty_multiple': fields.integer('Qty Multiple', required=True, |
1921 | 538 | 538 | ||
1922 | === modified file 'product/pricelist.py' | |||
1923 | --- product/pricelist.py 2013-09-23 17:13:10 +0000 | |||
1924 | +++ product/pricelist.py 2013-10-29 13:27:40 +0000 | |||
1925 | @@ -449,18 +449,18 @@ | |||
1926 | 449 | 'base_pricelist_id': fields.many2one('product.pricelist', 'Other Pricelist'), | 449 | 'base_pricelist_id': fields.many2one('product.pricelist', 'Other Pricelist'), |
1927 | 450 | 450 | ||
1928 | 451 | 'price_surcharge': fields.float('Price Surcharge', | 451 | 'price_surcharge': fields.float('Price Surcharge', |
1931 | 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.'), |
1932 | 453 | 'price_discount': fields.float('Price Discount', digits=(16,4)), | 453 | 'price_discount': fields.float('Price Discount', digits_compute=dp.get_precision('Price')), |
1933 | 454 | 'price_round': fields.float('Price Rounding', | 454 | 'price_round': fields.float('Price Rounding', |
1935 | 455 | digits_compute= dp.get_precision('Product Price'), | 455 | digits_compute= dp.get_precision('Price'), |
1936 | 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" \ |
1937 | 457 | "Rounding is applied after the discount and before the surcharge.\n" \ | 457 | "Rounding is applied after the discount and before the surcharge.\n" \ |
1938 | 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" \ |
1939 | 459 | ), | 459 | ), |
1940 | 460 | 'price_min_margin': fields.float('Min. Price Margin', | 460 | 'price_min_margin': fields.float('Min. Price Margin', |
1942 | 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.'), |
1943 | 462 | 'price_max_margin': fields.float('Max. Price Margin', | 462 | 'price_max_margin': fields.float('Max. Price Margin', |
1945 | 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.'), |
1946 | 464 | 'company_id': fields.related('price_version_id','company_id',type='many2one', | 464 | 'company_id': fields.related('price_version_id','company_id',type='many2one', |
1947 | 465 | readonly=True, relation='res.company', string='Company', store=True) | 465 | readonly=True, relation='res.company', string='Company', store=True) |
1948 | 466 | } | 466 | } |
1949 | 467 | 467 | ||
1950 | === modified file 'product/product.py' | |||
1951 | --- product/product.py 2013-09-10 12:48:03 +0000 | |||
1952 | +++ product/product.py 2013-10-29 13:27:40 +0000 | |||
1953 | @@ -138,7 +138,7 @@ | |||
1954 | 138 | string='Ratio', | 138 | string='Ratio', |
1955 | 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'\ |
1956 | 140 | '1 * (this unit) = ratio * (reference unit)', required=True), | 140 | '1 * (this unit) = ratio * (reference unit)', required=True), |
1958 | 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, |
1959 | 142 | help="The computed quantity will be a multiple of this value. "\ | 142 | help="The computed quantity will be a multiple of this value. "\ |
1960 | 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."), |
1961 | 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."), |
1962 | @@ -304,11 +304,11 @@ | |||
1963 | 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."), |
1964 | 305 | 'rental': fields.boolean('Can be Rent'), | 305 | 'rental': fields.boolean('Can be Rent'), |
1965 | 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"), |
1968 | 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."), |
1969 | 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"), |
1970 | 309 | 'volume': fields.float('Volume', help="The volume in m3."), | 309 | 'volume': fields.float('Volume', help="The volume in m3."), |
1973 | 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."), |
1974 | 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."), |
1975 | 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, |
1976 | 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."), |
1977 | 314 | 'warranty': fields.float('Warranty'), | 314 | 'warranty': fields.float('Warranty'), |
1978 | @@ -322,9 +322,7 @@ | |||
1979 | 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."), |
1980 | 323 | 'uos_id' : fields.many2one('product.uom', 'Unit of Sale', | 323 | 'uos_id' : fields.many2one('product.uom', 'Unit of Sale', |
1981 | 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.'), |
1985 | 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'), |
1983 | 326 | help='Coefficient to convert default Unit of Measure to Unit of Sale\n' | ||
1984 | 327 | ' uos = uom * coeff'), | ||
1986 | 328 | 'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'), | 326 | 'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'), |
1987 | 329 | 'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Supplier'), | 327 | 'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Supplier'), |
1988 | 330 | 'company_id': fields.many2one('res.company', 'Company', select=1), | 328 | 'company_id': fields.many2one('res.company', 'Company', select=1), |
1989 | @@ -553,8 +551,8 @@ | |||
1990 | 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'), |
1991 | 554 | 'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'), | 552 | 'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'), |
1992 | 555 | 'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'), | 553 | 'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'), |
1995 | 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')), |
1996 | 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')), |
1997 | 558 | 'code': fields.function(_product_code, type='char', string='Internal Reference'), | 556 | 'code': fields.function(_product_code, type='char', string='Internal Reference'), |
1998 | 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'), |
1999 | 560 | 'default_code' : fields.char('Internal Reference', size=64, select=True), | 558 | 'default_code' : fields.char('Internal Reference', size=64, select=True), |
2000 | @@ -563,8 +561,8 @@ | |||
2001 | 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), |
2002 | 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."), |
2003 | 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."), |
2006 | 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')), |
2007 | 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')), |
2008 | 568 | 'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'), | 566 | 'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'), |
2009 | 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={ |
2010 | 570 | 'product.template': (_get_name_template_ids, ['name'], 10), | 568 | 'product.template': (_get_name_template_ids, ['name'], 10), |
2011 | @@ -778,8 +776,7 @@ | |||
2012 | 778 | _columns = { | 776 | _columns = { |
2013 | 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."), |
2014 | 780 | 'name' : fields.text('Description', size=64), | 778 | 'name' : fields.text('Description', size=64), |
2017 | 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."), |
2016 | 782 | help="The total number of products you can put by pallet or box."), | ||
2018 | 783 | 'ul' : fields.many2one('product.ul', 'Type of Package', required=True), | 780 | 'ul' : fields.many2one('product.ul', 'Type of Package', required=True), |
2019 | 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'), |
2020 | 785 | 'rows' : fields.integer('Number of Layers', required=True, | 782 | 'rows' : fields.integer('Number of Layers', required=True, |
2021 | @@ -789,9 +786,8 @@ | |||
2022 | 789 | help="The EAN code of the package unit."), | 786 | help="The EAN code of the package unit."), |
2023 | 790 | 'code' : fields.char('Code', size=14, | 787 | 'code' : fields.char('Code', size=14, |
2024 | 791 | help="The code of the transport unit."), | 788 | help="The code of the transport unit."), |
2028 | 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.'), |
2029 | 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')), |
2027 | 794 | 'weight_ul': fields.float('Empty Package Weight'), | ||
2030 | 795 | 'height': fields.float('Height', help='The height of the package'), | 791 | 'height': fields.float('Height', help='The height of the package'), |
2031 | 796 | 'width': fields.float('Width', help='The width of the package'), | 792 | 'width': fields.float('Width', help='The width of the package'), |
2032 | 797 | 'length': fields.float('Length', help='The length of the package'), | 793 | 'length': fields.float('Length', help='The length of the package'), |
2033 | @@ -855,8 +851,8 @@ | |||
2034 | 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."), |
2035 | 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."), |
2036 | 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."), |
2039 | 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."), |
2040 | 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."), |
2041 | 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), |
2042 | 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."), |
2043 | 862 | 'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'), | 858 | 'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'), |
2044 | @@ -914,8 +910,8 @@ | |||
2045 | 914 | _columns = { | 910 | _columns = { |
2046 | 915 | 'name': fields.char('Description', size=64), | 911 | 'name': fields.char('Description', size=64), |
2047 | 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'), |
2050 | 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."), |
2051 | 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"), |
2052 | 919 | } | 915 | } |
2053 | 920 | _order = 'min_quantity asc' | 916 | _order = 'min_quantity asc' |
2054 | 921 | 917 | ||
2055 | @@ -923,7 +919,7 @@ | |||
2056 | 923 | _inherit = 'res.currency' | 919 | _inherit = 'res.currency' |
2057 | 924 | 920 | ||
2058 | 925 | def _check_main_currency_rounding(self, cr, uid, ids, context=None): | 921 | def _check_main_currency_rounding(self, cr, uid, ids, context=None): |
2060 | 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',)) |
2061 | 927 | digits = cr.fetchone() | 923 | digits = cr.fetchone() |
2062 | 928 | if digits and len(digits): | 924 | if digits and len(digits): |
2063 | 929 | digits = digits[0] | 925 | digits = digits[0] |
2064 | @@ -942,7 +938,7 @@ | |||
2065 | 942 | _inherit = 'decimal.precision' | 938 | _inherit = 'decimal.precision' |
2066 | 943 | 939 | ||
2067 | 944 | def _check_main_currency_rounding(self, cr, uid, ids, context=None): | 940 | def _check_main_currency_rounding(self, cr, uid, ids, context=None): |
2069 | 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',)) |
2070 | 946 | res = cr.fetchone() | 942 | res = cr.fetchone() |
2071 | 947 | if res and len(res): | 943 | if res and len(res): |
2072 | 948 | account_precision_id, digits = res | 944 | account_precision_id, digits = res |
2073 | 949 | 945 | ||
2074 | === modified file 'product/product_data.xml' | |||
2075 | --- product/product_data.xml 2013-02-01 13:24:54 +0000 | |||
2076 | +++ product/product_data.xml 2013-10-29 13:27:40 +0000 | |||
2077 | @@ -161,28 +161,20 @@ | |||
2078 | 161 | <field eval="'product.pricelist,'+str(ref('list0'))" name="value"/> | 161 | <field eval="'product.pricelist,'+str(ref('list0'))" name="value"/> |
2079 | 162 | </record> | 162 | </record> |
2080 | 163 | 163 | ||
2099 | 164 | <record forcecreate="True" id="decimal_price" model="decimal.precision"> | 164 | <record forcecreate="True" id="decimal_amount" model="decimal.precision"> |
2100 | 165 | <field name="name">Product Price</field> | 165 | <field name="name">Amount</field> |
2101 | 166 | <field name="digits">2</field> | 166 | <field name="digits">2</field> |
2102 | 167 | </record> | 167 | </record> |
2103 | 168 | <record forcecreate="True" id="decimal_discount" model="decimal.precision"> | 168 | <record forcecreate="True" id="decimal_weight" model="decimal.precision"> |
2104 | 169 | <field name="name">Discount</field> | 169 | <field name="name">Weight</field> |
2105 | 170 | <field name="digits">2</field> | 170 | <field name="digits">2</field> |
2106 | 171 | </record> | 171 | </record> |
2107 | 172 | <record forcecreate="True" id="decimal_account" model="decimal.precision"> | 172 | <record forcecreate="True" id="decimal_qty" model="decimal.precision"> |
2108 | 173 | <field name="name">Account</field> | 173 | <field name="name">Quantity</field> |
2091 | 174 | <field name="digits">2</field> | ||
2092 | 175 | </record> | ||
2093 | 176 | <record forcecreate="True" id="decimal_stock_weight" model="decimal.precision"> | ||
2094 | 177 | <field name="name">Stock Weight</field> | ||
2095 | 178 | <field name="digits">2</field> | ||
2096 | 179 | </record> | ||
2097 | 180 | <record forcecreate="True" id="decimal_product_uom" model="decimal.precision"> | ||
2098 | 181 | <field name="name">Product Unit of Measure</field> | ||
2109 | 182 | <field name="digits" eval="3"/> | 174 | <field name="digits" eval="3"/> |
2110 | 183 | </record> | 175 | </record> |
2113 | 184 | <record forcecreate="True" id="decimal_product_uos" model="decimal.precision"> | 176 | <record forcecreate="True" id="decimal_percentage" model="decimal.precision"> |
2114 | 185 | <field name="name">Product UoS</field> | 177 | <field name="name">Percentage</field> |
2115 | 186 | <field name="digits" eval="3"/> | 178 | <field name="digits" eval="3"/> |
2116 | 187 | </record> | 179 | </record> |
2117 | 188 | 180 | ||
2118 | 189 | 181 | ||
2119 | === modified file 'product/report/product_pricelist.py' | |||
2120 | --- product/report/product_pricelist.py 2013-03-28 12:10:09 +0000 | |||
2121 | +++ product/report/product_pricelist.py 2013-10-29 13:27:40 +0000 | |||
2122 | @@ -110,7 +110,7 @@ | |||
2123 | 110 | return res | 110 | return res |
2124 | 111 | 111 | ||
2125 | 112 | def _get_price(self, pricelist_id, product_id, qty): | 112 | def _get_price(self, pricelist_id, product_id, qty): |
2127 | 113 | sale_price_digits = self.get_digits(dp='Product Price') | 113 | sale_price_digits = self.get_digits(dp='Price') |
2128 | 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] |
2129 | 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) |
2130 | 116 | if price_dict[pricelist_id]: | 116 | if price_dict[pricelist_id]: |
2131 | 117 | 117 | ||
2132 | === modified file 'purchase/purchase.py' | |||
2133 | --- purchase/purchase.py 2013-10-18 12:58:18 +0000 | |||
2134 | +++ purchase/purchase.py 2013-10-29 13:27:40 +0000 | |||
2135 | @@ -208,15 +208,15 @@ | |||
2136 | 208 | 'purchase.order.line': (_get_order, ['date_planned'], 10), | 208 | 'purchase.order.line': (_get_order, ['date_planned'], 10), |
2137 | 209 | } | 209 | } |
2138 | 210 | ), | 210 | ), |
2140 | 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', |
2141 | 212 | store={ | 212 | store={ |
2142 | 213 | 'purchase.order.line': (_get_order, None, 10), | 213 | 'purchase.order.line': (_get_order, None, 10), |
2143 | 214 | }, multi="sums", help="The amount without tax", track_visibility='always'), | 214 | }, multi="sums", help="The amount without tax", track_visibility='always'), |
2145 | 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', |
2146 | 216 | store={ | 216 | store={ |
2147 | 217 | 'purchase.order.line': (_get_order, None, 10), | 217 | 'purchase.order.line': (_get_order, None, 10), |
2148 | 218 | }, multi="sums", help="The tax amount"), | 218 | }, multi="sums", help="The tax amount"), |
2150 | 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', |
2151 | 220 | store={ | 220 | store={ |
2152 | 221 | 'purchase.order.line': (_get_order, None, 10), | 221 | 'purchase.order.line': (_get_order, None, 10), |
2153 | 222 | }, multi="sums",help="The total amount"), | 222 | }, multi="sums",help="The total amount"), |
2154 | @@ -853,15 +853,15 @@ | |||
2155 | 853 | 853 | ||
2156 | 854 | _columns = { | 854 | _columns = { |
2157 | 855 | 'name': fields.text('Description', required=True), | 855 | 'name': fields.text('Description', required=True), |
2159 | 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), |
2160 | 857 | 'date_planned': fields.date('Scheduled Date', required=True, select=True), | 857 | 'date_planned': fields.date('Scheduled Date', required=True, select=True), |
2161 | 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'), |
2162 | 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), |
2163 | 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), |
2164 | 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'), |
2165 | 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'), |
2168 | 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')), |
2169 | 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')), |
2170 | 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'), |
2171 | 866 | 'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',), | 866 | 'account_analytic_id':fields.many2one('account.analytic.account', 'Analytic Account',), |
2172 | 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), |
2173 | 868 | 868 | ||
2174 | === modified file 'purchase/report/order.rml' | |||
2175 | --- purchase/report/order.rml 2013-05-28 08:19:55 +0000 | |||
2176 | +++ purchase/report/order.rml 2013-10-29 13:27:40 +0000 | |||
2177 | @@ -252,10 +252,10 @@ | |||
2178 | 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> |
2179 | 253 | </td> | 253 | </td> |
2180 | 254 | <td> | 254 | <td> |
2182 | 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> |
2183 | 256 | </td> | 256 | </td> |
2184 | 257 | <td> | 257 | <td> |
2186 | 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> |
2187 | 259 | </td> | 259 | </td> |
2188 | 260 | </tr> | 260 | </tr> |
2189 | 261 | </blockTable> | 261 | </blockTable> |
2190 | @@ -271,7 +271,7 @@ | |||
2191 | 271 | <para style="terp_default_9">Net Total :</para> | 271 | <para style="terp_default_9">Net Total :</para> |
2192 | 272 | </td> | 272 | </td> |
2193 | 273 | <td> | 273 | <td> |
2195 | 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> |
2196 | 275 | </td> | 275 | </td> |
2197 | 276 | </tr> | 276 | </tr> |
2198 | 277 | <tr> | 277 | <tr> |
2199 | @@ -284,7 +284,7 @@ | |||
2200 | 284 | <para style="terp_default_9">Taxes :</para> | 284 | <para style="terp_default_9">Taxes :</para> |
2201 | 285 | </td> | 285 | </td> |
2202 | 286 | <td> | 286 | <td> |
2204 | 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> |
2205 | 288 | </td> | 288 | </td> |
2206 | 289 | </tr> | 289 | </tr> |
2207 | 290 | <tr> | 290 | <tr> |
2208 | @@ -297,7 +297,7 @@ | |||
2209 | 297 | <para style="terp_default_Bold_9"><b>Total :</b></para> | 297 | <para style="terp_default_Bold_9"><b>Total :</b></para> |
2210 | 298 | </td> | 298 | </td> |
2211 | 299 | <td> | 299 | <td> |
2213 | 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> |
2214 | 301 | </td> | 301 | </td> |
2215 | 302 | </tr> | 302 | </tr> |
2216 | 303 | </blockTable> | 303 | </blockTable> |
2217 | 304 | 304 | ||
2218 | === modified file 'purchase_requisition/purchase_requisition.py' | |||
2219 | --- purchase_requisition/purchase_requisition.py 2013-06-10 11:41:41 +0000 | |||
2220 | +++ purchase_requisition/purchase_requisition.py 2013-10-29 13:27:40 +0000 | |||
2221 | @@ -174,7 +174,7 @@ | |||
2222 | 174 | _columns = { | 174 | _columns = { |
2223 | 175 | 'product_id': fields.many2one('product.product', 'Product' ), | 175 | 'product_id': fields.many2one('product.product', 'Product' ), |
2224 | 176 | 'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure'), | 176 | 'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure'), |
2226 | 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')), |
2227 | 178 | 'requisition_id' : fields.many2one('purchase.requisition','Purchase Requisition', ondelete='cascade'), | 178 | 'requisition_id' : fields.many2one('purchase.requisition','Purchase Requisition', ondelete='cascade'), |
2228 | 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), |
2229 | 180 | } | 180 | } |
2230 | 181 | 181 | ||
2231 | === modified file 'report_intrastat/report/invoice.rml' | |||
2232 | --- report_intrastat/report/invoice.rml 2012-11-29 22:26:45 +0000 | |||
2233 | +++ report_intrastat/report/invoice.rml 2013-10-29 13:27:40 +0000 | |||
2234 | @@ -360,10 +360,10 @@ | |||
2235 | 360 | <para style="terp_default_8">[[ t.name ]]</para> | 360 | <para style="terp_default_8">[[ t.name ]]</para> |
2236 | 361 | </td> | 361 | </td> |
2237 | 362 | <td> | 362 | <td> |
2239 | 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> |
2240 | 364 | </td> | 364 | </td> |
2241 | 365 | <td> | 365 | <td> |
2243 | 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> |
2244 | 367 | </td> | 367 | </td> |
2245 | 368 | <td> | 368 | <td> |
2246 | 369 | <para style="terp_default_8"> | 369 | <para style="terp_default_8"> |
2247 | 370 | 370 | ||
2248 | === modified file 'report_intrastat/report_intrastat.py' | |||
2249 | --- report_intrastat/report_intrastat.py 2013-04-15 10:23:49 +0000 | |||
2250 | +++ report_intrastat/report_intrastat.py 2013-10-29 13:27:40 +0000 | |||
2251 | @@ -67,7 +67,7 @@ | |||
2252 | 67 | 'code': fields.char('Country code', size=2, readonly=True), | 67 | 'code': fields.char('Country code', size=2, readonly=True), |
2253 | 68 | 'intrastat_id': fields.many2one('report.intrastat.code', 'Intrastat code', readonly=True), | 68 | 'intrastat_id': fields.many2one('report.intrastat.code', 'Intrastat code', readonly=True), |
2254 | 69 | 'weight': fields.float('Weight', readonly=True), | 69 | 'weight': fields.float('Weight', readonly=True), |
2256 | 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')), |
2257 | 71 | 'type': fields.selection([('import', 'Import'), ('export', 'Export')], 'Type'), | 71 | 'type': fields.selection([('import', 'Import'), ('export', 'Export')], 'Type'), |
2258 | 72 | 'currency_id': fields.many2one('res.currency', "Currency", readonly=True), | 72 | 'currency_id': fields.many2one('res.currency', "Currency", readonly=True), |
2259 | 73 | } | 73 | } |
2260 | 74 | 74 | ||
2261 | === modified file 'sale/report/sale_order.rml' | |||
2262 | --- sale/report/sale_order.rml 2013-05-27 16:51:33 +0000 | |||
2263 | +++ sale/report/sale_order.rml 2013-10-29 13:27:40 +0000 | |||
2264 | @@ -251,13 +251,13 @@ | |||
2265 | 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> |
2266 | 252 | </td> | 252 | </td> |
2267 | 253 | <td> | 253 | <td> |
2275 | 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> |
2276 | 255 | </td> | 255 | </td> |
2277 | 256 | <td> | 256 | <td> |
2278 | 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> |
2279 | 258 | </td> | 258 | </td> |
2280 | 259 | <td> | 259 | <td> |
2281 | 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> |
2282 | 261 | </td> | 261 | </td> |
2283 | 262 | </tr> | 262 | </tr> |
2284 | 263 | </blockTable> | 263 | </blockTable> |
2285 | @@ -273,7 +273,7 @@ | |||
2286 | 273 | <para style="terp_default_9">Net Total :</para> | 273 | <para style="terp_default_9">Net Total :</para> |
2287 | 274 | </td> | 274 | </td> |
2288 | 275 | <td> | 275 | <td> |
2290 | 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> |
2291 | 277 | </td> | 277 | </td> |
2292 | 278 | </tr> | 278 | </tr> |
2293 | 279 | <tr> | 279 | <tr> |
2294 | @@ -286,7 +286,7 @@ | |||
2295 | 286 | <para style="terp_default_9">Taxes :</para> | 286 | <para style="terp_default_9">Taxes :</para> |
2296 | 287 | </td> | 287 | </td> |
2297 | 288 | <td> | 288 | <td> |
2299 | 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> |
2300 | 290 | </td> | 290 | </td> |
2301 | 291 | </tr> | 291 | </tr> |
2302 | 292 | <tr> | 292 | <tr> |
2303 | @@ -299,7 +299,7 @@ | |||
2304 | 299 | <para style="terp_default_Bold_9"><b>Total :</b></para> | 299 | <para style="terp_default_Bold_9"><b>Total :</b></para> |
2305 | 300 | </td> | 300 | </td> |
2306 | 301 | <td> | 301 | <td> |
2308 | 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> |
2309 | 303 | </td> | 303 | </td> |
2310 | 304 | </tr> | 304 | </tr> |
2311 | 305 | </blockTable> | 305 | </blockTable> |
2312 | 306 | 306 | ||
2313 | === modified file 'sale/sale.py' | |||
2314 | --- sale/sale.py 2013-09-23 17:13:10 +0000 | |||
2315 | +++ sale/sale.py 2013-10-29 13:27:40 +0000 | |||
2316 | @@ -198,19 +198,19 @@ | |||
2317 | 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."), |
2318 | 199 | 'note': fields.text('Terms and conditions'), | 199 | 'note': fields.text('Terms and conditions'), |
2319 | 200 | 200 | ||
2321 | 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', |
2322 | 202 | store={ | 202 | store={ |
2323 | 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), |
2324 | 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), |
2325 | 205 | }, | 205 | }, |
2326 | 206 | multi='sums', help="The amount without tax.", track_visibility='always'), | 206 | multi='sums', help="The amount without tax.", track_visibility='always'), |
2328 | 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', |
2329 | 208 | store={ | 208 | store={ |
2330 | 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), |
2331 | 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), |
2332 | 211 | }, | 211 | }, |
2333 | 212 | multi='sums', help="The tax amount."), | 212 | multi='sums', help="The tax amount."), |
2335 | 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', |
2336 | 214 | store={ | 214 | store={ |
2337 | 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), |
2338 | 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), |
2339 | @@ -677,18 +677,18 @@ | |||
2340 | 677 | store={ | 677 | store={ |
2341 | 678 | 'account.invoice': (_order_lines_from_invoice, ['state'], 10), | 678 | 'account.invoice': (_order_lines_from_invoice, ['state'], 10), |
2342 | 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)}), |
2344 | 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)]}), |
2345 | 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)]}, |
2346 | 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."), |
2348 | 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')), |
2349 | 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)]}), |
2350 | 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."), |
2352 | 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)]}), |
2353 | 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)]}), |
2355 | 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)]}), |
2356 | 689 | 'product_uos': fields.many2one('product.uom', 'Product UoS'), | 689 | 'product_uos': fields.many2one('product.uom', 'Product UoS'), |
2359 | 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)]}), |
2360 | 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)]}), |
2361 | 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, |
2362 | 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. \ |
2363 | 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. \ |
2364 | @@ -755,7 +755,7 @@ | |||
2365 | 755 | pu = 0.0 | 755 | pu = 0.0 |
2366 | 756 | if uosqty: | 756 | if uosqty: |
2367 | 757 | pu = round(line.price_unit * line.product_uom_qty / uosqty, | 757 | pu = round(line.price_unit * line.product_uom_qty / uosqty, |
2369 | 758 | self.pool.get('decimal.precision').precision_get(cr, uid, 'Product Price')) | 758 | self.pool.get('decimal.precision').precision_get(cr, uid, 'Price')) |
2370 | 759 | fpos = line.order_id.fiscal_position or False | 759 | fpos = line.order_id.fiscal_position or False |
2371 | 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) |
2372 | 761 | if not account_id: | 761 | if not account_id: |
2373 | 762 | 762 | ||
2374 | === modified file 'sale/wizard/sale_make_invoice_advance.py' | |||
2375 | --- sale/wizard/sale_make_invoice_advance.py 2013-06-13 10:59:23 +0000 | |||
2376 | +++ sale/wizard/sale_make_invoice_advance.py 2013-10-29 13:27:40 +0000 | |||
2377 | @@ -39,7 +39,7 @@ | |||
2378 | 39 | 'product_id': fields.many2one('product.product', 'Advance Product', | 39 | 'product_id': fields.many2one('product.product', 'Advance Product', |
2379 | 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'. |
2380 | 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."""), |
2382 | 42 | 'amount': fields.float('Advance Amount', digits_compute= dp.get_precision('Account'), | 42 | 'amount': fields.float('Advance Amount', digits_compute= dp.get_precision('Amount'), |
2383 | 43 | help="The amount to be invoiced in advance."), | 43 | help="The amount to be invoiced in advance."), |
2384 | 44 | } | 44 | } |
2385 | 45 | 45 | ||
2386 | 46 | 46 | ||
2387 | === modified file 'stock/product.py' | |||
2388 | --- stock/product.py 2013-06-26 11:10:29 +0000 | |||
2389 | +++ stock/product.py 2013-10-29 13:27:40 +0000 | |||
2390 | @@ -358,7 +358,7 @@ | |||
2391 | 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'), |
2392 | 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'), |
2393 | 360 | 'qty_available': fields.function(_product_available, multi='qty_available', | 360 | 'qty_available': fields.function(_product_available, multi='qty_available', |
2395 | 361 | type='float', digits_compute=dp.get_precision('Product Unit of Measure'), | 361 | type='float', digits_compute=dp.get_precision('Quantity'), |
2396 | 362 | string='Quantity On Hand', | 362 | string='Quantity On Hand', |
2397 | 363 | help="Current quantity of products.\n" | 363 | help="Current quantity of products.\n" |
2398 | 364 | "In a context with a single Stock Location, this includes " | 364 | "In a context with a single Stock Location, this includes " |
2399 | @@ -371,7 +371,7 @@ | |||
2400 | 371 | "Otherwise, this includes goods stored in any Stock Location " | 371 | "Otherwise, this includes goods stored in any Stock Location " |
2401 | 372 | "with 'internal' type."), | 372 | "with 'internal' type."), |
2402 | 373 | 'virtual_available': fields.function(_product_available, multi='qty_available', | 373 | 'virtual_available': fields.function(_product_available, multi='qty_available', |
2404 | 374 | type='float', digits_compute=dp.get_precision('Product Unit of Measure'), | 374 | type='float', digits_compute=dp.get_precision('Quantity'), |
2405 | 375 | string='Forecasted Quantity', | 375 | string='Forecasted Quantity', |
2406 | 376 | help="Forecast quantity (computed as Quantity On Hand " | 376 | help="Forecast quantity (computed as Quantity On Hand " |
2407 | 377 | "- Outgoing + Incoming)\n" | 377 | "- Outgoing + Incoming)\n" |
2408 | @@ -385,7 +385,7 @@ | |||
2409 | 385 | "Otherwise, this includes goods stored in any Stock Location " | 385 | "Otherwise, this includes goods stored in any Stock Location " |
2410 | 386 | "with 'internal' type."), | 386 | "with 'internal' type."), |
2411 | 387 | 'incoming_qty': fields.function(_product_available, multi='qty_available', | 387 | 'incoming_qty': fields.function(_product_available, multi='qty_available', |
2413 | 388 | type='float', digits_compute=dp.get_precision('Product Unit of Measure'), | 388 | type='float', digits_compute=dp.get_precision('Quantity'), |
2414 | 389 | string='Incoming', | 389 | string='Incoming', |
2415 | 390 | help="Quantity of products that are planned to arrive.\n" | 390 | help="Quantity of products that are planned to arrive.\n" |
2416 | 391 | "In a context with a single Stock Location, this includes " | 391 | "In a context with a single Stock Location, this includes " |
2417 | @@ -399,7 +399,7 @@ | |||
2418 | 399 | "Otherwise, this includes goods arriving to any Stock " | 399 | "Otherwise, this includes goods arriving to any Stock " |
2419 | 400 | "Location with 'internal' type."), | 400 | "Location with 'internal' type."), |
2420 | 401 | 'outgoing_qty': fields.function(_product_available, multi='qty_available', | 401 | 'outgoing_qty': fields.function(_product_available, multi='qty_available', |
2422 | 402 | type='float', digits_compute=dp.get_precision('Product Unit of Measure'), | 402 | type='float', digits_compute=dp.get_precision('Quantity'), |
2423 | 403 | string='Outgoing', | 403 | string='Outgoing', |
2424 | 404 | help="Quantity of products that are planned to leave.\n" | 404 | help="Quantity of products that are planned to leave.\n" |
2425 | 405 | "In a context with a single Stock Location, this includes " | 405 | "In a context with a single Stock Location, this includes " |
2426 | 406 | 406 | ||
2427 | === modified file 'stock/report/lot_overview.rml' | |||
2428 | --- stock/report/lot_overview.rml 2012-11-29 22:26:45 +0000 | |||
2429 | +++ stock/report/lot_overview.rml 2013-10-29 13:27:40 +0000 | |||
2430 | @@ -181,10 +181,10 @@ | |||
2431 | 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> |
2432 | 182 | </td> | 182 | </td> |
2433 | 183 | <td> | 183 | <td> |
2435 | 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> |
2436 | 185 | </td> | 185 | </td> |
2437 | 186 | <td> | 186 | <td> |
2439 | 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> |
2440 | 188 | </td> | 188 | </td> |
2441 | 189 | </tr> | 189 | </tr> |
2442 | 190 | </blockTable> | 190 | </blockTable> |
2443 | @@ -198,7 +198,7 @@ | |||
2444 | 198 | <para style="terp_default_Bold_9">Total:</para> | 198 | <para style="terp_default_Bold_9">Total:</para> |
2445 | 199 | </td> | 199 | </td> |
2446 | 200 | <td> | 200 | <td> |
2448 | 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> |
2449 | 202 | </td> | 202 | </td> |
2450 | 203 | </tr> | 203 | </tr> |
2451 | 204 | </blockTable> | 204 | </blockTable> |
2452 | @@ -215,7 +215,7 @@ | |||
2453 | 215 | </para> | 215 | </para> |
2454 | 216 | </td> | 216 | </td> |
2455 | 217 | <td> | 217 | <td> |
2457 | 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> |
2458 | 219 | </td> | 219 | </td> |
2459 | 220 | </tr> | 220 | </tr> |
2460 | 221 | </blockTable> | 221 | </blockTable> |
2461 | 222 | 222 | ||
2462 | === modified file 'stock/report/lot_overview_all.rml' | |||
2463 | --- stock/report/lot_overview_all.rml 2012-11-29 22:26:45 +0000 | |||
2464 | +++ stock/report/lot_overview_all.rml 2013-10-29 13:27:40 +0000 | |||
2465 | @@ -181,10 +181,10 @@ | |||
2466 | 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> |
2467 | 182 | </td> | 182 | </td> |
2468 | 183 | <td> | 183 | <td> |
2470 | 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> |
2471 | 185 | </td> | 185 | </td> |
2472 | 186 | <td> | 186 | <td> |
2474 | 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> |
2475 | 188 | </td> | 188 | </td> |
2476 | 189 | </tr> | 189 | </tr> |
2477 | 190 | </blockTable> | 190 | </blockTable> |
2478 | @@ -198,7 +198,7 @@ | |||
2479 | 198 | <para style="terp_default_Bold_9">Total:</para> | 198 | <para style="terp_default_Bold_9">Total:</para> |
2480 | 199 | </td> | 199 | </td> |
2481 | 200 | <td> | 200 | <td> |
2483 | 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> |
2484 | 202 | </td> | 202 | </td> |
2485 | 203 | </tr> | 203 | </tr> |
2486 | 204 | </blockTable> | 204 | </blockTable> |
2487 | @@ -215,7 +215,7 @@ | |||
2488 | 215 | </para> | 215 | </para> |
2489 | 216 | </td> | 216 | </td> |
2490 | 217 | <td> | 217 | <td> |
2492 | 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> |
2493 | 219 | </td> | 219 | </td> |
2494 | 220 | </tr> | 220 | </tr> |
2495 | 221 | </blockTable> | 221 | </blockTable> |
2496 | 222 | 222 | ||
2497 | === modified file 'stock/report/report_stock_move.py' | |||
2498 | --- stock/report/report_stock_move.py 2013-04-15 10:23:49 +0000 | |||
2499 | +++ stock/report/report_stock_move.py 2013-10-29 13:27:40 +0000 | |||
2500 | @@ -48,9 +48,9 @@ | |||
2501 | 48 | 'product_qty_in':fields.integer('In Qty',readonly=True), | 48 | 'product_qty_in':fields.integer('In Qty',readonly=True), |
2502 | 49 | 'product_qty_out':fields.integer('Out Qty',readonly=True), | 49 | 'product_qty_out':fields.integer('Out Qty',readonly=True), |
2503 | 50 | 'value' : fields.float('Total Value', required=True), | 50 | 'value' : fields.float('Total Value', required=True), |
2507 | 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"), |
2508 | 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"), |
2509 | 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"), |
2510 | 54 | 'stock_journal': fields.many2one('stock.journal','Stock Journal', select=True), | 54 | 'stock_journal': fields.many2one('stock.journal','Stock Journal', select=True), |
2511 | 55 | 55 | ||
2512 | 56 | 56 | ||
2513 | @@ -160,8 +160,8 @@ | |||
2514 | 160 | 'location_id': fields.many2one('stock.location', 'Location', readonly=True), | 160 | 'location_id': fields.many2one('stock.location', 'Location', readonly=True), |
2515 | 161 | 'prodlot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True), | 161 | 'prodlot_id': fields.many2one('stock.production.lot', 'Lot', readonly=True), |
2516 | 162 | 'company_id': fields.many2one('res.company', 'Company', readonly=True), | 162 | 'company_id': fields.many2one('res.company', 'Company', readonly=True), |
2519 | 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), |
2520 | 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), |
2521 | 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, |
2522 | 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\'.\ |
2523 | 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.'), |
2524 | 168 | 168 | ||
2525 | === modified file 'stock/res_config.py' | |||
2526 | --- stock/res_config.py 2013-09-17 13:08:14 +0000 | |||
2527 | +++ stock/res_config.py 2013-10-29 13:27:40 +0000 | |||
2528 | @@ -73,12 +73,12 @@ | |||
2529 | 73 | } | 73 | } |
2530 | 74 | 74 | ||
2531 | 75 | def get_default_dp(self, cr, uid, fields, context=None): | 75 | def get_default_dp(self, cr, uid, fields, context=None): |
2533 | 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') |
2534 | 77 | return {'decimal_precision': dp.digits} | 77 | return {'decimal_precision': dp.digits} |
2535 | 78 | 78 | ||
2536 | 79 | def set_default_dp(self, cr, uid, ids, context=None): | 79 | def set_default_dp(self, cr, uid, ids, context=None): |
2537 | 80 | config = self.browse(cr, uid, ids[0], context) | 80 | config = self.browse(cr, uid, ids[0], context) |
2539 | 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') |
2540 | 82 | dp.write({'digits': config.decimal_precision}) | 82 | dp.write({'digits': config.decimal_precision}) |
2541 | 83 | 83 | ||
2542 | 84 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 84 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2543 | 85 | 85 | ||
2544 | === modified file 'stock/stock.py' | |||
2545 | --- stock/stock.py 2013-10-18 12:58:18 +0000 | |||
2546 | +++ stock/stock.py 2013-10-29 13:27:40 +0000 | |||
2547 | @@ -200,8 +200,8 @@ | |||
2548 | 200 | 200 | ||
2549 | 201 | 'parent_left': fields.integer('Left Parent', select=1), | 201 | 'parent_left': fields.integer('Left Parent', select=1), |
2550 | 202 | 'parent_right': fields.integer('Right Parent', select=1), | 202 | 'parent_right': fields.integer('Right Parent', select=1), |
2553 | 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')), |
2554 | 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')), |
2555 | 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'), |
2556 | 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.'), |
2557 | 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')], |
2558 | @@ -1468,7 +1468,7 @@ | |||
2559 | 1468 | 'date': fields.datetime('Creation Date', required=True), | 1468 | 'date': fields.datetime('Creation Date', required=True), |
2560 | 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, |
2561 | 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", |
2563 | 1471 | digits_compute=dp.get_precision('Product Unit of Measure')), | 1471 | digits_compute=dp.get_precision('Quantity')), |
2564 | 1472 | 'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'), | 1472 | 'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'), |
2565 | 1473 | 'company_id': fields.many2one('res.company', 'Company', select=True), | 1473 | 'company_id': fields.many2one('res.company', 'Company', select=True), |
2566 | 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), |
2567 | @@ -1607,7 +1607,7 @@ | |||
2568 | 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"), |
2569 | 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)]}), |
2570 | 1609 | 1609 | ||
2572 | 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'), |
2573 | 1611 | required=True,states={'done': [('readonly', True)]}, | 1611 | required=True,states={'done': [('readonly', True)]}, |
2574 | 1612 | help="This is the quantity of products from an inventory " | 1612 | help="This is the quantity of products from an inventory " |
2575 | 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 " |
2576 | @@ -1618,7 +1618,7 @@ | |||
2577 | 1618 | "the product reservation, and should be done with care." | 1618 | "the product reservation, and should be done with care." |
2578 | 1619 | ), | 1619 | ), |
2579 | 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)]}), |
2581 | 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)]}), |
2582 | 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)]}), |
2583 | 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."), |
2584 | 1624 | 1624 | ||
2585 | @@ -1648,7 +1648,7 @@ | |||
2586 | 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"\ |
2587 | 1649 | "* Available: When products are reserved, it is set to \'Available\'.\n"\ | 1649 | "* Available: When products are reserved, it is set to \'Available\'.\n"\ |
2588 | 1650 | "* Done: When the shipment is processed, the state is \'Done\'."), | 1650 | "* Done: When the shipment is processed, the state is \'Done\'."), |
2590 | 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)"), |
2591 | 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)"), |
2592 | 1653 | 'company_id': fields.many2one('res.company', 'Company', required=True, select=True), | 1653 | 'company_id': fields.many2one('res.company', 'Company', required=True, select=True), |
2593 | 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), |
2594 | @@ -2896,7 +2896,7 @@ | |||
2595 | 2896 | 'location_id': fields.many2one('stock.location', 'Location', required=True), | 2896 | 'location_id': fields.many2one('stock.location', 'Location', required=True), |
2596 | 2897 | 'product_id': fields.many2one('product.product', 'Product', required=True, select=True), | 2897 | 'product_id': fields.many2one('product.product', 'Product', required=True, select=True), |
2597 | 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), |
2599 | 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')), |
2600 | 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), |
2601 | 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)]"), |
2602 | 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), |
2603 | 2903 | 2903 | ||
2604 | === modified file 'stock/stock_data.xml' | |||
2605 | --- stock/stock_data.xml 2012-11-29 22:26:45 +0000 | |||
2606 | +++ stock/stock_data.xml 2013-10-29 13:27:40 +0000 | |||
2607 | @@ -151,12 +151,6 @@ | |||
2608 | 151 | <field eval="'stock.location,'+str(location_production)" name="value"/> | 151 | <field eval="'stock.location,'+str(location_production)" name="value"/> |
2609 | 152 | </record> | 152 | </record> |
2610 | 153 | 153 | ||
2611 | 154 | |||
2612 | 155 | <record forcecreate="True" id="decimal_shipping_delay" model="decimal.precision"> | ||
2613 | 156 | <field name="name">Shipping Delay</field> | ||
2614 | 157 | <field name="digits" eval="2"/> | ||
2615 | 158 | </record> | ||
2616 | 159 | |||
2617 | 160 | <!-- | 154 | <!-- |
2618 | 161 | Resource: stock.warehouse | 155 | Resource: stock.warehouse |
2619 | 162 | --> | 156 | --> |
2620 | 163 | 157 | ||
2621 | === modified file 'stock/wizard/stock_change_product_qty.py' | |||
2622 | --- stock/wizard/stock_change_product_qty.py 2013-08-01 14:21:19 +0000 | |||
2623 | +++ stock/wizard/stock_change_product_qty.py 2013-10-29 13:27:40 +0000 | |||
2624 | @@ -29,7 +29,7 @@ | |||
2625 | 29 | _description = "Change Product Quantity" | 29 | _description = "Change Product Quantity" |
2626 | 30 | _columns = { | 30 | _columns = { |
2627 | 31 | 'product_id' : fields.many2one('product.product', 'Product'), | 31 | 'product_id' : fields.many2one('product.product', 'Product'), |
2629 | 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.'), |
2630 | 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)]"), |
2631 | 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')]"), |
2632 | 35 | } | 35 | } |
2633 | 36 | 36 | ||
2634 | === modified file 'stock/wizard/stock_change_standard_price.py' | |||
2635 | --- stock/wizard/stock_change_standard_price.py 2013-09-17 12:21:02 +0000 | |||
2636 | +++ stock/wizard/stock_change_standard_price.py 2013-10-29 13:27:40 +0000 | |||
2637 | @@ -27,7 +27,7 @@ | |||
2638 | 27 | _name = "stock.change.standard.price" | 27 | _name = "stock.change.standard.price" |
2639 | 28 | _description = "Change Standard Price" | 28 | _description = "Change Standard Price" |
2640 | 29 | _columns = { | 29 | _columns = { |
2642 | 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'), |
2643 | 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 " |
2644 | 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" |
2645 | 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."), |
2646 | 34 | 34 | ||
2647 | === modified file 'stock/wizard/stock_move.py' | |||
2648 | --- stock/wizard/stock_move.py 2013-04-15 10:23:49 +0000 | |||
2649 | +++ stock/wizard/stock_move.py 2013-10-29 13:27:40 +0000 | |||
2650 | @@ -29,7 +29,7 @@ | |||
2651 | 29 | 29 | ||
2652 | 30 | _columns = { | 30 | _columns = { |
2653 | 31 | 'product_id': fields.many2one('product.product', 'Product', required=True, select=True), | 31 | 'product_id': fields.many2one('product.product', 'Product', required=True, select=True), |
2655 | 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), |
2656 | 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), |
2657 | 34 | 'location_id': fields.many2one('stock.location', 'Location', required=True) | 34 | 'location_id': fields.many2one('stock.location', 'Location', required=True) |
2658 | 35 | } | 35 | } |
2659 | @@ -163,7 +163,7 @@ | |||
2660 | 163 | return res | 163 | return res |
2661 | 164 | 164 | ||
2662 | 165 | _columns = { | 165 | _columns = { |
2664 | 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')), |
2665 | 167 | 'product_id': fields.many2one('product.product', 'Product', required=True, select=True), | 167 | 'product_id': fields.many2one('product.product', 'Product', required=True, select=True), |
2666 | 168 | 'product_uom': fields.many2one('product.uom', 'Unit of Measure'), | 168 | 'product_uom': fields.many2one('product.uom', 'Unit of Measure'), |
2667 | 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'), |
2668 | @@ -259,7 +259,7 @@ | |||
2669 | 259 | _description = "Stock move Split lines" | 259 | _description = "Stock move Split lines" |
2670 | 260 | _columns = { | 260 | _columns = { |
2671 | 261 | 'name': fields.char('Serial Number', size=64), | 261 | 'name': fields.char('Serial Number', size=64), |
2673 | 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')), |
2674 | 263 | 'wizard_id': fields.many2one('stock.move.split', 'Parent Wizard'), | 263 | 'wizard_id': fields.many2one('stock.move.split', 'Parent Wizard'), |
2675 | 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)'), |
2676 | 265 | 'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number'), | 265 | 'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number'), |
2677 | 266 | 266 | ||
2678 | === modified file 'stock/wizard/stock_partial_picking.py' | |||
2679 | --- stock/wizard/stock_partial_picking.py 2013-06-14 09:19:24 +0000 | |||
2680 | +++ stock/wizard/stock_partial_picking.py 2013-10-29 13:27:40 +0000 | |||
2681 | @@ -43,7 +43,7 @@ | |||
2682 | 43 | _rec_name = 'product_id' | 43 | _rec_name = 'product_id' |
2683 | 44 | _columns = { | 44 | _columns = { |
2684 | 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'), |
2686 | 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), |
2687 | 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'), |
2688 | 48 | 'prodlot_id' : fields.many2one('stock.production.lot', 'Serial Number', ondelete='CASCADE'), | 48 | 'prodlot_id' : fields.many2one('stock.production.lot', 'Serial Number', ondelete='CASCADE'), |
2689 | 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')]), |
2690 | 50 | 50 | ||
2691 | === modified file 'stock/wizard/stock_return_picking.py' | |||
2692 | --- stock/wizard/stock_return_picking.py 2013-09-10 12:21:13 +0000 | |||
2693 | +++ stock/wizard/stock_return_picking.py 2013-10-29 13:27:40 +0000 | |||
2694 | @@ -31,7 +31,7 @@ | |||
2695 | 31 | 31 | ||
2696 | 32 | _columns = { | 32 | _columns = { |
2697 | 33 | 'product_id' : fields.many2one('product.product', string="Product", required=True), | 33 | 'product_id' : fields.many2one('product.product', string="Product", required=True), |
2699 | 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), |
2700 | 35 | 'wizard_id' : fields.many2one('stock.return.picking', string="Wizard"), | 35 | 'wizard_id' : fields.many2one('stock.return.picking', string="Wizard"), |
2701 | 36 | 'move_id' : fields.many2one('stock.move', "Move"), | 36 | 'move_id' : fields.many2one('stock.move', "Move"), |
2702 | 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), |
2703 | 38 | 38 | ||
2704 | === modified file 'stock/wizard/stock_splitinto.py' | |||
2705 | --- stock/wizard/stock_splitinto.py 2013-04-15 10:23:49 +0000 | |||
2706 | +++ stock/wizard/stock_splitinto.py 2013-10-29 13:27:40 +0000 | |||
2707 | @@ -27,7 +27,7 @@ | |||
2708 | 27 | _name = "stock.split.into" | 27 | _name = "stock.split.into" |
2709 | 28 | _description = "Split into" | 28 | _description = "Split into" |
2710 | 29 | _columns = { | 29 | _columns = { |
2712 | 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')), |
2713 | 31 | } | 31 | } |
2714 | 32 | _defaults = { | 32 | _defaults = { |
2715 | 33 | 'quantity': lambda *x: 0, | 33 | 'quantity': lambda *x: 0, |