diff --git a/addons/account/models/account.py b/addons/account/models/account.py
index 7fe329f41ce..f3a1228b58d 100644
--- a/addons/account/models/account.py
+++ b/addons/account/models/account.py
@@ -107,7 +107,7 @@ class AccountAccount(models.Model):
last_time_entries_checked = fields.Datetime(string='Latest Invoices & Payments Matching Date', readonly=True, copy=False,
help='Last time the invoices & payments matching was performed on this account. It is set either if there\'s not at least '\
'an unreconciled debit and an unreconciled credit Or if you click the "Done" button.')
- reconcile = fields.Boolean(string='Reconciliation of Entries', default=False,
+ reconcile = fields.Boolean(string='Allow Reconciliation', default=False,
help="Check this box if this account allows invoices & payments matching of journal items.")
tax_ids = fields.Many2many('account.tax', 'account_account_tax_default_rel',
'account_id', 'tax_id', string='Default Taxes')
diff --git a/addons/account/models/chart_template.py b/addons/account/models/chart_template.py
index 22fa9e8d1ee..12b4433bd70 100644
--- a/addons/account/models/chart_template.py
+++ b/addons/account/models/chart_template.py
@@ -713,6 +713,9 @@ class WizardMultiChartsAccounts(models.TransientModel):
'cash_account_code_prefix': self.cash_account_code_prefix,
'chart_template_id': self.chart_template_id.id})
+ #set the coa currency to active
+ self.currency_id.write({'active': True})
+
# When we install the CoA of first company, set the currency to price types and pricelists
if company.id == 1:
for reference in ['product.list_price', 'product.standard_price', 'product.list0', 'purchase.list0']:
@@ -738,7 +741,7 @@ class WizardMultiChartsAccounts(models.TransientModel):
# Create the current year earning account (outside of the CoA)
self.env['account.account'].create({
- 'code': '0',
+ 'code': '9999',
'name': _('Undistributed Profits/Losses'),
'user_type_id': self.env.ref("account.data_unaffected_earnings").id,
'company_id': company.id,})
diff --git a/addons/account/views/account_invoice_view.xml b/addons/account/views/account_invoice_view.xml
index a8d0e24675a..d6ac5b78d5f 100644
--- a/addons/account/views/account_invoice_view.xml
+++ b/addons/account/views/account_invoice_view.xml
@@ -133,8 +133,8 @@
-
-
+
+
@@ -194,8 +194,8 @@
-
-
+
+
@@ -245,7 +245,7 @@
-
+
@@ -383,7 +383,7 @@
-
+
diff --git a/addons/account/views/account_payment_view.xml b/addons/account/views/account_payment_view.xml
index 929ea951482..5878b610cb0 100644
--- a/addons/account/views/account_payment_view.xml
+++ b/addons/account/views/account_payment_view.xml
@@ -107,7 +107,7 @@
-
+
@@ -191,7 +191,7 @@
-
+
diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml
index 293c58d7d68..f000c0b4e88 100644
--- a/addons/account/views/account_view.xml
+++ b/addons/account/views/account_view.xml
@@ -15,14 +15,12 @@
- -
-
+
-
@@ -266,7 +264,7 @@
-
+
Keep empty for no control
@@ -1204,14 +1202,14 @@
-
+
-
+
@@ -1221,8 +1219,8 @@
-
+
diff --git a/addons/account_cancel/account_cancel_view.xml b/addons/account_cancel/account_cancel_view.xml
index 9f18f6de651..ee68bff12a1 100644
--- a/addons/account_cancel/account_cancel_view.xml
+++ b/addons/account_cancel/account_cancel_view.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index 55c50bdb838..1bc8d856ee1 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -55,6 +55,11 @@ class AccountVoucher(models.Model):
voucher.amount = total + voucher.tax_correction
voucher.tax_amount = tax_amount
+ @api.one
+ @api.depends('account_pay_now_id', 'account_pay_later_id', 'pay_now')
+ def _get_account(self):
+ self.account_id = self.account_pay_now_id if self.pay_now == 'pay_now' else self.account_pay_later_id
+
_name = 'account.voucher'
_description = 'Accounting Voucher'
_inherit = ['mail.thread']
@@ -65,7 +70,7 @@ class AccountVoucher(models.Model):
date = fields.Date(readonly=True, select=True, states={'draft': [('readonly', False)]},
help="Effective date for accounting entries", copy=False, default=fields.Date.context_today)
journal_id = fields.Many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft': [('readonly', False)]}, default=_default_journal)
- account_id = fields.Many2one('account.account', 'Account', required=True, readonly=True, states={'draft': [('readonly', False)]}, domain=[('deprecated', '=', False)])
+ account_id = fields.Many2one('account.account', 'Account', required=True, readonly=True, states={'draft': [('readonly', False)]}, domain="[('deprecated', '=', False), ('internal_type','=', (pay_now == 'pay_now' and 'liquidity' or 'receivable'))]")
line_ids = fields.One2many('account.voucher.line', 'voucher_id', 'Voucher Lines',
readonly=True, copy=True,
states={'draft': [('readonly', False)]})
@@ -97,19 +102,19 @@ class AccountVoucher(models.Model):
], 'Payment', select=True, readonly=True, states={'draft': [('readonly', False)]}, default='pay_later')
date_due = fields.Date('Due Date', readonly=True, select=True, states={'draft': [('readonly', False)]})
- @api.onchange('partner_id')
+ @api.onchange('partner_id', 'pay_now')
def onchange_partner_id(self):
- if self.journal_id.type == 'sale':
- account_id = self.partner_id.property_account_receivable_id.id
- elif self.journal_id.type == 'purchase':
- account_id = self.partner_id.property_account_payable_id.id
- elif self.voucher_type == 'sale':
- account_id = sef.journal_id.default_debit_account_id.id
- elif self.voucher_type == 'purchase':
- account_id = self.journal_id.default_credit_account_id.id
+ if self.pay_now =='pay_now':
+ liq_journal = self.env['account.journal'].search([('type', 'in', ('bank', 'cash'))], limit=1)
+ self.account_id = liq_journal.default_debit_account_id \
+ if self.voucher_type == 'sale' else liq_journal.default_credit_account_id
else:
- account_id = self.journal_id.default_credit_account_id.id or self.journal_id.default_debit_account_id.id
- self.account_id = account_id
+ if self.partner_id:
+ self.account_id = self.partner_id.property_account_receivable_id \
+ if self.voucher_type == 'sale' else self.partner_id.property_account_payable_id
+ else:
+ self.account_id = self.journal_id.default_debit_account_id \
+ if self.voucher_type == 'sale' else self.journal_id.default_credit_account_id
@api.multi
def button_proforma_voucher(self):
@@ -139,24 +144,6 @@ class AccountVoucher(models.Model):
raise Warning(_('Cannot delete voucher(s) which are already opened or paid.'))
return super(AccountVoucher, self).unlink()
- @api.onchange('pay_now')
- def onchange_payment(self):
- account_id = False
- if self.pay_now == 'pay_later':
- partner = self.partner_id
- journal = self.journal_id
- if journal.type == 'sale':
- account_id = partner.property_account_receivable_id.id
- elif journal.type == 'purchase':
- account_id = partner.property_account_payable_id.id
- elif self.voucher_type == 'sale':
- account_id = journal.default_debit_account_id.id
- elif self.voucher_type == 'purchase':
- account_id = journal.default_credit_account_id.id
- else:
- account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
- self.account_id = account_id
-
@api.multi
def first_move_line_get(self, move_id, company_currency, current_currency):
debit = credit = 0.0
@@ -337,7 +324,6 @@ class account_voucher_line(models.Model):
store=True, readonly=True, compute='_compute_subtotal')
quantity = fields.Float(digits=dp.get_precision('Product Unit of Measure'),
required=True, default=1)
- account_id = fields.Many2one('account.account', 'Account', required=True, domain=[('deprecated', '=', False)])
account_analytic_id = fields.Many2one('account.analytic.account', 'Analytic Account')
company_id = fields.Many2one('res.company', related='voucher_id.company_id', string='Company', store=True, readonly=True)
tax_ids = fields.Many2many('account.tax', string='Tax', help="Only for tax excluded from price")
diff --git a/addons/account_voucher/account_voucher_view.xml b/addons/account_voucher/account_voucher_view.xml
index 645fa92078f..8ca0df1f7b8 100644
--- a/addons/account_voucher/account_voucher_view.xml
+++ b/addons/account_voucher/account_voucher_view.xml
@@ -8,7 +8,6 @@
-
diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml
index 62c349b123a..d6d4deb5cc6 100644
--- a/addons/account_voucher/voucher_sales_purchase_view.xml
+++ b/addons/account_voucher/voucher_sales_purchase_view.xml
@@ -67,15 +67,12 @@
-
-
-
+
+
@@ -180,10 +177,7 @@
-
-
+
diff --git a/openerp/addons/base/res/res_currency_data.xml b/openerp/addons/base/res/res_currency_data.xml
index 864bd944919..c9c553f6985 100644
--- a/openerp/addons/base/res/res_currency_data.xml
+++ b/openerp/addons/base/res/res_currency_data.xml
@@ -14,42 +14,49 @@
VEF
Bs.F
0.0001
+
CAD
$
0.01
+
CHF
CHF
0.01
+
BRL
R$
0.01
+
CNY
¥
0.01
+
COP
$
0.01
+
CZK
Kč
0.01
+
@@ -57,24 +64,28 @@
kr
0.01
before
+
HUF
Ft
0.01
+
IDR
Rp
0.01
+
LVL
Ls
0.01
+
@@ -82,24 +93,28 @@
kr
0.01
before
+
XPF
XPF
1.00
+
PAB
B/.
0.01
+
PLN
zł
0.01
+
@@ -107,675 +122,788 @@
kr
0.01
before
+
ARS
$
0.01
+
INR
₹
0.01
+
AUD
$
0.01
+
UAH
₴
0.01
+
VND
₫
0.01
+
HKD
$
0.01
+
JPY
¥
0.01
+
BGN
лв
0.01
+
LTL
Lt
0.01
+
RON
lei
0.01
+
HRK
kn
0.01
+
RUB
руб
0.01
+
TRY
TL
0.01
+
KRW
₩
0.01
+
MXN
$
0.01
+
MYR
RM
0.01
+
NZD
$
0.01
+
PHP
Php
0.01
+
SGD
$
0.01
+
ZAR
R
0.01
+
Reserve
+
CRC
0.01
¢
+
MUR
Rs
0.01
+
XOF
CFA
1
+
XAF
FCFA
1
+
UGX
USh
1
+
HNL
L
0.01
+
CLP
$
0.01
+
UYU
$
0.01
+
AFN
Afs
0.01
+
AOA
Kz
0.01
+
XCD
$
0.01
+
AMD
դր.
0.01
+
AWG
Afl.
0.01
+
AZN
m
0.01
+
BSD
B$
0.01
+
BHD
BD
0.01
+
BDT
৳
0.01
+
BBD
Bds$
0.01
+
BYR
BR
0.01
+
BZD
BZ$
0.01
+
BMD
BD$
0.01
+
BTN
Nu.
0.01
+
BOB
Bs.
0.01
+
BAM
KM
0.01
+
BWP
P
0.01
+
BIF
FBu
0.01
+
KHR
៛
0.01
+
KYD
$
0.01
+
KMF
CF
0.01
+
CDF
Fr
0.01
+
CUP
$
0.01
+
ANG
ƒ
0.01
+
CYP
£
0.01
+
DJF
Fdj
0.01
+
DOP
RD$
0.01
+
TPE
0.01
+
ECS
S/.
0.01
+
EGP
E£
0.01
+
SVC
¢
0.01
+
ERN
Nfk
0.01
+
ETB
Br
0.01
+
FKP
£
0.01
+
FJD
FJ$
0.01
+
GEL
ლ
0.01
+
GIP
£
0.01
+
QTQ
Q
0.01
+
GNF
FG
0.01
+
GWP
0.01
+
GYD
$
0.01
+
HTG
G
0.01
+
ISK
kr
0.01
+
IRR
﷼
0.01
+
IQD
ع.د
0.01
+
ILS
₪
0.01
+
JMD
$
0.01
+
JOD
د.ا
0.01
+
KZT
лв
0.01
+
KES
KSh
0.01
+
KWD
د.ك
0.01
+
KGS
лв
0.01
+
LAK
₭
0.01
+
LBP
ل.ل
0.01
+
LSL
L
0.01
+
LRD
L$
0.01
+
LYD
ل.د
0.01
+
MOP
MOP$
0.01
+
MKD
ден
0.01
+
MGA
Ar
0.01
+
MWK
MK
0.01
+
MVR
.ރ
0.01
+
MRO
UM
0.01
+
MDL
L
0.01
+
MNT
₮
0.01
+
MAD
د.م.
0.01
+
BND
$
0.01
+
DZD
DZ
0.01
+
GHS
GH¢
0.01
+
GMD
D
0.01
+
ZRZ
Ƶ
0.01
+
MZN
MT
0.01
+
MMK
K
0.01
+
NAD
$
0.01
+
NPR
₨
0.01
+
ALL
L
0.01
+
NIO
C$
0.01
+
NGN
₦
0.01
+
KPW
₩
0.01
+
ZWD
Z$
0.01
+
ZMK
ZK
0.01
+
YER
﷼
0.01
+
VUB
Bs
0.01
+
@@ -788,113 +916,132 @@
VUV
VT
0.01
+
UZS
лв
0.01
+
AED
د.إ
0.01
+
UAG
₴
0.01
+
TMM
m
0.01
+
TRL
TL
0.01
+
TND
DT
0.01
+
TTD
$
0.01
+
TOP
T$
0.01
+
THB
฿
0.01
+
TZS
x/y
0.01
+
TJR
0.01
+
TWD
NT$
0.01
+
SYP
£
0.01
+
SZL
E
0.01
+
SRG
$
0.01
+
SDD
£Sd
0.01
+
LKR
Rs
0.01
+
SSP
£
0.01
+
@@ -902,149 +1049,174 @@
£
0.01
before
+
SOD
Sh.
0.01
+
SBD
SI$
0.01
+
SLL
Le
0.01
+
SCR
SR
0.01
+
RSD
din.
0.01
+
SAR
SR
0.01
+
STD
Db
0.01
+
ITL
₤
0.01
+
WST
WS$
0.01
+
SHP
£
0.01
+
RWF
RF
0.01
+
RUR
R
0.01
+
QAR
QR
0.01
+
PLZ
zł
0.01
+
PEN
S/.
0.01
+
PYG
₲
0.01
+
PGK
K
0.01
+
PKR
Rs.
0.01
+
OMR
ر.ع.
0.01
+
CVE
$
0.01
+
SKK
Sk
0.01
+
SIT
0.01
+
YUM
дин.
0.01
+
GTQ
Q
0.01
+
diff --git a/openerp/addons/base/res/res_currency_view.xml b/openerp/addons/base/res/res_currency_view.xml
index 4349095e574..d9f726ab0cf 100644
--- a/openerp/addons/base/res/res_currency_view.xml
+++ b/openerp/addons/base/res/res_currency_view.xml
@@ -39,6 +39,7 @@
+
@@ -49,13 +50,10 @@
+
-
-
-
-