- [['.....' *(a['status']-1) ]] [[ setTag('font','font',{'color':'white'}) ]][[ a['status']==1 and (setTag('font','font',{'name':'Helvetica-bold'})) ]][[ a['name'] ]]
+
+ [[ a['status']==1 and (setTag('font','font',{'name':'Helvetica-bold'})) ]][[ a['name'] ]]
|
[[ a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'})) ]][[ '%.2f' % a['theo'] ]]
diff --git a/addons/account_budget/wizard/account_budget_crossovered_summary_report_view.xml b/addons/account_budget/wizard/account_budget_crossovered_summary_report_view.xml
index 44401a71978..4775bdffe0f 100644
--- a/addons/account_budget/wizard/account_budget_crossovered_summary_report_view.xml
+++ b/addons/account_budget/wizard/account_budget_crossovered_summary_report_view.xml
@@ -23,7 +23,7 @@
- Print Summary of Budgets
+ Print Summary
ir.actions.act_window
account.budget.crossvered.summary.report
form
@@ -31,10 +31,11 @@
new
+
- Print Summary of Budgets
+ Print Summary
client_print_multi
action
diff --git a/addons/account_budget/wizard/account_budget_report.py b/addons/account_budget/wizard/account_budget_report.py
index 9fe2e0c5977..58ba9ad8191 100644
--- a/addons/account_budget/wizard/account_budget_report.py
+++ b/addons/account_budget/wizard/account_budget_report.py
@@ -18,6 +18,7 @@
# along with this program. If not, see .
#
##############################################################################
+
import time
from osv import fields, osv
@@ -50,13 +51,12 @@ class account_budget_report(osv.osv_memory):
data_model = self.pool.get(datas['model']).browse(cr, uid, context['active_id'])
if not data_model.dotation_ids:
raise osv.except_osv(_('Insufficient Data!'),_('No Depreciation or Master Budget Expenses Found on Budget %s!') % data_model.name)
-
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.budget',
'datas': datas,
}
+
account_budget_report()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/account_payment/account_payment.py b/addons/account_payment/account_payment.py
index a27a2d2e72d..b36dc0be306 100644
--- a/addons/account_payment/account_payment.py
+++ b/addons/account_payment/account_payment.py
@@ -90,7 +90,7 @@ class payment_order(osv.osv):
return res
_columns = {
- 'date_planned': fields.date('Scheduled date if fixed', states={'done':[('readonly',True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'),
+ 'date_scheduled': fields.date('Scheduled date if fixed', states={'done':[('readonly',True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'),
'reference': fields.char('Reference', size=128, required=1, states={'done':[('readonly',True)]}),
'mode': fields.many2one('payment.mode','Payment mode', select=True, required=1, states={'done':[('readonly',True)]}, help='Select the Payment Mode to be applied.'),
'state': fields.selection([
@@ -107,7 +107,7 @@ class payment_order(osv.osv):
('now', 'Directly'),
('due', 'Due date'),
('fixed', 'Fixed date')
- ], "Preferred date", change_default=True, required=True, states={'done':[('readonly',True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."),
+ ], "Preferred date", change_default=True, required=True, states={'done':[('readonly', True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."),
'date_created': fields.date('Creation date', readonly=True),
'date_done': fields.date('Execution date', readonly=True),
}
@@ -141,6 +141,14 @@ class payment_order(osv.osv):
wf_service.trg_validate(uid, 'payment.order', id, 'done', cr)
return True
+ def copy(self, cr, uid, id, default={}, context=None):
+ default.update({
+ 'state':'draft',
+ 'line_ids': [],
+ 'reference': self.pool.get('ir.sequence').get(cr, uid, 'payment.order')
+ })
+ return super(payment_order, self).copy(cr, uid, id, default, context=context)
+
payment_order()
class payment_line(osv.osv):
@@ -252,7 +260,7 @@ class payment_line(osv.osv):
res = {}
for line in self.browse(cursor, user, ids, context=context):
if line.order_id.date_prefered == 'fixed':
- res[line.id] = line.order_id.date_planned
+ res[line.id] = line.order_id.date_scheduled
elif line.order_id.date_prefered == 'due':
res[line.id] = line.due_date or time.strftime('%Y-%m-%d')
else:
@@ -317,7 +325,8 @@ class payment_line(osv.osv):
'info_partner': fields.function(info_partner, string="Destination Account", method=True, type="text", help='Address of the Ordering Customer.'),
'date': fields.date('Payment Date', help="If no payment date is specified, the bank will treat this payment line directly"),
'create_date': fields.datetime('Created' , readonly=True),
- 'state': fields.selection([('normal','Free'), ('structured','Structured')], 'Communication Type', required=True)
+ 'state': fields.selection([('normal','Free'), ('structured','Structured')], 'Communication Type', required=True),
+ 'bank_statement_line_id': fields.many2one('account.bank.statement.line', 'Bank statement line')
}
_defaults = {
'name': lambda obj, cursor, user, context: obj.pool.get('ir.sequence'
@@ -330,7 +339,7 @@ class payment_line(osv.osv):
('name_uniq', 'UNIQUE(name)', 'The payment line name must be unique!'),
]
- def onchange_move_line(self, cr, uid, ids, move_line_id, payment_type, date_prefered, date_planned, currency=False, company_currency=False, context=None):
+ def onchange_move_line(self, cr, uid, ids, move_line_id, payment_type, date_prefered, date_scheduled, currency=False, company_currency=False, context=None):
data={}
data['amount_currency']=data['communication']=data['partner_id']=data['reference']=data['date_created']=data['bank_id']=data['amount']=False
@@ -365,7 +374,7 @@ class payment_line(osv.osv):
elif date_prefered == 'due':
data['date'] = line.date_maturity
elif date_prefered == 'fixed':
- data['date'] = date_planned
+ data['date'] = date_scheduled
return {'value': data}
diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml
index 4fe86cf44c6..e6d6e832ae2 100644
--- a/addons/account_payment/account_payment_view.xml
+++ b/addons/account_payment/account_payment_view.xml
@@ -109,14 +109,14 @@
-
+
+
+ payment.order.tree.search
+ payment.order
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Payment Orders
payment.order
form
tree,form
+
+
-
- Draft Payment Order
- payment.order
- form
- tree,form
- [('state','=','draft')]
-
-
-
-
- Payment Orders to Approve
- payment.order
- form
- tree,form
- [('state','=','open')]
-
-
New Payment Order
payment.order
@@ -301,9 +314,9 @@
form
-
-
-
+
+
+
diff --git a/addons/account_payment/i18n/account_payment.pot b/addons/account_payment/i18n/account_payment.pot
index 35376e770af..8c99499e5d9 100644
--- a/addons/account_payment/i18n/account_payment.pot
+++ b/addons/account_payment/i18n/account_payment.pot
@@ -16,7 +16,7 @@ msgstr ""
"Plural-Forms: \n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -166,7 +166,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/ar.po b/addons/account_payment/i18n/ar.po
index 0bbb577bafc..02ce6504dad 100644
--- a/addons/account_payment/i18n/ar.po
+++ b/addons/account_payment/i18n/ar.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/bg.po b/addons/account_payment/i18n/bg.po
index 3efda3ce450..9dbda1f16e2 100644
--- a/addons/account_payment/i18n/bg.po
+++ b/addons/account_payment/i18n/bg.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Планирана дата ако е определена"
@@ -172,7 +172,7 @@ msgid "Payment lines"
msgstr "Редове от плащане"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "Избор на дата ако искате да има зададена предпочитана дата"
diff --git a/addons/account_payment/i18n/bs.po b/addons/account_payment/i18n/bs.po
index 0dc31e7a75f..68001a226b9 100644
--- a/addons/account_payment/i18n/bs.po
+++ b/addons/account_payment/i18n/bs.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Zakazani datum ako je fiskno"
@@ -174,7 +174,7 @@ msgid "Payment lines"
msgstr "Linije plaćanja"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "Odaberite datum ako ste odabrali fiksni poželjni datum"
diff --git a/addons/account_payment/i18n/ca.po b/addons/account_payment/i18n/ca.po
index 8968ee373ef..0813a1573ea 100644
--- a/addons/account_payment/i18n/ca.po
+++ b/addons/account_payment/i18n/ca.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Data planificada si fixa"
@@ -174,7 +174,7 @@ msgid "Payment lines"
msgstr "Línies de pagament"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
"Seleccioneu una data si heu seleccionat que la data preferida sigui fixa."
diff --git a/addons/account_payment/i18n/cs.po b/addons/account_payment/i18n/cs.po
index dc873b6d817..8eaccebcfd1 100644
--- a/addons/account_payment/i18n/cs.po
+++ b/addons/account_payment/i18n/cs.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/de.po b/addons/account_payment/i18n/de.po
index d4300e1d944..212d27f150e 100644
--- a/addons/account_payment/i18n/de.po
+++ b/addons/account_payment/i18n/de.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Terminierung bei Auswahl 'festes Datum'"
@@ -173,7 +173,7 @@ msgid "Payment lines"
msgstr "Zahlungsvorschlag Positionen"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "Wähle ein Datum wenn Ihre Auswahl 'festes Datum' sein soll."
diff --git a/addons/account_payment/i18n/el.po b/addons/account_payment/i18n/el.po
index 485677bd368..8b96dbb8347 100644
--- a/addons/account_payment/i18n/el.po
+++ b/addons/account_payment/i18n/el.po
@@ -18,7 +18,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Προγραμματισμένη ημερομηνία εάν είναι καθορισμένο"
@@ -175,7 +175,7 @@ msgid "Payment lines"
msgstr "Γραμμές Πληρωμής"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
"Επιλέξτε μιά ημερομηνία εάν έχετε επιλέξει προτιμώμενη ημερομηνία ως "
diff --git a/addons/account_payment/i18n/es.po b/addons/account_payment/i18n/es.po
index 27c523068c2..ad5017945a7 100644
--- a/addons/account_payment/i18n/es.po
+++ b/addons/account_payment/i18n/es.po
@@ -18,7 +18,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Fecha planificada si es fija"
@@ -175,7 +175,7 @@ msgid "Payment lines"
msgstr "Líneas de pago"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
"Seleccione una fecha si ha seleccionado que la fecha preferida sea fija."
diff --git a/addons/account_payment/i18n/es_AR.po b/addons/account_payment/i18n/es_AR.po
index a8741e3d0e5..ee7c56ad734 100644
--- a/addons/account_payment/i18n/es_AR.po
+++ b/addons/account_payment/i18n/es_AR.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Fecha planificada si fija"
@@ -174,7 +174,7 @@ msgid "Payment lines"
msgstr "Líneas de pago"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "Seleccione una fecha si ha elegido que la fecha preferida sea fija."
diff --git a/addons/account_payment/i18n/et.po b/addons/account_payment/i18n/et.po
index b5d07c8219e..5ceb3f3f8a3 100644
--- a/addons/account_payment/i18n/et.po
+++ b/addons/account_payment/i18n/et.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Planeeritud kuupäev kui fikseeritud"
@@ -173,7 +173,7 @@ msgid "Payment lines"
msgstr "Makseread"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "Vali kuupäev, kui sa oled valinud 'Eelistatud kuupäev fikseerida'."
diff --git a/addons/account_payment/i18n/fi.po b/addons/account_payment/i18n/fi.po
index 5b5c1542795..63f152886f4 100644
--- a/addons/account_payment/i18n/fi.po
+++ b/addons/account_payment/i18n/fi.po
@@ -18,7 +18,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Suunniteltu päivämäärä jos kiinteä"
@@ -175,7 +175,7 @@ msgid "Payment lines"
msgstr "Maksurivit"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
"Aseta päivämäärä jos olet valinnut suositellun maksupäivän kiinteäksi."
diff --git a/addons/account_payment/i18n/fr.po b/addons/account_payment/i18n/fr.po
index f1dd4c8002b..95f2a580291 100644
--- a/addons/account_payment/i18n/fr.po
+++ b/addons/account_payment/i18n/fr.po
@@ -40,7 +40,7 @@ msgstr ""
"spéciaux !"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Date prévue si fixe"
@@ -197,7 +197,7 @@ msgid "Payment lines"
msgstr "Lignes de paiement"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
"Sélectionnez une date si vous avez choisi \"Date fixe\" comme date préférée"
diff --git a/addons/account_payment/i18n/hi.po b/addons/account_payment/i18n/hi.po
index 8a58aefdeb4..b2bd37aad24 100644
--- a/addons/account_payment/i18n/hi.po
+++ b/addons/account_payment/i18n/hi.po
@@ -18,7 +18,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "अनुसूचित तिथि तो तय"
@@ -173,7 +173,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/hr.po b/addons/account_payment/i18n/hr.po
index cd514aad23d..6343fcbf3b8 100644
--- a/addons/account_payment/i18n/hr.po
+++ b/addons/account_payment/i18n/hr.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/hu.po b/addons/account_payment/i18n/hu.po
index 0bbb577bafc..02ce6504dad 100644
--- a/addons/account_payment/i18n/hu.po
+++ b/addons/account_payment/i18n/hu.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/id.po b/addons/account_payment/i18n/id.po
index b656ce2651f..8014337913a 100644
--- a/addons/account_payment/i18n/id.po
+++ b/addons/account_payment/i18n/id.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/it.po b/addons/account_payment/i18n/it.po
index aa5ade7faea..0f098139f1c 100644
--- a/addons/account_payment/i18n/it.po
+++ b/addons/account_payment/i18n/it.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -172,7 +172,7 @@ msgid "Payment lines"
msgstr "Riga pagamento"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/ko.po b/addons/account_payment/i18n/ko.po
index 536db1171cd..1727ce45a70 100644
--- a/addons/account_payment/i18n/ko.po
+++ b/addons/account_payment/i18n/ko.po
@@ -18,7 +18,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "고정된 경우, 스케줄된 날짜"
@@ -171,7 +171,7 @@ msgid "Payment lines"
msgstr "결제 라인"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "'선호 날짜'를 지정하려면, 날짜를 선택하십시오."
diff --git a/addons/account_payment/i18n/lt.po b/addons/account_payment/i18n/lt.po
index 89eb96041ba..92ea164eb4e 100644
--- a/addons/account_payment/i18n/lt.po
+++ b/addons/account_payment/i18n/lt.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/mn.po b/addons/account_payment/i18n/mn.po
index fd4b080ae95..5687b5af0b3 100644
--- a/addons/account_payment/i18n/mn.po
+++ b/addons/account_payment/i18n/mn.po
@@ -18,7 +18,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Төлөвлөсөн огноо"
@@ -174,7 +174,7 @@ msgid "Payment lines"
msgstr "Төлбөрийн мөрүүд"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "Сонгох огноо тогтмол байх бол огноог заана."
diff --git a/addons/account_payment/i18n/nl.po b/addons/account_payment/i18n/nl.po
index c40752000b1..516492ac565 100644
--- a/addons/account_payment/i18n/nl.po
+++ b/addons/account_payment/i18n/nl.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Geplande datum indien vast"
@@ -174,7 +174,7 @@ msgid "Payment lines"
msgstr "Betalingsregels"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
"Kies een datum wanneer u hebt gekozen om op een voorkeursdatum uit te voeren."
diff --git a/addons/account_payment/i18n/nl_BE.po b/addons/account_payment/i18n/nl_BE.po
index 9695e322250..d0844e937b4 100644
--- a/addons/account_payment/i18n/nl_BE.po
+++ b/addons/account_payment/i18n/nl_BE.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/oc.po b/addons/account_payment/i18n/oc.po
index 9111223a710..5da4eb7edc2 100644
--- a/addons/account_payment/i18n/oc.po
+++ b/addons/account_payment/i18n/oc.po
@@ -18,7 +18,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -171,7 +171,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/pl.po b/addons/account_payment/i18n/pl.po
index 81f6257956a..280341a73a5 100644
--- a/addons/account_payment/i18n/pl.po
+++ b/addons/account_payment/i18n/pl.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Planowana data jeśli jest ustalona"
@@ -174,7 +174,7 @@ msgid "Payment lines"
msgstr "Pozycje płatności"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "Wybierz datę, jeśli wybrałaś(eś) opcję Preferowana data."
diff --git a/addons/account_payment/i18n/pt.po b/addons/account_payment/i18n/pt.po
index f5409e13ce7..d9df5c72754 100644
--- a/addons/account_payment/i18n/pt.po
+++ b/addons/account_payment/i18n/pt.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Data agendada se fixa"
@@ -174,7 +174,7 @@ msgid "Payment lines"
msgstr "Linhas de pagamentos"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "Selecione a data se você escolheu uma data preferida a ser reparada."
diff --git a/addons/account_payment/i18n/pt_BR.po b/addons/account_payment/i18n/pt_BR.po
index 9b119244867..4ae99673a5a 100644
--- a/addons/account_payment/i18n/pt_BR.po
+++ b/addons/account_payment/i18n/pt_BR.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Data programada se alterada"
@@ -174,7 +174,7 @@ msgid "Payment lines"
msgstr "Linhas de pagamento"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "Selecione uma data se você escolheu uma Data Preferida a ser fixada."
diff --git a/addons/account_payment/i18n/ro.po b/addons/account_payment/i18n/ro.po
index b2d91379109..57809e07959 100644
--- a/addons/account_payment/i18n/ro.po
+++ b/addons/account_payment/i18n/ro.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Data programată, dacă este stabilită"
@@ -174,7 +174,7 @@ msgid "Payment lines"
msgstr "Linii plată"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "Selectează o dată dacă ai ales să programezi plată"
diff --git a/addons/account_payment/i18n/ru.po b/addons/account_payment/i18n/ru.po
index 3341ffbffd4..bba8c696ea0 100644
--- a/addons/account_payment/i18n/ru.po
+++ b/addons/account_payment/i18n/ru.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "Дата по плану, если задана"
@@ -172,7 +172,7 @@ msgid "Payment lines"
msgstr "Позиции платежа"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/sl.po b/addons/account_payment/i18n/sl.po
index 0de9e393073..4a079ac01de 100644
--- a/addons/account_payment/i18n/sl.po
+++ b/addons/account_payment/i18n/sl.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -174,7 +174,7 @@ msgid "Payment lines"
msgstr "Vrstice plačila"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/sq.po b/addons/account_payment/i18n/sq.po
index 360305518fc..30967f82792 100644
--- a/addons/account_payment/i18n/sq.po
+++ b/addons/account_payment/i18n/sq.po
@@ -18,7 +18,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -171,7 +171,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/sv.po b/addons/account_payment/i18n/sv.po
index e033cc0ad49..df09d19e19d 100644
--- a/addons/account_payment/i18n/sv.po
+++ b/addons/account_payment/i18n/sv.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/tlh.po b/addons/account_payment/i18n/tlh.po
index 66b5bb9c31a..34abf27990f 100644
--- a/addons/account_payment/i18n/tlh.po
+++ b/addons/account_payment/i18n/tlh.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/tr.po b/addons/account_payment/i18n/tr.po
index 2d50a2be0ad..b16e2be9616 100644
--- a/addons/account_payment/i18n/tr.po
+++ b/addons/account_payment/i18n/tr.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/uk.po b/addons/account_payment/i18n/uk.po
index 9f75b050edf..d6d5097abaf 100644
--- a/addons/account_payment/i18n/uk.po
+++ b/addons/account_payment/i18n/uk.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/vi.po b/addons/account_payment/i18n/vi.po
index 565529f1ad5..8398e08c8e6 100644
--- a/addons/account_payment/i18n/vi.po
+++ b/addons/account_payment/i18n/vi.po
@@ -18,7 +18,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -171,7 +171,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/i18n/zh_CN.po b/addons/account_payment/i18n/zh_CN.po
index a7e26e82f1a..51c8c6ccca4 100644
--- a/addons/account_payment/i18n/zh_CN.po
+++ b/addons/account_payment/i18n/zh_CN.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr "指定日期(如果是固定)"
@@ -172,7 +172,7 @@ msgid "Payment lines"
msgstr "付款明细"
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr "如果你选择的优先日期是固定的, 选择一个日期"
diff --git a/addons/account_payment/i18n/zh_TW.po b/addons/account_payment/i18n/zh_TW.po
index 288950d8a9c..70d5a328d8c 100644
--- a/addons/account_payment/i18n/zh_TW.po
+++ b/addons/account_payment/i18n/zh_TW.po
@@ -17,7 +17,7 @@ msgstr ""
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-#: field:payment.order,date_planned:0
+#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
@@ -170,7 +170,7 @@ msgid "Payment lines"
msgstr ""
#. module: account_payment
-#: help:payment.order,date_planned:0
+#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
diff --git a/addons/account_payment/report/order.rml b/addons/account_payment/report/order.rml
index e62b07b13fe..12a125fa32b 100644
--- a/addons/account_payment/report/order.rml
+++ b/addons/account_payment/report/order.rml
@@ -141,7 +141,7 @@
Used Account
|
- [[ o.mode.bank_id.name or '-' ]]
+ [[ get_account_name(o.mode.bank_id.id) ]]
|
@@ -223,7 +223,7 @@
[[line.partner_id and line.partner_id.name or '-' ]]
- [[ line.bank_id and line.bank_id.name or '-' ]]
+ [[ get_account_name(line.bank_id.id) or '-']]
|
[[ get_invoice_name(line.ml_inv_ref.id) or '-' ]]
diff --git a/addons/account_payment/report/payment_order.py b/addons/account_payment/report/payment_order.py
index a3c102b6897..e82bae991df 100644
--- a/addons/account_payment/report/payment_order.py
+++ b/addons/account_payment/report/payment_order.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
@@ -25,7 +25,7 @@ import pooler
from report import report_sxw
class payment_order(report_sxw.rml_parse):
-
+
def __init__(self, cr, uid, name, context):
super(payment_order, self).__init__(cr, uid, name, context=context)
self.localcontext.update( {
@@ -34,17 +34,18 @@ class payment_order(report_sxw.rml_parse):
'get_company_currency' : self._get_company_currency,
'get_amount_total_in_currency' : self._get_amount_total_in_currency,
'get_amount_total' : self._get_amount_total,
+ 'get_account_name' : self._get_account_name,
})
- def _get_invoice_name(self,invoice_id):
+ def _get_invoice_name(self, invoice_id):
if invoice_id:
pool = pooler.get_pool(self.cr.dbname)
value_name = pool.get('account.invoice').name_get(self.cr, self.uid, [invoice_id])
if value_name:
return value_name[0][1]
return False
-
- def _get_amount_total_in_currency(self,payment):
+
+ def _get_amount_total_in_currency(self, payment):
total = 0.0
if payment.line_ids:
currency_cmp = payment.line_ids[0].currency.id
@@ -57,19 +58,27 @@ class payment_order(report_sxw.rml_parse):
return False
return total
- def _get_amount_total(self,payment):
+ def _get_amount_total(self, payment):
total = 0.0
if not payment.line_ids:
return False
for line in payment.line_ids:
total += line.amount
return total
-
+
def _get_company_currency(self):
pool = pooler.get_pool(self.cr.dbname)
user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
- return user.company_id and user.company_id.currency_id and user.company_id.currency_id.name or False
+ return user.company_id and user.company_id.currency_id and user.company_id.currency_id.name or False
+
+ def _get_account_name(self,bank_id):
+ if bank_id:
+ pool = pooler.get_pool(self.cr.dbname)
+ value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id])
+ if value_name:
+ return value_name[0][1]
+ return False
-report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order,header=False)
+report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order, header="internal")
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py
index 74409cab3fa..696160c35ef 100644
--- a/addons/account_payment/wizard/account_payment_order.py
+++ b/addons/account_payment/wizard/account_payment_order.py
@@ -77,7 +77,7 @@ class payment_order_create(osv.osv_memory):
elif payment.date_prefered == 'due':
date_to_pay = line.date_maturity
elif payment.date_prefered == 'fixed':
- date_to_pay = payment.date_planned
+ date_to_pay = payment.date_scheduled
payment_obj.create(cr, uid,{
'move_line_id': line.id,
'amount_currency': line.amount_to_pay,
diff --git a/addons/account_payment/wizard/account_payment_populate_statement.py b/addons/account_payment/wizard/account_payment_populate_statement.py
index 381f0d0f8f7..38d742119ad 100644
--- a/addons/account_payment/wizard/account_payment_populate_statement.py
+++ b/addons/account_payment/wizard/account_payment_populate_statement.py
@@ -18,6 +18,7 @@
# along with this program. If not, see .
#
##############################################################################
+
from lxml import etree
from osv import osv, fields
@@ -29,43 +30,22 @@ class account_payment_populate_statement(osv.osv_memory):
'lines': fields.many2many('payment.line', 'payment_line_rel_', 'payment_id', 'line_id', 'Payment Lines')
}
- def search_entries(self, cr, uid, ids, context=None):
+ def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
line_obj = self.pool.get('payment.line')
- statement_obj = self.pool.get('account.bank.statement')
- mod_obj = self.pool.get('ir.model.data')
- data = self.read(cr, uid, ids, [], context=context)[0]
- statement = statement_obj.browse(cr, uid, context['active_id'], context=context)
+ res = super(account_payment_populate_statement, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
line_ids = line_obj.search(cr, uid, [
('move_line_id.reconcile_id', '=', False),
- ('order_id.mode.journal.id', '=', statement.journal_id.id)])
+ ('bank_statement_line_id', '=', False),])
line_ids.extend(line_obj.search(cr, uid, [
('move_line_id.reconcile_id', '=', False),
('order_id.mode', '=', False)]))
-
- context.update({'line_ids': line_ids})
- model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','account_payment_populate_statement_view')], context=context)
- resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
- return {
- 'name': ('Entrie Lines'),
- 'context': context,
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'account.payment.populate.statement',
- 'views': [(resource_id,'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
-
- def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
- res = super(account_payment_populate_statement, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
- if context and 'line_ids' in context:
- view_obj = etree.XML(res['arch'])
- child = view_obj.getchildren()[0]
- domain = '[("id", "in", '+ str(context['line_ids'])+')]'
- field = etree.Element('field', attrib={'domain': domain, 'name':'lines', 'colspan':'4', 'height':'300', 'width':'800', 'nolabel':"1"})
- child.addprevious(field)
- res['arch'] = etree.tostring(view_obj)
+ domain = '[("id", "in", '+ str(line_ids)+')]'
+ doc = etree.XML(res['arch'])
+ nodes = doc.xpath("//field[@name='lines']")
+ for node in nodes:
+ node.set('domain', domain)
+ res['arch'] = etree.tostring(doc)
return res
def populate_statement(self, cr, uid, ids, context=None):
@@ -93,7 +73,7 @@ class account_payment_populate_statement(osv.osv_memory):
reconcile_id = statement_reconcile_obj.create(cr, uid, {
'line_ids': [(6, 0, [line.move_line_id.id])]
}, context=context)
- statement_line_obj.create(cr, uid, {
+ st_line_id = statement_line_obj.create(cr, uid, {
'name': line.order_id.reference or '?',
'amount': - amount,
'type': 'supplier',
@@ -103,6 +83,9 @@ class account_payment_populate_statement(osv.osv_memory):
'ref': line.communication,
'reconcile_id': reconcile_id,
}, context=context)
- return {'type' : 'ir.actions.act_window_close'}
+ line_obj.write(cr, uid, [line.id], {'bank_statement_line_id': st_line_id})
+ return {'type': 'ir.actions.act_window_close'}
account_payment_populate_statement()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/account_payment/wizard/account_payment_populate_statement_view.xml b/addons/account_payment/wizard/account_payment_populate_statement_view.xml
index 34cf906bec3..55a2158fa7d 100644
--- a/addons/account_payment/wizard/account_payment_populate_statement_view.xml
+++ b/addons/account_payment/wizard/account_payment_populate_statement_view.xml
@@ -2,21 +2,21 @@
-
+
Payment Populate statement
account.payment.populate.statement
form
-
+
-
+
Payment Populate statement
@@ -24,26 +24,11 @@
ir.actions.act_window
form
tree,form
-
+
{'record_id':active_id}
new
-
- Payment Populate statement
- account.payment.populate.statement
- form
-
-
-
-
-
Payment Populate statement
account.payment.populate.statement
diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py
index d02011de47e..7cdd9ded9f2 100644
--- a/addons/account_voucher/__openerp__.py
+++ b/addons/account_voucher/__openerp__.py
@@ -44,12 +44,14 @@
"wizard/account_voucher_open_view.xml",
"wizard/account_voucher_unreconcile_view.xml",
"voucher_view.xml",
- "voucher_sales_purchase_view.xml",
"voucher_payment_receipt_view.xml",
+ "voucher_sales_purchase_view.xml",
"voucher_wizard.xml",
],
"test" : [
# "test/account_voucher.yml",
+ "test/sales_receipt.yml",
+ "test/sales_payment.yml",
],
'certificate': '0037580727101',
diff --git a/addons/account_voucher/report/report_voucher.rml b/addons/account_voucher/report/report_voucher.rml
index 2a1b5bcd9a5..23cab480414 100755
--- a/addons/account_voucher/report/report_voucher.rml
+++ b/addons/account_voucher/report/report_voucher.rml
@@ -249,7 +249,7 @@
|
- [[ move_ids.name ]] - [[ get_ref(voucher.id,move_ids) ]]
+ [[ move_ids.name ]] - [[ voucher.reference ]]
|
diff --git a/addons/account_voucher/test/sales_payment.yml b/addons/account_voucher/test/sales_payment.yml
new file mode 100644
index 00000000000..050eec1d014
--- /dev/null
+++ b/addons/account_voucher/test/sales_payment.yml
@@ -0,0 +1,87 @@
+-
+ In order to test account voucher i will create an invoice and pay it through account voucher.
+-
+ I create a new Partner
+-
+ !record {model: res.partner, id: res_partner_micropc0}:
+ address:
+ - country_id: base.be
+ name: Jenifer
+ street: 69 rue de Chimay
+ type: default
+ zip: '5478'
+ category_id:
+ - base.res_partner_category_8
+ credit_limit: 0.0
+ name: Micro PC
+ property_account_payable: account.a_pay
+ property_account_receivable: account.a_recv
+
+-
+ Creat an invoice for the partner
+-
+ !record {model: account.invoice, id: account_invoice_0}:
+ account_id: account.a_recv
+ address_contact_id: base.res_partner_address_7
+ address_invoice_id: base.res_partner_address_7
+ company_id: base.main_company
+ currency_id: base.EUR
+ invoice_line:
+ - account_id: account.a_sale
+ name: '[PC1] Basic PC'
+ price_unit: 450.0
+ quantity: 1.0
+ product_id: product.product_product_pc1
+ uos_id: product.product_uom_unit
+ journal_id: account.sales_journal
+ partner_id: res_partner_micropc0
+
+-
+ I check that the customer invoice is in draft state
+-
+ !assert {model: account.invoice, id: account_invoice_0}:
+ - state == 'draft'
+
+-
+ I make the invoice in Open state
+-
+ !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_0}
+
+-
+ I check that a payment entry gets created in the account.move.line
+-
+ !python {model: account.invoice}: |
+ acc_id=self.browse(cr, uid, ref("account_invoice_0"))
+ assert(acc_id.move_id)
+
+-
+ I will create and post an account voucher for the partner.
+-
+ !python {model: account.voucher}: |
+ import netsvc
+ vals = {}
+ journal_id = self.default_get(cr, uid, ['journal_id']).get('journal_id',None)
+ res = self.onchange_partner_id(cr, uid, [], ref("res_partner_micropc0"), journal_id, price=0.0, ttype='receipt')
+ vals = {
+ 'account_id': ref('account.cash'),
+ 'amount': 450.0,
+ 'company_id': ref('base.main_company'),
+ 'currency_id': ref('base.EUR'),
+ 'journal_id': ref('account.bank_journal'),
+ 'partner_id': ref('res_partner_micropc0'),
+ 'period_id': ref('account.period_8'),
+ 'type': 'receipt',
+ }
+ res['value']['line_cr_ids'][0]['amount'] = 450.0
+ vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']]
+ id = self.create(cr, uid, vals)
+ voucher_id = self.browse(cr, uid, id)
+ assert (voucher_id.state=='draft'), "Voucher is not in draft state"
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'account.voucher', voucher_id.id, 'proforma_voucher', cr)
+
+-
+ Finally i will Confirm the state of the invoice is paid
+-
+ !assert {model: account.invoice, id: account_invoice_0}:
+ - state == 'paid'
diff --git a/addons/account_voucher/test/sales_receipt.yml b/addons/account_voucher/test/sales_receipt.yml
new file mode 100644
index 00000000000..70539f5061f
--- /dev/null
+++ b/addons/account_voucher/test/sales_receipt.yml
@@ -0,0 +1,74 @@
+
+-
+ In order to test sales receipt i will create a sale receipt and pay it through sales payment
+-
+ First of all I create a voucher
+-
+ !record {model: account.voucher, id: account_voucher_chinaexport_0}:
+ account_id: account.a_recv
+ amount: 30000.0
+ company_id: base.main_company
+ journal_id: account.sales_journal
+ line_cr_ids:
+ - account_id: account.a_sale
+ amount: 30000.0
+ partner_id: base.res_partner_3
+ period_id: account.period_8
+ tax_amount: 0.0
+ type: sale
+
+-
+ I check that the voucher state is Draft
+-
+ !assert {model: account.voucher, id: account_voucher_chinaexport_0}:
+ - state == 'draft'
+
+-
+ I clicked on post button to post the voucher
+-
+ !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_chinaexport_0}
+
+-
+ Check the voucher state is Posted
+-
+ !assert {model: account.voucher, id: account_voucher_chinaexport_0}:
+ - state == 'posted'
+
+-
+ I create a voucher record for the same partner
+-
+ !record {model: account.voucher, id: account_voucher_chinaexport_1}:
+ account_id: account.cash
+ amount: 30000.0
+ company_id: base.main_company
+ currency_id: base.EUR
+ journal_id: account.bank_journal
+ line_cr_ids:
+ - account_id: account.a_recv
+ amount: 0.0
+ name: 2010/003
+ type: cr
+ - account_id: account.a_recv
+ amount: 30000.0
+ name: 2010/003
+ type: cr
+ partner_id: base.res_partner_3
+ period_id: account.period_8
+ type: receipt
+
+-
+ Check the voucher state is draft
+-
+ !assert {model: account.voucher, id: account_voucher_chinaexport_1}:
+ - state == 'draft'
+
+-
+ I clicked on Post button to post the voucher
+-
+ !workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_chinaexport_1}
+
+-
+ Check the voucher state is Posted
+-
+ !assert {model: account.voucher, id: account_voucher_chinaexport_1}:
+ - state == 'posted'
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index 4cc44433ff8..c1ce3d4e690 100644
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -78,7 +78,10 @@ class account_voucher(osv.osv):
if user.company_id:
return user.company_id.currency_id.id
return False
-
+
+ def _get_partner(self, cr, uid, context={}):
+ return context.get('partner_id', False)
+
_name = 'account.voucher'
_description = 'Accounting Voucher'
_order = "date desc, id desc"
@@ -89,7 +92,7 @@ class account_voucher(osv.osv):
('purchase','Purchase'),
('payment','Payment'),
('receipt','Receipt'),
- ],'Type'),
+ ],'Default Type', readonly=True, states={'draft':[('readonly',False)]}),
'name':fields.char('Memo', size=256, readonly=True, states={'draft':[('readonly',False)]}),
'date':fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"),
'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
@@ -101,7 +104,7 @@ class account_voucher(osv.osv):
'line_dr_ids':fields.one2many('account.voucher.line','voucher_id','Debits',
domain=[('type','=','dr')], context={'default_type':'dr'}, readonly=True, states={'draft':[('readonly',False)]}),
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'draft':[('readonly',False)]}),
- 'narration':fields.text('Narration', readonly=True, states={'draft':[('readonly',False)]}),
+ 'narration':fields.text('Notes', readonly=True, states={'draft':[('readonly',False)]}),
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True),
'state':fields.selection(
@@ -116,11 +119,11 @@ class account_voucher(osv.osv):
\n* The \'Cancelled\' state is used when user cancel voucher.'),
'amount': fields.float('Total', digits=(16, 2), required=True, readonly=True, states={'draft':[('readonly',False)]}),
'tax_amount':fields.float('Tax Amount', digits=(14,2), readonly=True, states={'draft':[('readonly',False)]}),
- 'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Payment or Receipt transaction number, i.e. Bank cheque number or payorder number or Wire transfer number or Acknowledge number."),
+ 'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction referance number."),
'number': fields.related('move_id', 'name', type="char", readonly=True, string='Number'),
'move_id':fields.many2one('account.move', 'Account Entry'),
'move_ids': fields.related('move_id','line_id', type='many2many', relation='account.move.line', string='Journal Items', readonly=True),
- 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True, states={'draft':[('readonly',False)]}),
+ 'partner_id':fields.many2one('res.partner', 'Partner', change_default=1, readonly=True, states={'draft':[('readonly',False)]}),
'audit': fields.related('move_id','to_check', type='boolean', relation='account.move', string='Audit Complete ?'),
'pay_now':fields.selection([
('pay_now','Pay Directly'),
@@ -133,6 +136,7 @@ class account_voucher(osv.osv):
}
_defaults = {
'period_id': _get_period,
+ 'partner_id': _get_partner,
'journal_id':_get_journal,
'currency_id': _get_currency,
'type':_get_type,
@@ -143,7 +147,52 @@ class account_voucher(osv.osv):
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher',context=c),
'tax_id': _get_tax,
}
-
+
+ def compute_tax(self, cr, uid, ids, context={}):
+ tax_pool = self.pool.get('account.tax')
+ partner_pool = self.pool.get('res.partner')
+ position_pool = self.pool.get('account.fiscal.position')
+ voucher_line_pool = self.pool.get('account.voucher.line')
+ voucher_pool = self.pool.get('account.voucher')
+
+ for voucher in voucher_pool.browse(cr, uid, ids, context):
+ voucher_amount = 0.0
+ for line in voucher.line_ids:
+ voucher_amount += line.untax_amount or line.amount
+ line.amount = line.untax_amount or line.amount
+ voucher_line_pool.write(cr, uid, [line.id], {'amount':line.amount, 'untax_amount':line.untax_amount})
+
+ if not voucher.tax_id:
+ continue
+
+ tax = [tax_pool.browse(cr, uid, voucher.tax_id.id)]
+ partner = partner_pool.browse(cr, uid, voucher.partner_id.id) or False
+ taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
+ tax = tax_pool.browse(cr, uid, taxes)
+
+ total = voucher_amount
+ total_tax = 0.0
+
+ if not tax[0].price_include:
+ for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_amount, 1).get('taxes'):
+ total_tax += tax_line.get('amount')
+ total += total_tax
+ else:
+ line_ids2 = []
+ for line in voucher.line_ids:
+ line_total = 0.0
+ line_tax = 0.0
+
+ for tax_line in tax_pool.compute_all(cr, uid, tax, line.untax_amount or line.amount, 1).get('taxes'):
+ line_tax += tax_line.get('amount')
+ line_total += tax_line.get('price_unit')
+ total_tax += line_tax
+ untax_amount = line.untax_amount or line.amount
+ voucher_line_pool.write(cr, uid, [line.id], {'amount':line_total, 'untax_amount':untax_amount})
+
+ self.write(cr, uid, [voucher.id], {'amount':total, 'tax_amount':total_tax})
+ return True
+
# TODO: review this code.
def onchange_price(self, cr, uid, ids, line_ids, tax_id, partner_id=False, context={}):
tax_pool = self.pool.get('account.tax')
@@ -162,45 +211,16 @@ class account_voucher(osv.osv):
total_tax = 0.0
for line in line_ids:
+ line_amount = 0.0
+ if line[1]:
+ line_amount = voucher_line_pool.browse(cr, uid, line[1]).untax_amount
+ else:
+ line_amount = line[2].get('amount')
voucher_line_ids += [line[1]]
- voucher_total += line[2].get('amount')
+ voucher_total += line_amount
total = voucher_total
- if tax_id:
- tax = [tax_pool.browse(cr, uid, tax_id)]
-
- if partner_id:
- partner = partner_pool.browse(cr, uid, partner_id) or False
- taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
- tax = tax_pool.browse(cr, uid, taxes)
-
- if not tax[0].price_include:
- for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_total, 1).get('taxes'):
- total_tax += tax_line.get('amount')
- total += total_tax
- else:
- line_ids2 = []
- for line in line_ids:
- line_total = 0.0
- line_tax = 0.0
- operation = line[0]
- rec_id = line[1]
- rec = line[2]
- for tax_line in tax_pool.compute_all(cr, uid, tax, rec.get('amount'), 1).get('taxes'):
- line_tax += tax_line.get('amount')
- line_total += tax_line.get('price_unit')
- total_tax += line_tax
- if rec_id:
- voucher_line_pool.write(cr, uid, [rec_id], {'amount':line_total})
- line_ids2 += [rec_id]
- else:
- rec.update({
- 'amount':line_total
- })
- res.update({
- 'line_ids':line_ids2
- })
res.update({
'amount':total,
'tax_amount':total_tax
@@ -281,6 +301,7 @@ class account_voucher(osv.osv):
account_type = 'receivable'
ids = move_line_pool.search(cr, uid, [('account_id.type','=', account_type), ('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context)
+ ids.reverse()
moves = move_line_pool.browse(cr, uid, ids)
total_credit = price or 0.0
total_debit = 0.0
@@ -319,7 +340,7 @@ class account_voucher(osv.osv):
default['value']['pre_line'] = 1
elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
default['value']['pre_line'] = 1
-
+
return default
def onchange_date(self, cr, user, ids, date, context={}):
@@ -401,7 +422,7 @@ class account_voucher(osv.osv):
terms = term_pool.compute(cr, uid, term_id, amount)
return terms
return False
-
+
move_pool = self.pool.get('account.move')
move_line_pool = self.pool.get('account.move.line')
analytic_pool = self.pool.get('account.analytic.line')
@@ -439,7 +460,12 @@ class account_voucher(osv.osv):
credit = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.amount)
elif inv.type in ('sale', 'receipt'):
debit = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.amount)
-
+ if debit < 0:
+ credit = -debit
+ debit = 0.0
+ if credit < 0:
+ debit = -credit
+ credit = 0.0
if inv.type == 'purchase' and inv.term_id and _get_payment_term_lines(inv.term_id.id, credit or debit):
terms = _get_payment_term_lines(inv.term_id.id, credit or debit)
for term in terms:
@@ -486,7 +512,16 @@ class account_voucher(osv.osv):
'move_id':move_id,
'partner_id':inv.partner_id.id,
'currency_id':inv.currency_id.id,
+ 'analytic_account_id':line.account_analytic_id and line.account_analytic_id.id or False,
+ 'quantity':1
}
+ if amount < 0:
+ amount = -amount
+ if line.type == 'dr':
+ line.type = 'cr'
+ else:
+ line.type = 'dr'
+
if (line.type=='dr'):
line_total += amount
move_line['debit'] = amount
@@ -499,7 +534,7 @@ class account_voucher(osv.osv):
rec_ids = [master_line, line.move_line_id.id]
rec_list_ids.append(rec_ids)
- if inv.tax_amount > 0:
+ if inv.tax_amount:
amount = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount)
name = inv.tax_id and inv.tax_id.name or '/'
move_line = {
@@ -510,11 +545,12 @@ class account_voucher(osv.osv):
'partner_id':inv.partner_id.id,
'currency_id':inv.currency_id.id,
}
-
- if inv.journal_id.type in ('sale','purchase_refund'):
+ if inv.journal_id.type in ('sale','purchase_refund') and amount > 0:
line_total -= amount
move_line['credit'] = amount
else:
+ if amount < 0:
+ amount = -amount
line_total += amount
move_line['debit'] = amount
@@ -563,7 +599,10 @@ class account_voucher(osv.osv):
default.update({
'state':'draft',
'number':False,
- 'move_id':False
+ 'move_id':False,
+ 'line_cr_ids':False,
+ 'line_dr_ids':False,
+ 'reference':False
})
if 'date' not in default:
default['date'] = time.strftime('%Y-%m-%d')
@@ -590,6 +629,7 @@ class account_voucher(osv.osv):
}
if view_type == 'form':
tview = voucher_type.get(context.get('type'))
+ tview = tview or 'view_voucher_form'
result = data_pool._get_id(cr, uid, 'account_voucher', tview)
view_id = data_pool.browse(cr, uid, result, context=context).res_id
@@ -606,6 +646,8 @@ account_voucher()
class account_voucher_line(osv.osv):
_name = 'account.voucher.line'
_description = 'Voucher Lines'
+ _order = "move_line_id"
+
def _compute_balance(self, cr, uid, ids, name, args, context=None):
res = {}
for line in self.browse(cr, uid, ids):
@@ -623,6 +665,7 @@ class account_voucher_line(osv.osv):
'name':fields.char('Description', size=256),
'account_id':fields.many2one('account.account','Account', required=True),
'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'),
+ 'untax_amount':fields.float('Untax Amount'),
'amount':fields.float('Amount'),
'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Cr/Dr'),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
@@ -683,13 +726,16 @@ class account_voucher_line(osv.osv):
return values
journal = journal_pool.browse(cr, user, journal_id)
account_id = False
+ ttype = 'cr'
if journal.type in ('sale', 'purchase_refund'):
account_id = journal.default_credit_account_id and journal.default_credit_account_id.id or False
elif journal.type in ('purchase', 'expense', 'sale_refund'):
account_id = journal.default_debit_account_id and journal.default_debit_account_id.id or False
+ ttype = 'dr'
elif partner_id:
partner = partner_pool.browse(cr, user, partner_id, context=context)
if context.get('type') == 'payment':
+ ttype = 'dr'
account_id = partner.property_account_payable.id
elif context.get('type') == 'receipt':
account_id = partner.property_account_receivable.id
@@ -698,6 +744,7 @@ class account_voucher_line(osv.osv):
raise osv.except_osv(_('Invalid Error !'), _('Please change partner and try again !'))
values.update({
'account_id':account_id,
+ 'type':ttype
})
return values
account_voucher_line()
diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml
index 4ffba531dc4..6f207f2b649 100644
--- a/addons/account_voucher/voucher_payment_receipt_view.xml
+++ b/addons/account_voucher/voucher_payment_receipt_view.xml
@@ -8,7 +8,7 @@
-
+
@@ -61,7 +64,7 @@
-
+
@@ -73,8 +76,8 @@
-
+
@@ -91,7 +94,7 @@
new
-
@@ -127,7 +130,7 @@
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
/>
-
+
@@ -138,7 +141,7 @@
-
+
@@ -155,7 +158,7 @@
-
+
@@ -167,8 +170,8 @@
-
+
@@ -185,7 +188,7 @@
new
-
diff --git a/addons/account_voucher/voucher_sales_purchase_view.xml b/addons/account_voucher/voucher_sales_purchase_view.xml
index 4ff3bdc9c5e..5b4ea813ee6 100644
--- a/addons/account_voucher/voucher_sales_purchase_view.xml
+++ b/addons/account_voucher/voucher_sales_purchase_view.xml
@@ -1,6 +1,16 @@
+
+
+ Sales Payment
+ account.voucher.open
+ form
+ [('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt'), ('partner_id','=',partner_id)]
+ {'journal_type':'bank', 'type':'receipt', 'partner_id': partner_id}
+
+ new
+
account.voucher.sale.form
account.voucher
@@ -9,7 +19,7 @@
-
-
-
+
+
+
-
+
@@ -60,8 +70,9 @@
-
+
+
@@ -74,13 +85,13 @@
Sales Receipt
account.voucher.open
form
- [('journal_id.type','=','sale'), ('type','=','sale')]
+ [('journal_id.type','in',['sale','purchase_refund']), ('type','=','sale')]
{'journal_type':'sale', 'type':'sale'}
new
+ action="action_sale_receipt" parent="account.menu_finance_receivables" sequence="10"/>
@@ -91,7 +102,7 @@
-
+
@@ -137,8 +150,8 @@
-
+
@@ -149,13 +162,13 @@
Vendor Bills
account.voucher.open
form
- [('journal_id.type','=','purchase'), ('type','=','purchase')]
+ [('journal_id.type','in',['purchase','sale_refund']), ('type','=','purchase')]
{'journal_type':'purchase', 'type':'purchase'}
new
+ action="action_purchase_receipt" parent="account.menu_finance_payables" sequence="10"/>
diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml
index b7d66e71eeb..a8b86f5877e 100644
--- a/addons/account_voucher/voucher_view.xml
+++ b/addons/account_voucher/voucher_view.xml
@@ -12,7 +12,7 @@
-
+
@@ -27,46 +27,37 @@
@@ -139,19 +131,16 @@
-
+
+
+
-
-
-
-
-
diff --git a/addons/account_voucher/wizard/account_voucher_open.py b/addons/account_voucher/wizard/account_voucher_open.py
index 3efffe04c67..5ba55bf9856 100644
--- a/addons/account_voucher/wizard/account_voucher_open.py
+++ b/addons/account_voucher/wizard/account_voucher_open.py
@@ -124,7 +124,7 @@ class account_voucher_open(osv.osv_memory):
period_id = self._get_period(cr, uid, context)
menu = self.pool.get('ir.ui.menu').browse(cr, uid, context.get('active_id'))
- name = menu.name
+ name = context.get('title', menu.name)
result = data_pool._get_id(cr, uid, 'account_voucher', 'view_voucher_filter_new')
res_id = data_pool.browse(cr, uid, result, context=context).res_id
@@ -136,7 +136,7 @@ class account_voucher_open(osv.osv_memory):
'view_mode': 'tree,graph,form',
'res_model': 'account.voucher',
'view_id': False,
- 'context': "{'journal_id': %d, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (journal_id, journal_id, period_id),
+ 'context': "{'journal_id': %d, 'search_default_journal_id':%d, 'search_default_period_id':%d, 'partner_id':%s}" % (journal_id, journal_id, period_id, context.get('partner_id',False)),
'type': 'ir.actions.act_window',
'search_view_id': res_id
}
diff --git a/addons/account_voucher/wizard/account_voucher_unreconcile.py b/addons/account_voucher/wizard/account_voucher_unreconcile.py
index fdb51bb6b91..30cda8958d5 100644
--- a/addons/account_voucher/wizard/account_voucher_unreconcile.py
+++ b/addons/account_voucher/wizard/account_voucher_unreconcile.py
@@ -49,12 +49,10 @@ class account_voucher_unreconcile(osv.osv_memory):
recs += [line.reconcile_id.id]
if line.reconcile_partial_id:
recs += [line.reconcile_partial_id.id]
-
#for rec in recs:
reconcile_pool.unlink(cr, uid, recs)
-
- if res.remove:
- voucher_pool.cancel_voucher(cr, uid, [context.get('active_id')], context)
+# if res.remove:
+ voucher_pool.cancel_voucher(cr, uid, [context.get('active_id')], context)
# wf_service = netsvc.LocalService("workflow")
# wf_service.trg_validate(uid, 'account.voucher', context.get('active_id'), 'cancel_voucher', cr)
diff --git a/addons/account_voucher/wizard/account_voucher_unreconcile_view.xml b/addons/account_voucher/wizard/account_voucher_unreconcile_view.xml
index 3f8dd9c4e32..138aaec586f 100644
--- a/addons/account_voucher/wizard/account_voucher_unreconcile_view.xml
+++ b/addons/account_voucher/wizard/account_voucher_unreconcile_view.xml
@@ -11,8 +11,6 @@
-
-
diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py
index e5dd9d52ce1..810d2d58e9b 100644
--- a/addons/analytic/analytic.py
+++ b/addons/analytic/analytic.py
@@ -346,7 +346,7 @@ class account_analytic_line(osv.osv):
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
}
- _order = 'date'
+ _order = 'date desc'
account_analytic_line()
diff --git a/addons/analytic/security/analytic_security.xml b/addons/analytic/security/analytic_security.xml
index a382380d962..8a9ebf573d5 100644
--- a/addons/analytic/security/analytic_security.xml
+++ b/addons/analytic/security/analytic_security.xml
@@ -7,5 +7,13 @@
[('company_id','=',user.company_id.id)]
+
+
+ Analytic Accounting / User
+
+
+ Analytic Accounting / Manager
+
+
diff --git a/addons/analytic/security/ir.model.access.csv b/addons/analytic/security/ir.model.access.csv
index 0343f29f43a..6c945ca9ea2 100644
--- a/addons/analytic/security/ir.model.access.csv
+++ b/addons/analytic/security/ir.model.access.csv
@@ -1 +1,5 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_account_analytic_account_manager","account.analytic.account manager","model_account_analytic_account","analytic.group_analytic_manager",1,1,1,1
+"access_account_analytic_line_manager","account.analytic.line manager","model_account_analytic_line","analytic.group_analytic_manager",1,1,1,1
+"access_account_analytic_account_user","account.analytic.account user","model_account_analytic_account","analytic.group_analytic_user",1,0,0,0
+"access_account_analytic_line_user","account.analytic.line user","model_account_analytic_line","analytic.group_analytic_user",1,0,0,0
\ No newline at end of file
diff --git a/addons/hr_timesheet/hr_timesheet_view.xml b/addons/hr_timesheet/hr_timesheet_view.xml
index d40d1b8733e..cbd0675208f 100644
--- a/addons/hr_timesheet/hr_timesheet_view.xml
+++ b/addons/hr_timesheet/hr_timesheet_view.xml
@@ -38,7 +38,7 @@
-
+
diff --git a/addons/l10n_ch/wizard/create_dta.py b/addons/l10n_ch/wizard/create_dta.py
index b9f4078def7..8bde159013a 100644
--- a/addons/l10n_ch/wizard/create_dta.py
+++ b/addons/l10n_ch/wizard/create_dta.py
@@ -468,8 +468,8 @@ def _create_dta(obj, cr, uid, data, context=None):
'for the partner: ' + pline.partner_id.name + '\n' \
'on line: ' + pline.name)
- if pline.order_id.date_planned:
- date_value = mx.DateTime.strptime(pline.order_id.date_planned, '%Y-%m-%d')
+ if pline.order_id.date_scheduled:
+ date_value = mx.DateTime.strptime(pline.order_id.date_scheduled, '%Y-%m-%d')
elif pline.date:
date_value = mx.DateTime.strptime(pline.date, '%Y-%m-%d')
else:
diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml
index ffc3332ab8c..ac842d7e018 100644
--- a/addons/project_issue_sheet/project_issue_sheet_view.xml
+++ b/addons/project_issue_sheet/project_issue_sheet_view.xml
@@ -9,7 +9,7 @@
-
+
|