Merge lp:~mikel-martin/c2c-rd-addons/6.1 into lp:c2c-rd-addons

Proposed by Ferdinand
Status: Needs review
Proposed branch: lp:~mikel-martin/c2c-rd-addons/6.1
Merge into: lp:c2c-rd-addons
Diff against target: 19816 lines (+12288/-2613) (has conflicts)
299 files modified
account_asset_austria/__init__.py (+25/-0)
account_asset_austria/__openerp__.py (+38/-0)
account_asset_austria/account_asset.py (+141/-0)
account_asset_austria/account_asset_view.xml (+31/-0)
account_cash_discount_61/account.py (+20/-9)
account_cash_register_webkit/report/account_cash_register_webkit.mako (+1/-0)
account_financial_report_chricar/report/account_balance.py (+1/-1)
account_financial_report_chricar/report/account_chart.py (+1/-1)
account_financial_report_chricar/report/account_move_line_record.py (+2/-2)
account_financial_report_chricar/report/general_ledger.py (+1/-1)
account_financial_report_chricar/report/general_ledger_landscape.py (+1/-1)
account_financial_report_chricar/report/invoice_list.py (+1/-1)
account_invoice_change_date/__init__.py (+25/-0)
account_invoice_change_date/__openerp__.py (+41/-0)
account_invoice_change_date/account_invoice.py (+104/-0)
account_invoice_change_date/account_invoice_view.xml (+108/-0)
account_invoice_change_date/i18n/account_invoice_change_date.pot (+84/-0)
account_invoice_change_date/i18n/de.po (+87/-0)
account_invoice_ebInterface/__init__.py (+35/-0)
account_invoice_ebInterface/__openerp__.py (+55/-0)
account_invoice_ebInterface/account_invoice.py (+71/-0)
account_invoice_ebInterface/ebInterfaceV4.0.xml (+77/-0)
account_invoice_ebInterface/installer.py (+51/-0)
account_invoice_ebInterface/installer_view.xml (+34/-0)
account_invoice_iban_qr_at/__init__.py (+33/-0)
account_invoice_iban_qr_at/__openerp__.py (+46/-0)
account_invoice_iban_qr_at/account_invoice.py (+107/-0)
account_invoice_iban_qr_at/account_qrcode_view.xml (+6/-0)
account_invoice_iban_qr_at/i18n/account_invoice_iban_qr_at.pot (+75/-0)
account_invoice_iban_qr_at/i18n/de.po (+77/-0)
account_invoice_reopen/account_invoice.py (+1/-1)
account_invoice_reopen/account_invoice_workflow.xml (+2/-0)
account_invoice_webkit/__openerp__.py (+3/-0)
account_invoice_webkit/account_invoice.py (+5/-2)
account_invoice_webkit/account_invoice_webkit_view.xml (+12/-0)
account_invoice_webkit/i18n/de.po (+24/-10)
account_invoice_webkit/report/account_invoice_webkit.mako (+87/-37)
account_payment_edifact/__init__.py (+0/-1)
account_payment_edifact/__openerp__.py (+1/-2)
account_payment_edifact/payment_mode.py (+0/-83)
account_payment_edifact/payment_mode_view.xml (+0/-16)
account_payment_edifact/payment_order.py (+9/-4)
account_payment_extension_chricar/__openerp__.py (+1/-1)
account_payment_extension_chricar/account_move_line.py (+3/-3)
account_payment_sepa/__openerp__.py (+5/-2)
account_payment_sepa/pain_001_001_02_austrian_002.xml (+18/-6)
account_payment_sepa/pain_001_001_03_austrian_001.xml (+16/-4)
account_payment_sepa/payment_order.py (+9/-5)
account_payment_sepa/wizard/generate_sepa_view.xml (+1/-11)
account_period_U30_at/U30.xml (+92/-0)
account_period_U30_at/__init__.py (+35/-0)
account_period_U30_at/__openerp__.py (+56/-0)
account_period_U30_at/account_period.py (+92/-0)
account_period_U30_at/installer.py (+51/-0)
account_period_U30_at/installer_view.xml (+34/-0)
account_reconcile_constraint/__init__.py (+24/-0)
account_reconcile_constraint/__openerp__.py (+41/-0)
account_reconcile_constraint/account_move_line.py (+61/-0)
analytic_user_function_project/hr_timesheet.py (+2/-2)
base_ordered/ordered.py (+6/-0)
base_partner_contact/partner.py (+21/-5)
base_vat_check/__init__.py (+25/-0)
base_vat_check/__openerp__.py (+40/-0)
base_vat_check/base_vat.py (+107/-0)
base_vat_check/base_vat_view.xml (+21/-0)
base_vat_check/i18n/base_vat_check.pot (+48/-0)
base_vat_check/i18n/de.po (+47/-0)
base_vat_check/installer.py (+50/-0)
base_vat_check/installer_view.xml (+34/-0)
c2c_account_payment_extension/__init__.py (+2/-0)
c2c_account_payment_extension/__openerp__.py (+8/-3)
c2c_account_payment_extension/payment_mode.py (+2/-2)
c2c_account_payment_extension/payment_order.py (+317/-0)
c2c_account_payment_extension/payment_order_view.xml (+20/-0)
c2c_account_payment_extension/payment_type.py (+56/-0)
c2c_account_payment_extension/payment_type_view.xml (+92/-0)
c2c_account_payment_extension/payment_view.xml (+391/-0)
c2c_account_payment_extension/security/ir.model.access.csv (+4/-0)
c2c_account_payment_extension/wizard/.directory (+5/-0)
c2c_account_payment_extension/wizard/account_payment_order.py (+50/-23)
c2c_account_tax_rounding/account.py (+1/-1)
c2c_austria_extension/__openerp__.py (+4/-4)
c2c_budget_chricar/__openerp__.py (+2/-2)
c2c_budget_chricar/__terp__.py (+1/-1)
c2c_budget_chricar/c2c_budget_item.py (+1/-1)
c2c_budget_chricar/c2c_budget_line.py (+1/-1)
c2c_budget_chricar/c2c_budget_view.xml (+5/-5)
c2c_budget_chricar/c2c_budget_wizard.xml (+5/-5)
c2c_budget_chricar/report/budget_by_period.py (+4/-4)
c2c_budget_chricar/report/budget_consolidation.py (+4/-4)
c2c_budget_chricar/report/budget_vs_reality.py (+4/-4)
c2c_budget_chricar/report/compare_versions.py (+4/-4)
c2c_budget_chricar/report/helper.py (+1/-1)
c2c_budget_chricar/report/report_c2c_budget_item.mako (+1/-0)
c2c_budget_report/__openerp__.py (+2/-2)
c2c_budget_report/c2c_budget_item.py (+1/-1)
c2c_budget_report/c2c_budget_sequence.py (+1/-0)
c2c_budget_report/report/report_c2c_budget_item.mako (+5/-1)
c2c_partner_address_label/partner.py (+9/-0)
c2c_partner_address_label/partner_view.xml (+8/-4)
c2c_partner_address_label/report/report_label_test.mako (+1/-0)
c2c_product_price_unit/account_invoice.py (+6/-0)
c2c_product_price_unit_anglosaxon/__init__.py (+26/-0)
c2c_product_price_unit_anglosaxon/__openerp__.py (+40/-0)
c2c_product_price_unit_anglosaxon/invoice.py (+187/-0)
c2c_project_timesheet/__openerp__.py (+3/-2)
c2c_project_timesheet/timesheet_task.py (+103/-7)
c2c_project_timesheet/timesheet_task_view.xml (+8/-4)
c2c_sequence_fy/__openerp__.py (+1/-0)
c2c_sequence_fy/account_move.py (+58/-0)
c2c_sequence_fy/ir_sequence.py (+4/-2)
c2c_sequence_fy/security/ir.model.access.csv (+3/-0)
c2c_stock_accounting/report/print_computed_product.mako (+210/-0)
c2c_stock_accounting/report/print_computed_product_col.mako (+1/-0)
c2c_stock_accounting/stock.py (+71/-8)
c2c_stock_accounting/stock_view.xml (+13/-0)
c2c_stock_negative/stock.py (+10/-3)
chricar_account_analytic/__openerp__.py (+1/-1)
chricar_account_analytic/account_analytic.py (+136/-102)
chricar_account_analytic/account_analytic_view.xml (+12/-3)
chricar_account_move_line_deloitte/account_move_line_deloitte.py (+24/-10)
chricar_account_move_line_deloitte/check_script.sql (+45/-0)
chricar_account_move_line_igel/account_move_line_igel.py (+15/-2)
chricar_account_move_line_igel/account_move_line_igel_view.xml (+1/-0)
chricar_account_period_sum/__openerp__.py (+17/-13)
chricar_account_period_sum/chricar_account.py (+31/-19)
chricar_account_period_sum/chricar_account_period_sum.py (+228/-137)
chricar_account_period_sum/chricar_account_period_sum_trg.py (+271/-480)
chricar_account_period_sum/report/report_account_account_tree_sum.mako (+1/-0)
chricar_account_period_sum/security/ir.model.access.csv (+1/-1)
chricar_bank_vat/bank_account_vat.py (+6/-5)
chricar_bank_vat/bank_account_vat_view.xml (+3/-3)
chricar_budget/__openerp__.py (+2/-1)
chricar_budget/budget.py (+95/-18)
chricar_budget/budget_view.xml (+6/-2)
chricar_budget/i18n/chricar_budget.pot (+326/-285)
chricar_budget/i18n/de.po (+344/-292)
chricar_budget_compare/__openerp__.py (+1/-1)
chricar_budget_compare/budget_update.xml (+2/-2)
chricar_budget_create/budget_view.xml (+1/-1)
chricar_budget_create/wizard/budget_create.py (+9/-1)
chricar_budget_create/wizard/budget_create_view.xml (+1/-0)
chricar_budget_lines/budget_lines_view.xml (+10/-10)
chricar_crm_helpdesk/crm_helpdesk_view.xml (+20/-6)
chricar_equipment/equipment.py (+1/-1)
chricar_equipment/equipment_view.xml (+1/-1)
chricar_inventory/__openerp__.py (+2/-1)
chricar_inventory/inventory.py (+4/-2)
chricar_inventory/inventory_view.xml (+11/-5)
chricar_inventory/inventory_webkit_view.xml (+13/-0)
chricar_inventory/report/__init__.py (+32/-0)
chricar_inventory/report/inventory_webkit.mako (+127/-0)
chricar_inventory/report/report_webkit_html.py (+39/-0)
chricar_invoice/invoice_view.xml (+1/-1)
chricar_liquidity_plan/__openerp__.py (+1/-1)
chricar_liquidity_plan/liquidity_plan_view.xml (+1/-1)
chricar_modules_blau61/__openerp__.py (+11/-6)
chricar_partner_parent_companies/partner_parent_companies.py (+15/-0)
chricar_partner_parent_companies/partner_parent_companies_view.xml (+1/-0)
chricar_partner_parent_companies/report/report_partner_participations.mako (+1/-0)
chricar_room/room_view.xml (+1/-1)
chricar_stock_dispo_production_V1/stock_dispo_production.py (+4/-1)
chricar_stock_dispo_production_V1/stock_dispo_production_view.xml (+31/-15)
chricar_stocklocation_moves/i18n/de.po (+1/-1)
chricar_stocklocation_moves/report/print_product_col.mako (+1/-0)
chricar_stocklocation_moves/security/ir.model.access.csv (+2/-1)
chricar_stocklocation_moves/stocklocation_move.py (+11/-3)
chricar_tenant/tenant.py (+96/-2)
chricar_tenant/tenant_view.xml (+48/-3)
chricar_top/location_income_tax.py (+60/-1)
chricar_top/location_income_tax_view.xml (+16/-7)
chricar_top/report/__init__.py (+1/-0)
chricar_top/report/report_real_estate_location.mako (+215/-0)
chricar_top/report/report_real_estate_location.py (+20/-0)
chricar_top/report/report_top_sales_folder.mako (+1/-0)
chricar_top/report_webkit.xml (+9/-0)
chricar_top/top.py (+54/-20)
chricar_top/top_view.xml (+99/-66)
hr_attendance_sheet_check/__init__.py (+24/-0)
hr_attendance_sheet_check/__openerp__.py (+37/-0)
hr_attendance_sheet_check/hr_attendance_check.py (+81/-0)
hr_attendance_sheet_check/hr_attendance_checkbox.xml (+18/-0)
hr_attendance_sheet_check/i18n/de.po (+55/-0)
hr_timesheet_invoice_create_ext/__init__.py (+1/-0)
hr_timesheet_invoice_create_ext/__openerp__.py (+3/-1)
hr_timesheet_invoice_create_ext/hr_timesheet_invoice.py (+32/-0)
hr_timesheet_invoice_create_ext/hr_timesheet_invoice_view.xml (+47/-0)
hr_timesheet_invoice_create_ext/i18n/de.po (+122/-5)
hr_timesheet_invoice_create_ext/i18n/hr_timesheet_invoice_create_ext.pot (+116/-6)
hr_timesheet_invoice_create_ext/wizard/hr_timesheet_invoice_create.py (+76/-8)
hr_timesheet_invoice_create_ext/wizard/hr_timesheet_invoice_create_view.xml (+1/-0)
hr_timesheet_product/__init__.py (+23/-0)
hr_timesheet_product/__openerp__.py (+36/-0)
hr_timesheet_product/hr_timesheet_product.xml (+19/-0)
mail_partner/.directory (+3/-1)
mail_partner/mail.py (+5/-4)
one2many_sorted/__openerp__.py (+2/-0)
partner_erp/.directory (+4/-0)
partner_erp/__init__.py (+26/-0)
partner_erp/__openerp__.py (+40/-0)
partner_erp/partner_erp.py (+77/-0)
partner_erp/partner_view.xml (+56/-0)
partner_erp/security/group.xml (+17/-0)
partner_erp/security/ir.model.access.csv (+3/-0)
partner_erp/security/partner_erp_security.xml (+14/-0)
product_price_property/.directory (+3/-0)
product_price_property/__init__.py (+27/-0)
product_price_property/__openerp__.py (+50/-0)
product_price_property/product.py (+107/-0)
project_date/.directory (+3/-0)
project_date/__init__.py (+24/-0)
project_date/__openerp__.py (+40/-0)
project_date/project_view.xml (+30/-0)
project_gantt_webkit/__init__.py (+26/-0)
project_gantt_webkit/__openerp__.py (+44/-0)
project_gantt_webkit/project.py (+34/-0)
project_gantt_webkit/project_view.xml (+13/-0)
project_gantt_webkit/report/__init__.py (+32/-0)
project_gantt_webkit/report/project_gantt_svg_webkit.mako (+215/-0)
project_gantt_webkit/report/report_webkit_html.py (+40/-0)
project_notes/.directory (+4/-0)
project_notes/__init__.py (+26/-0)
project_notes/__openerp__.py (+40/-0)
project_notes/project.py (+47/-0)
project_notes/project_view.xml (+46/-0)
project_real_estate/__init__.py (+25/-0)
project_real_estate/__openerp__.py (+55/-0)
project_real_estate/i18n/c2c_real_estate.pot (+16/-0)
project_real_estate/i18n/de.po (+18/-0)
project_real_estate/project.py (+100/-0)
project_real_estate/project_real_estate_view.xml (+28/-0)
project_real_estate/project_view.xml (+61/-0)
project_real_estate/report/__init__.py (+32/-0)
project_real_estate/report/project_real_estate.mako (+196/-0)
project_real_estate/report/project_real_estate.mako.ok (+154/-0)
project_real_estate/report/report_webkit_html.py (+39/-0)
project_timesheet_analytic/.directory (+5/-0)
project_timesheet_analytic/__init__.py (+24/-0)
project_timesheet_analytic/__openerp__.py (+36/-0)
project_timesheet_analytic/report/__init__.py (+22/-0)
project_timesheet_analytic/report/task_report.py (+50/-0)
project_timesheet_analytic/report/task_report.py.20130302.patch (+45/-0)
project_timesheet_analytic/report/task_report_view.xml (+19/-0)
purchase_landed_costs/purchase.py (+22/-19)
purchase_landed_costs/stock.py (+14/-16)
purchase_order_webkit/i18n/purchase_order_webkit.pot (+0/-234)
purchase_order_webkit/partner_view.xml (+0/-19)
purchase_order_webkit/purchase_order_webkit_view.xml (+0/-13)
purchase_order_webkit/purchase_view.xml (+0/-36)
purchase_order_webkit/report/.directory (+0/-6)
purchase_order_webkit/report/purchase_order.mako (+0/-222)
purchase_order_webkit_chricar/__init__.py (+32/-0)
purchase_order_webkit_chricar/__openerp__.py (+53/-0)
purchase_order_webkit_chricar/i18n/de.po (+238/-0)
purchase_order_webkit_chricar/i18n/purchase_order_webkit.pot (+234/-0)
purchase_order_webkit_chricar/partner_view.xml (+19/-0)
purchase_order_webkit_chricar/purchase.py (+127/-0)
purchase_order_webkit_chricar/purchase_order_webkit_view.xml (+13/-0)
purchase_order_webkit_chricar/purchase_view.xml (+36/-0)
purchase_order_webkit_chricar/report/.directory (+6/-0)
purchase_order_webkit_chricar/report/__init__.py (+32/-0)
purchase_order_webkit_chricar/report/purchase_order.mako (+232/-0)
purchase_order_webkit_chricar/report/report_webkit_html.py (+39/-0)
report_crm_helpdesk/report/report_crm_helpdesk.mako (+1/-0)
report_production_order_badges/report/report_production_order_badges.mako (+1/-0)
sale_internal_order/sale.py (+1/-1)
sale_order_2_purchase/.directory (+5/-0)
sale_order_2_purchase/__init__.py (+28/-0)
sale_order_2_purchase/__openerp__.py (+42/-0)
sale_order_2_purchase/invoice.py (+47/-0)
sale_order_2_purchase/picking.py (+122/-0)
sale_order_2_purchase/picking_view.xml (+24/-0)
sale_order_2_purchase/sale.py (+284/-0)
sale_order_2_purchase/sale_view.xml (+24/-0)
sale_order_webkit_chricar/__openerp__.py (+2/-0)
sale_order_webkit_chricar/report/report_webkit_html.py (+1/-1)
sale_order_webkit_chricar/report/sale_order.mako (+24/-9)
sale_order_webkit_chricar/sale.py (+1/-1)
sale_order_webkit_chricar/sale_order_webkit_view.xml (+1/-1)
scripts/account_level.sql (+1/-0)
stock_packing_webkit/i18n/de.po (+94/-125)
stock_packing_webkit/report/stock_packing_webkit.mako (+24/-5)
stock_packing_webkit/stock_packing.py (+1/-1)
stock_picking_production/__openerp__.py (+1/-1)
stock_picking_production/stock_view.xml (+1/-1)
stock_picking_reopen/stock.py (+37/-18)
stock_product_by_location/stock_product_by_location_view.xml (+29/-0)
stock_product_zero/report/stock_inventory.mako (+1/-0)
table_generate_xml/wizard/wizard_generate_xml.py (+15/-0)
timed_job/__init__.py (+32/-0)
timed_job/__openerp__.py (+94/-0)
timed_job/email_template_data.xml (+17/-0)
timed_job/security/ir.model.access.csv (+3/-0)
timed_job/timed_job.py (+565/-0)
timed_job/timed_job_demo.xml (+70/-0)
timed_job/timed_job_view.xml (+107/-0)
xml_template/XML_Generator.py (+6/-6)
xml_template/ir_attachment.py (+1/-1)
xml_template/xml_template.py (+11/-7)
Text conflict in account_invoice_webkit/i18n/de.po
Text conflict in chricar_account_period_sum/__openerp__.py
Text conflict in chricar_budget/i18n/de.po
Text conflict in hr_timesheet_invoice_create_ext/i18n/de.po
Conflict: can't delete no_gap_SO_PO_PICK because it is not empty.  Not deleting.
Conflict because no_gap_SO_PO_PICK is not versioned, but has versioned children.  Versioned directory.
Conflict: can't delete no_gap_SO_PO_PICK/i18n because it is not empty.  Not deleting.
Conflict because no_gap_SO_PO_PICK/i18n is not versioned, but has versioned children.  Versioned directory.
Contents conflict in no_gap_SO_PO_PICK/i18n/de.po
Conflict: can't delete purchase_order_webkit because it is not empty.  Not deleting.
Conflict because purchase_order_webkit is not versioned, but has versioned children.  Versioned directory.
Contents conflict in purchase_order_webkit/__init__.py
Contents conflict in purchase_order_webkit/__openerp__.py
Conflict: can't delete purchase_order_webkit/i18n because it is not empty.  Not deleting.
Conflict because purchase_order_webkit/i18n is not versioned, but has versioned children.  Versioned directory.
Contents conflict in purchase_order_webkit/i18n/de.po
Contents conflict in purchase_order_webkit/purchase.py
Conflict: can't delete purchase_order_webkit/report because it is not empty.  Not deleting.
Conflict because purchase_order_webkit/report is not versioned, but has versioned children.  Versioned directory.
Contents conflict in purchase_order_webkit/report/__init__.py
Contents conflict in purchase_order_webkit/report/report_webkit_html.py
Text conflict in stock_packing_webkit/i18n/de.po
To merge this branch: bzr merge lp:~mikel-martin/c2c-rd-addons/6.1
Reviewer Review Type Date Requested Status
Camptocamp Pending
Review via email: mp+243754@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

1316. By mikel <mikel@hide> on 2013-12-18

[FIX] Landed cost calculation error in stock picking whe more tha one line is present

1315. By Ferdinand on 2013-12-10

[REF] missing ref

1314. By Ferdinand on 2013-12-10

[REF] meaningfull error message

1313. By Ferdinand on 2013-12-10

[REF] typo

1312. By Ferdinand on 2013-12-10

[REF] missing group by typo

1311. By Ferdinand on 2013-12-10

[REF] missing group by

1310. By Ferdinand on 2013-11-22

[REF] add "utf-8 -*-" to mako

1309. By Ferdinand on 2013-11-21

[REF] add notes to erp access

1308. By ferdinand <email address hidden> on 2013-11-03

merge

1307. By ferdinand <email address hidden> on 2013-11-03

[REF] make fields longer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'account_asset_austria'
2=== added file 'account_asset_austria/__init__.py'
3--- account_asset_austria/__init__.py 1970-01-01 00:00:00 +0000
4+++ account_asset_austria/__init__.py 2014-12-05 03:33:54 +0000
5@@ -0,0 +1,25 @@
6+# -*- coding: utf-8 -*-
7+##############################################################################
8+#
9+# OpenERP, Open Source Management Solution
10+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
11+# Copyright (C) 2010-2012 Camptocamp Austria (<http://www.camptocamp.at>)
12+#
13+# This program is free software: you can redistribute it and/or modify
14+# it under the terms of the GNU Affero General Public License as
15+# published by the Free Software Foundation, either version 3 of the
16+# License, or (at your option) any later version.
17+#
18+# This program is distributed in the hope that it will be useful,
19+# but WITHOUT ANY WARRANTY; without even the implied warranty of
20+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+# GNU Affero General Public License for more details.
22+#
23+# You should have received a copy of the GNU Affero General Public License
24+# along with this program. If not, see <http://www.gnu.org/licenses/>.
25+#
26+##############################################################################
27+
28+
29+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
30+import account_asset
31
32=== added file 'account_asset_austria/__openerp__.py'
33--- account_asset_austria/__openerp__.py 1970-01-01 00:00:00 +0000
34+++ account_asset_austria/__openerp__.py 2014-12-05 03:33:54 +0000
35@@ -0,0 +1,38 @@
36+# -*- coding: utf-8 -*-
37+##############################################################################
38+#
39+# OpenERP, Open Source Management Solution
40+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
41+# Copyright (C) 2010-2012 ChriCar Beteiligung und Beratung GmbH (<http://www.chricar.at>)
42+#
43+# This program is free software: you can redistribute it and/or modify
44+# it under the terms of the GNU Affero General Public License as
45+# published by the Free Software Foundation, either version 3 of the
46+# License, or (at your option) any later version.
47+#
48+# This program is distributed in the hope that it will be useful,
49+# but WITHOUT ANY WARRANTY; without even the implied warranty of
50+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51+# GNU Affero General Public License for more details.
52+#
53+# You should have received a copy of the GNU Affero General Public License
54+# along with this program. If not, see <http://www.gnu.org/licenses/>.
55+#
56+##############################################################################
57+
58+
59+{
60+ 'name': 'Austraian "half year" depreciation rule',
61+ 'version': '1.0',
62+ 'category': 'Accounting & Finance',
63+ 'description': """
64+ Computes full/half depreciation if asset usage starts in fists/second half year
65+""",
66+ 'author': 'ChriCar Beteiligung und Beratung GmbH',
67+ 'depends': ["account_asset"],
68+ 'update_xml': ['account_asset_view.xml'],
69+ 'demo_xml': [],
70+ 'installable': True,
71+ 'active': False,
72+}
73+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
74
75=== added file 'account_asset_austria/account_asset.py'
76--- account_asset_austria/account_asset.py 1970-01-01 00:00:00 +0000
77+++ account_asset_austria/account_asset.py 2014-12-05 03:33:54 +0000
78@@ -0,0 +1,141 @@
79+# -*- coding: utf-8 -*-
80+##############################################################################
81+#
82+# OpenERP, Open Source Management Solution
83+# Copyright (C) 2004-2012 Tiny SPRL (<http://tiny.be>).
84+# Copyright (C) 2004-2013 Camptocamp Austria (<http://camptocamp.com>).
85+#
86+# This program is free software: you can redistribute it and/or modify
87+# it under the terms of the GNU Affero General Public License as
88+# published by the Free Software Foundation, either version 3 of the
89+# License, or (at your option) any later version.
90+#
91+# This program is distributed in the hope that it will be useful,
92+# but WITHOUT ANY WARRANTY; without even the implied warranty of
93+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
94+# GNU Affero General Public License for more details.
95+#
96+# You should have received a copy of the GNU Affero General Public License
97+# along with this program. If not, see <http://www.gnu.org/licenses/>.
98+#
99+##############################################################################
100+
101+
102+
103+from osv import osv, fields
104+import decimal_precision as dp
105+
106+import time
107+from datetime import datetime
108+from datetime import timedelta
109+from dateutil.relativedelta import relativedelta
110+
111+from tools.translate import _
112+import logging
113+
114+
115+class account_asset_category(osv.osv):
116+ _inherit = 'account.asset.category'
117+
118+ _columns = {
119+ 'half_year_rule':fields.boolean('Half Year Depreciation', help='Computes full/half depreciation for activation/purchase in fist/second half year'),
120+ }
121+
122+ #_defaults['half_year_rule'] : True
123+
124+account_asset_category()
125+
126+
127+class account_asset_asset(osv.osv):
128+ _inherit = 'account.asset.asset'
129+
130+ _columns = {
131+ 'half_year_rule':fields.boolean('Half Year Depreciation', help='Computes full/half depreciation for usage in fist/second half year'),
132+ 'activation_date': fields.date('Activation Date', readonly=True, states={'draft':[('readonly',False)]}, help='Is used instead of purchase date if set'),
133+ 'depreciation_start_date': fields.date('Depreciation Start Date', readonly=True, states={'draft':[('readonly',False)]}, help='compteted date'),
134+ }
135+
136+ _defaults = {
137+ 'half_year_rule' : True
138+ }
139+
140+ def copy(self, cr, uid, id, default=None, context=None):
141+ if default is None:
142+ default = {}
143+ if context is None:
144+ context = {}
145+ asset = self.browse(cr, uid, id, context=context)
146+ default.update({'depreciation_line_ids': [],'history_ids': [], 'account_move_line_ids':[], 'name': asset.name+ " (copy)", 'code': asset.code+ " (copy)", 'state': 'draft'})
147+
148+ return super(account_asset_asset, self).copy(cr, uid, id, default, context=context)
149+
150+
151+ def _compute_board_amount(self, cr, uid, asset, i, residual_amount, amount_to_depr, undone_dotation_number, posted_depreciation_line_ids, total_days, depreciation_date, context=None):
152+ # Austrian half year rule
153+ _logger = logging.getLogger(__name__)
154+ fiscalyear_obj = self.pool.get('account.fiscalyear')
155+ if asset.half_year_rule: # and i < undone_dotation_number:
156+ amount = amount_to_depr / (undone_dotation_number - len(posted_depreciation_line_ids)) # yearly amount
157+ _logger.debug('FGF half_year_rule %s ' %(amount) )
158+ if i == 1:
159+ dep_start = asset.activation_date or asset.purchase_date
160+ dep_start_date = datetime.strptime(dep_start, '%Y-%m-%d')
161+ fy_id = fiscalyear_obj.search(cr, uid, [('date_start','<=',dep_start_date), ('date_stop','>=',dep_start_date)])
162+ for fy_dates in fiscalyear_obj.browse(cr, uid, fy_id):
163+ date_stop_minus6 = datetime.strptime(fy_dates.date_stop, '%Y-%m-%d') - relativedelta(months=6)
164+ _logger.debug('FGF asset mid_year %s ' %(date_stop_minus6) )
165+ if dep_start_date > date_stop_minus6 :
166+ amount = amount/2
167+ if i == undone_dotation_number:
168+ residual_amount -= amount
169+
170+ else:
171+
172+ amount = super(account_asset_asset, self)._compute_board_amount(cr, uid, asset, i, residual_amount, amount_to_depr, undone_dotation_number, posted_depreciation_line_ids, total_days, depreciation_date, context=None)
173+ #_logger.debug('FGF half_year_rule missed %s ' %(i) )
174+ return amount
175+
176+ def compute_depreciation_board(self, cr, uid, ids, context=None):
177+
178+ for asset in self.browse(cr, uid, ids, context):
179+ if asset.half_year_rule and (asset.prorata or asset.method != 'linear'):
180+ self.write(cr, uid, [asset.id], {'prorata':False, 'method':'linear'})
181+
182+ res = super(account_asset_asset, self).compute_depreciation_board(cr, uid, ids, context=None)
183+
184+ for asset in self.browse(cr, uid, ids, context):
185+ remaining_value = 0
186+ line_count = 0
187+ for line in asset.depreciation_line_ids:
188+ if line_count > 0 and line.remaining_value < remaining_value:
189+ last_line = line
190+ remaining_value = line.remaining_value
191+ else:
192+ last_line = line
193+ remaining_value = line.remaining_value
194+ if remaining_value > 0:
195+ depreciation_lin_obj = self.pool.get('account.asset.depreciation.line')
196+ vals = {
197+ 'amount': remaining_value,
198+ 'asset_id': last_line.asset_id.id,
199+ 'sequence': last_line.sequence + 1,
200+ 'name': str(asset.id) +'/' + str(last_line.sequence + 1),
201+ 'remaining_value': 0,
202+ 'depreciated_value': (asset.purchase_value - asset.salvage_value) - (last_line.remaining_value),
203+ 'depreciation_date': (datetime.strptime(last_line.depreciation_date, '%Y-%m-%d') + relativedelta(years=1)).strftime('%Y-%m-%d') ,
204+ }
205+ depreciation_lin_obj.create(cr, uid, vals, context=context)
206+
207+ return res
208+
209+
210+ def write(self, cr, uid, ids, vals, context=None):
211+ result = super(account_asset_asset, self).write(cr, uid, ids, vals, context=context)
212+ self.compute_depreciation_board(cr, uid, ids, context=context)
213+ return result
214+
215+
216+account_asset_asset()
217+
218+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
219+
220
221=== added file 'account_asset_austria/account_asset_view.xml'
222--- account_asset_austria/account_asset_view.xml 1970-01-01 00:00:00 +0000
223+++ account_asset_austria/account_asset_view.xml 2014-12-05 03:33:54 +0000
224@@ -0,0 +1,31 @@
225+<?xml version="1.0" encoding="utf-8"?>
226+<openerp>
227+ <data>
228+
229+ <record model="ir.ui.view" id="view_account_asset_category_halfyear_form">
230+ <field name="name">account.asset.category.halfyear.form</field>
231+ <field name="model">account.asset.category</field>
232+ <field name="type">form</field>
233+ <field name="inherit_id" ref="account_asset.view_account_asset_category_form"/>
234+ <field name="arch" type="xml">
235+ <field name="prorata" position="after">
236+ <field name="half_year_rule"/>
237+ </field>
238+ </field>
239+ </record>
240+
241+ <record model="ir.ui.view" id="view_account_asset_asset_halfyear_form">
242+ <field name="name">account.asset.asset.austria.form</field>
243+ <field name="model">account.asset.asset</field>
244+ <field name="type">form</field>
245+ <field name="inherit_id" ref="account_asset.view_account_asset_asset_form"/>
246+ <field name="arch" type="xml">
247+ <field name="prorata" position="after">
248+ <field name="half_year_rule"/>
249+ <field name="activation_date"/>
250+ </field>
251+ </field>
252+ </record>
253+
254+ </data>
255+</openerp>
256
257=== added directory 'account_asset_austria/i18n'
258=== modified file 'account_cash_discount_61/account.py'
259--- account_cash_discount_61/account.py 2012-12-20 15:30:00 +0000
260+++ account_cash_discount_61/account.py 2014-12-05 03:33:54 +0000
261@@ -86,6 +86,7 @@
262 write_off_debit = 0.0
263 write_off_credit = 0.0
264 partner_id = ''
265+ write_off_id = ''
266 # collect necessary data
267 for line in move_line_obj.browse(cr, uid, lines):
268 self._logger.debug('reconcile voucher reconcile_id, acc_id, partner_id %s,%s %s %s' % (line.reconcile_id.id, line.account_id.id, line.partner_id.id, line.name))
269@@ -148,10 +149,10 @@
270 #for tax in invoice_tax_obj.browse(cr, uid, invoice_tax_ids):
271 # tax_base_total += tax.base_amount
272 # tax_total += tax.tax_amount
273-
274+ factor = 0
275 if write_off_debit > 0:
276 factor = write_off_debit / invoice_total
277- else:
278+ elif write_off_credit > 0:
279 factor = write_off_credit / invoice_total
280 self._logger.debug('reconcile - compare: %s invoice_discount_net= %s, factor : %s' % (invoice_discount_net, tax_base_total, factor))
281 #if not float_is_zero(invoice_discount_net - tax_base_total, prec):
282@@ -168,8 +169,8 @@
283 t.account_id,
284 t.tax_code_id, t.base_code_id,
285 sum(base_amount) as base_amount, sum(tax_amount) as tax_amount,
286- sum(tax_amount) * %s as tax_discount_amount,
287- sum(base_amount) * %s as base_discount_amount
288+ round(sum(tax_amount) * %s,%s) as tax_discount_amount,
289+ round(sum(base_amount) * %s,%s) as base_discount_amount
290 from account_invoice i,
291 account_invoice_tax t,
292 account_payment_term p,
293@@ -183,7 +184,7 @@
294 and pl.discount > 0
295 and pi.res_id = 'account.payment.term.line,'||pl.id and pi.name ='discount_income_account_id'
296 and pe.res_id = 'account.payment.term.line,'||pl.id and pe.name ='discount_expense_account_id'
297- group by 1,2,3,4,5,6,7""" % (factor, factor, invoice_discount_ids2))
298+ group by 1,2,3,4,5,6,7""" % (factor, prec, factor, prec, invoice_discount_ids2))
299 tax_moves = cr.dictfetchall()
300 #if not tax_moves:
301 # self._logger.debug('reconcile - no tax_lines: %s' % res)
302@@ -192,7 +193,8 @@
303 self._logger.debug('reconcile - tax_moves: %s' % tax_moves)
304 # get interesting data from write off record, which later will be deleted
305 #tax_cum_amount=0.0
306- for r_line in move_line_obj.browse(cr, uid, [write_off_id]):
307+ if write_off_id:
308+ for r_line in move_line_obj.browse(cr, uid, [write_off_id]):
309 ml = {
310 'move_id' : r_line.move_id.id,
311 'journal_id' : r_line.journal_id.id,
312@@ -205,7 +207,7 @@
313 'name' : _('Discount'),
314 }
315
316- for tax_move in tax_moves:
317+ for tax_move in tax_moves:
318 # FIXME code can be simplified / condensed
319 #base
320 mlt = dict(ml)
321@@ -218,7 +220,7 @@
322 'tax_amount' : tax_move['base_discount_amount'],
323 })
324 write_off_debit -= tax_move['base_discount_amount']
325- else:
326+ elif write_off_credit > 0.0:
327 mlt.update({
328 'debit' : 0.0,
329 'credit' : tax_move['base_discount_amount'],
330@@ -255,6 +257,14 @@
331
332 # create move lines for remaining not discountable amount
333 self._logger.debug('reconcile - writeoff deb/cred remaining: %s/%s ' % (write_off_debit,write_off_credit))
334+ # check for negatiov write offs
335+ if write_off_debit < 0:
336+ write_off_credit += -write_off_debit
337+ write_off_debit = 0
338+ if write_off_credit < 0:
339+ write_off_debit += -write_off_credit
340+ write_off_credit= 0
341+
342 if not float_is_zero(write_off_debit, prec):
343 self._logger.debug('reconcile - write_off_debit: %s' % write_off_debit)
344 if not context.get('writeoff_acc_id',False):
345@@ -283,7 +293,8 @@
346 move_line_obj.create(cr, uid, mlt)
347
348 # delete originial move
349- move_line_obj.unlink(cr, uid, [write_off_id], context)
350+ if write_off_id:
351+ move_line_obj.unlink(cr, uid, [write_off_id], context)
352 # set only ONE reconcile_id (instead of 2 or more)
353 reconcile_lines_to_update = move_line_obj.search(cr, uid, [('reconcile_id','in',reconcile_ids),('reconcile_id','!=',reconcile_base_id)])
354 move_line_obj.write(cr, uid, reconcile_lines_to_update,{'reconcile_id':reconcile_base_id}, context)
355
356=== modified file 'account_cash_register_webkit/report/account_cash_register_webkit.mako'
357--- account_cash_register_webkit/report/account_cash_register_webkit.mako 2012-04-10 21:05:26 +0000
358+++ account_cash_register_webkit/report/account_cash_register_webkit.mako 2014-12-05 03:33:54 +0000
359@@ -1,3 +1,4 @@
360+## -*- coding: utf-8 -*-
361 <html>
362 <head>
363 <style type="text/css">
364
365=== renamed directory 'account_financial_report' => 'account_financial_report_chricar'
366=== modified file 'account_financial_report_chricar/report/account_balance.py'
367--- account_financial_report/report/account_balance.py 2012-07-16 15:51:30 +0000
368+++ account_financial_report_chricar/report/account_balance.py 2014-12-05 03:33:54 +0000
369@@ -292,5 +292,5 @@
370
371 return result_acc
372
373-report_sxw.report_sxw('report.account.balance.full', 'account.account', 'addons/account_financial_report/report/account_balance_full.rml', parser=account_balance, header=False)
374+report_sxw.report_sxw('report.account.balance.full', 'account.account', 'addons/account_financial_report_chricar/report/account_balance_full.rml', parser=account_balance, header=False)
375 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
376
377=== modified file 'account_financial_report_chricar/report/account_chart.py'
378--- account_financial_report/report/account_chart.py 2011-09-18 18:37:34 +0000
379+++ account_financial_report_chricar/report/account_chart.py 2014-12-05 03:33:54 +0000
380@@ -145,6 +145,6 @@
381 return 0
382
383
384-report_sxw.report_sxw('report.account.account.chart.report', 'account.account','addons/account_financial_report/report/account_chart.rml', parser=account_chart, header=False)
385+report_sxw.report_sxw('report.account.account.chart.report', 'account.account','addons/account_financial_report_chricar/report/account_chart.rml', parser=account_chart, header=False)
386
387
388
389=== modified file 'account_financial_report_chricar/report/account_move_line_record.py'
390--- account_financial_report/report/account_move_line_record.py 2012-08-13 21:14:02 +0000
391+++ account_financial_report_chricar/report/account_move_line_record.py 2014-12-05 03:33:54 +0000
392@@ -54,8 +54,8 @@
393 super(journal_print, self).set_context(objects, data, ids, report_type)
394
395
396-report_sxw.report_sxw('report.account.print.journal.entries', 'account.journal.period', 'addons/account_financial_report/report/account_move_line_record.rml', parser=journal_print, header=False)
397-report_sxw.report_sxw('report.account.print.journal.entriesh', 'account.journal.period', 'addons/account_financial_report/report/account_move_line_record_h.rml', parser=journal_print, header=False)
398+report_sxw.report_sxw('report.account.print.journal.entries', 'account.journal.period', 'addons/account_financial_report_chricar/report/account_move_line_record.rml', parser=journal_print, header=False)
399+report_sxw.report_sxw('report.account.print.journal.entriesh', 'account.journal.period', 'addons/account_financial_report_chricar/report/account_move_line_record_h.rml', parser=journal_print, header=False)
400
401 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
402
403
404=== modified file 'account_financial_report_chricar/report/general_ledger.py'
405--- account_financial_report/report/general_ledger.py 2012-07-16 15:51:30 +0000
406+++ account_financial_report_chricar/report/general_ledger.py 2014-12-05 03:33:54 +0000
407@@ -410,5 +410,5 @@
408 return currency_total
409
410
411-report_sxw.report_sxw('report.account.general.ledger.cumulative', 'account.account', 'addons/account_financial_report/report/general_ledger.rml', parser=general_ledger, header=False)
412+report_sxw.report_sxw('report.account.general.ledger.cumulative', 'account.account', 'addons/account_financial_report_chricar/report/general_ledger.rml', parser=general_ledger, header=False)
413 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
414
415=== modified file 'account_financial_report_chricar/report/general_ledger_landscape.py'
416--- account_financial_report/report/general_ledger_landscape.py 2012-07-16 15:51:30 +0000
417+++ account_financial_report_chricar/report/general_ledger_landscape.py 2014-12-05 03:33:54 +0000
418@@ -410,5 +410,5 @@
419 return currency_total
420
421
422-report_sxw.report_sxw('report.account.general.ledger.cumulative.landscape', 'account.account', 'addons/account_financial_report/report/general_ledger_landscape.rml', parser=general_ledger_landscape, header=False)
423+report_sxw.report_sxw('report.account.general.ledger.cumulative.landscape', 'account.account', 'addons/account_financial_report_chricar/report/general_ledger_landscape.rml', parser=general_ledger_landscape, header=False)
424 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
425
426=== modified file 'account_financial_report_chricar/report/invoice_list.py'
427--- account_financial_report/report/invoice_list.py 2011-09-18 18:37:34 +0000
428+++ account_financial_report_chricar/report/invoice_list.py 2014-12-05 03:33:54 +0000
429@@ -171,4 +171,4 @@
430 del tmp
431
432
433-report_sxw.report_sxw('report.account.invoice.list.report', 'account.invoice', 'addons/account_financial_report/report/invoice_list.rml', parser=print_invoice_list, header=False)
434+report_sxw.report_sxw('report.account.invoice.list.report', 'account.invoice', 'addons/account_financial_report_chricar/report/invoice_list.rml', parser=print_invoice_list, header=False)
435
436=== added directory 'account_invoice_change_date'
437=== added file 'account_invoice_change_date/__init__.py'
438--- account_invoice_change_date/__init__.py 1970-01-01 00:00:00 +0000
439+++ account_invoice_change_date/__init__.py 2014-12-05 03:33:54 +0000
440@@ -0,0 +1,25 @@
441+# -*- coding: utf-8 -*-
442+##############################################################################
443+#
444+# OpenERP, Open Source Management Solution
445+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
446+# Copyright (C) 2010-2012 Camptocamp Austria (<http://www.camptocamp.at>)
447+#
448+# This program is free software: you can redistribute it and/or modify
449+# it under the terms of the GNU Affero General Public License as
450+# published by the Free Software Foundation, either version 3 of the
451+# License, or (at your option) any later version.
452+#
453+# This program is distributed in the hope that it will be useful,
454+# but WITHOUT ANY WARRANTY; without even the implied warranty of
455+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
456+# GNU Affero General Public License for more details.
457+#
458+# You should have received a copy of the GNU Affero General Public License
459+# along with this program. If not, see <http://www.gnu.org/licenses/>.
460+#
461+##############################################################################
462+
463+
464+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
465+import account_invoice
466
467=== added file 'account_invoice_change_date/__openerp__.py'
468--- account_invoice_change_date/__openerp__.py 1970-01-01 00:00:00 +0000
469+++ account_invoice_change_date/__openerp__.py 2014-12-05 03:33:54 +0000
470@@ -0,0 +1,41 @@
471+# -*- coding: utf-8 -*-
472+##############################################################################
473+#
474+# OpenERP, Open Source Management Solution
475+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
476+# Copyright (C) 2010-2012 ChriCar Beteiligung und Beratung GmbH (<http://www.chricar.at>)
477+#
478+# This program is free software: you can redistribute it and/or modify
479+# it under the terms of the GNU Affero General Public License as
480+# published by the Free Software Foundation, either version 3 of the
481+# License, or (at your option) any later version.
482+#
483+# This program is distributed in the hope that it will be useful,
484+# but WITHOUT ANY WARRANTY; without even the implied warranty of
485+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
486+# GNU Affero General Public License for more details.
487+#
488+# You should have received a copy of the GNU Affero General Public License
489+# along with this program. If not, see <http://www.gnu.org/licenses/>.
490+#
491+##############################################################################
492+
493+
494+{
495+ 'name': 'Invoice Change Date',
496+ 'version': '1.0',
497+ 'category': 'Others',
498+ 'description': """
499+ Change date and period of an open/paid invoice
500+ possible as long as periods are open
501+
502+ Recomputes due date if invoice date or payment term are changed
503+""",
504+ 'author': 'ChriCar Beteiligung und Beratung GmbH',
505+ 'depends': ["account","chricar_account_period_sum"],
506+ 'update_xml': ['account_invoice_view.xml'],
507+ 'demo_xml': [],
508+ 'installable': True,
509+ 'active': False,
510+}
511+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
512
513=== added file 'account_invoice_change_date/account_invoice.py'
514--- account_invoice_change_date/account_invoice.py 1970-01-01 00:00:00 +0000
515+++ account_invoice_change_date/account_invoice.py 2014-12-05 03:33:54 +0000
516@@ -0,0 +1,104 @@
517+
518+# -*- encoding: utf-8 -*-
519+##############################################################################
520+#
521+# OpenERP, Open Source Management Solution
522+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
523+#
524+# This program is free software: you can redistribute it and/or modify
525+# it under the terms of the GNU Affero General Public License as
526+# published by the Free Software Foundation, either version 3 of the
527+# License, or (at your option) any later version.
528+#
529+# This program is distributed in the hope that it will be useful,
530+# but WITHOUT ANY WARRANTY; without even the implied warranty of
531+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
532+# GNU Affero General Public License for more details.
533+#
534+# You should have received a copy of the GNU Affero General Public License
535+# along with this program. If not, see <http://www.gnu.org/licenses/>.
536+#
537+##############################################################################
538+
539+from osv import osv, fields
540+from tools.translate import _
541+
542+class account_change_date(osv.osv_memory):
543+ _name = 'account.change.date'
544+ _description = 'Change Date Period'
545+ _columns = {
546+ 'date' : fields.date ('New Date', required=True),
547+ 'period_id' : fields.many2one('account.period', 'Period', required=True),
548+ }
549+
550+ def view_init(self, cr , uid , fields_list, context=None):
551+ obj_inv = self.pool.get('account.invoice')
552+ if context is None:
553+ context = {}
554+
555+
556+ def onchange_date(self, cr, uid, ids, date, context=None):
557+ """ On change of Date Compute Pierod.
558+
559+ @param date: Invoice Date
560+ @return: period ID
561+ """
562+ obj_period = self.pool.get('account.period')
563+
564+ res = {}
565+ if date:
566+ period_ids = obj_period.search(cr,uid,[('date_start','<=',date), ('date_stop','>=',date), ('state','=','draft'), ('special', '!=', True) ], context)
567+ if period_ids:
568+ res['value'] = {'period_id' : period_ids[0]}
569+ else:
570+ raise osv.except_osv(_('Error'), _('You can not set a date in a closed period !'))
571+
572+ return res
573+
574+ def change_date(self, cr, uid, ids, context=None):
575+ obj_inv = self.pool.get('account.invoice')
576+ obj_move = self.pool.get('account.move')
577+ obj_move_line = self.pool.get('account.move.line')
578+ #obj_inv_line = self.pool.get('account.invoice.line')
579+ obj_period = self.pool.get('account.period')
580+ attachment_obj = self.pool.get('ir.attachment')
581+ report_xml_obj = self.pool.get('ir.actions.report.xml')
582+
583+ if context is None:
584+ context = {}
585+ data = self.browse(cr, uid, ids, context=context)[0]
586+ new_date = data.date
587+ new_period_id = data.period_id.id
588+
589+ invoice = obj_inv.browse(cr, uid, context['active_id'], context=context)
590+ if invoice.period_id.id == new_period_id and invoice.date_invoice == new_date:
591+ return {}
592+
593+ obj_inv.write(cr, uid, [invoice.id], {'date_invoice': new_date, 'period_id': new_period_id}, context=context)
594+ obj_move._compute_sum(cr, uid, [invoice.move_id.id] , sign='-')
595+ obj_move.write(cr, uid, [invoice.move_id.id], {'date': new_date, 'period_id': new_period_id}, context=context)
596+ obj_move._compute_sum(cr, uid, [invoice.move_id.id] , sign='+')
597+ #line_ids = []
598+ #for l in invoice.move_id.line_id:
599+ # line_ids.append(l.id)
600+ #obj_move_line.write(cr, uid, line_ids, {'period_id': new_period_id}, context=context)
601+
602+ report_ids = report_xml_obj.search(cr, uid, [('model','=', 'account.invoice'), ('attachment','!=', False)])
603+ for report in report_xml_obj.browse(cr, uid, report_ids):
604+ if report.attachment:
605+ aname = report.attachment.replace('object','invoice')
606+ if eval(aname):
607+ aname = eval(aname)+'.pdf'
608+ attachment_ids = attachment_obj.search(cr, uid, [('res_model','=','account.invoice'),('datas_fname', '=', aname),('res_id','=',invoice.id)])
609+ attachment_obj.unlink(cr, uid, attachment_ids )
610+
611+
612+ return {'type': 'ir.actions.act_window_close'}
613+
614+account_change_date()
615+
616+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
617+
618+
619+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
620+
621
622=== added file 'account_invoice_change_date/account_invoice_view.xml'
623--- account_invoice_change_date/account_invoice_view.xml 1970-01-01 00:00:00 +0000
624+++ account_invoice_change_date/account_invoice_view.xml 2014-12-05 03:33:54 +0000
625@@ -0,0 +1,108 @@
626+<?xml version="1.0" encoding="utf-8"?>
627+<openerp>
628+ <data>
629+
630+ <record id="view_account_change_date" model="ir.ui.view">
631+ <field name="name">Change Date</field>
632+ <field name="model">account.change.date</field>
633+ <field name="type">form</field>
634+ <field name="arch" type="xml">
635+ <form string="Invoice Date">
636+ <separator colspan="4" string="This wizard will change the date and period of the invoice"/>
637+ <field name="date" on_change="onchange_date(date)"/>
638+ <field name="period_id"/>
639+ <separator colspan="4"/>
640+ <group colspan="2" col="4">
641+ <button special="cancel" string="Cancel" icon="gtk-cancel"/>
642+ <button name="change_date" string="Change date/period" type="object" icon="terp-stock_effects-object-colorize"/>
643+ <separator colspan="4" string="Do not forget to recreate the invoice pdf !!!!"/>
644+ </group>
645+ </form>
646+ </field>
647+ </record>
648+
649+ <record id="action_account_change_date" model="ir.actions.act_window">
650+ <field name="name">Change Date</field>
651+ <field name="type">ir.actions.act_window</field>
652+ <field name="res_model">account.change.date</field>
653+ <field name="view_type">form</field>
654+ <field name="view_mode">form</field>
655+ <field name="view_id" ref="view_account_change_date"/>
656+ <field name="context">{}</field>
657+ <field name="target">new</field>
658+ </record>
659+
660+ <record model="ir.ui.view" id="invoice_form_change_date">
661+ <field name="name">account.invoice.change_date.form</field>
662+ <field name="model">account.invoice</field>
663+ <field name="type">form</field>
664+ <field name="inherit_id" ref="account.invoice_form"/>
665+ <field name="arch" type="xml">
666+ <button name ="invoice_open" position="after">
667+ <button name="%(action_account_change_date)d" type='action' string='Change Date' states='open,paid' icon="gtk-execute"/>
668+ </button>
669+ </field>
670+ </record>
671+
672+ <record model="ir.ui.view" id="invoice_supplier_form_change_date">
673+ <field name="name">account.invoice.supplier.change_date.form</field>
674+ <field name="model">account.invoice</field>
675+ <field name="type">form</field>
676+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
677+ <field name="arch" type="xml">
678+ <button name ="invoice_open" position="after">
679+ <button name="%(action_account_change_date)d" type='action' string='Change Date' states='open,paid' icon="gtk-execute"/>
680+ </button>
681+ </field>
682+ </record>
683+
684+ <record id="invoice_form_payment_term_date" model="ir.ui.view">
685+ <field name="name">invoice.form.payment.term.date</field>
686+ <field name="model">account.invoice</field>
687+ <field name="type">form</field>
688+ <field name="inherit_id" ref="account.invoice_form"/>
689+ <field name="arch" type="xml">
690+ <field name="date_invoice" position="replace">
691+ <field name="date_invoice" on_change="onchange_payment_term_date_invoice(payment_term, date_invoice)"/>
692+ </field>
693+ </field>
694+ </record>
695+
696+ <record id="invoice_form_payment_term" model="ir.ui.view">
697+ <field name="name">invoice.form.payment.term</field>
698+ <field name="model">account.invoice</field>
699+ <field name="type">form</field>
700+ <field name="inherit_id" ref="account.invoice_form"/>
701+ <field name="arch" type="xml">
702+ <field name="payment_term" position="replace">
703+ <field name="payment_term" on_change="onchange_payment_term_date_invoice(payment_term, date_invoice)"/>
704+ </field>
705+ </field>
706+ </record>
707+
708+ <record id="invoice_supplier_form_payment_term_date" model="ir.ui.view">
709+ <field name="name">invoice.supplier.form.payment.term.date</field>
710+ <field name="model">account.invoice</field>
711+ <field name="type">form</field>
712+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
713+ <field name="arch" type="xml">
714+ <field name="date_invoice" position="replace">
715+ <field name="date_invoice" on_change="onchange_payment_term_date_invoice(payment_term, date_invoice)"/>
716+ </field>
717+ </field>
718+ </record>
719+
720+ <record id="invoice_supplier_form_payment_term" model="ir.ui.view">
721+ <field name="name">invoice.supplier.form.payment.term</field>
722+ <field name="model">account.invoice</field>
723+ <field name="type">form</field>
724+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
725+ <field name="arch" type="xml">
726+ <field name="payment_term" position="replace">
727+ <field name="payment_term" on_change="onchange_payment_term_date_invoice(payment_term, date_invoice)"/>
728+ </field>
729+ </field>
730+ </record>
731+
732+ </data>
733+</openerp>
734
735=== added directory 'account_invoice_change_date/i18n'
736=== added file 'account_invoice_change_date/i18n/account_invoice_change_date.pot'
737--- account_invoice_change_date/i18n/account_invoice_change_date.pot 1970-01-01 00:00:00 +0000
738+++ account_invoice_change_date/i18n/account_invoice_change_date.pot 2014-12-05 03:33:54 +0000
739@@ -0,0 +1,84 @@
740+# Translation of OpenERP Server.
741+# This file contains the translation of the following modules:
742+# * account_invoice_change_date
743+#
744+# Ferdinand Gassauer, 2013.
745+msgid ""
746+msgstr ""
747+"Project-Id-Version: OpenERP Server 6.1\n"
748+"Report-Msgid-Bugs-To: \n"
749+"POT-Creation-Date: 2013-10-15 12:57+0000\n"
750+"PO-Revision-Date: 2013-10-15 15:00+0200\n"
751+"Last-Translator: Ferdinand Gassauer\n"
752+"Language-Team: German <>\n"
753+"MIME-Version: 1.0\n"
754+"Content-Type: text/plain; charset=UTF-8\n"
755+"Content-Transfer-Encoding: \n"
756+"Plural-Forms: \n"
757+"Language: de\n"
758+"X-Generator: Lokalize 1.5\n"
759+
760+#. module: account_invoice_change_date
761+#: field:account.change.date,date:0
762+msgid "New Date"
763+msgstr ""
764+
765+#. module: account_invoice_change_date
766+#: view:account.change.date:0
767+msgid "This wizard will change the date and period of the invoice"
768+msgstr ""
769+
770+#. module: account_invoice_change_date
771+#: view:account.change.date:0
772+msgid "Invoice Date"
773+msgstr ""
774+
775+#. module: account_invoice_change_date
776+#: code:addons/account_invoice_change_date/account_invoice.py:80
777+#, python-format
778+msgid "You can not set a date in a closed period !"
779+msgstr ""
780+
781+#. module: account_invoice_change_date
782+#: field:account.change.date,period_id:0
783+msgid "Period"
784+msgstr ""
785+
786+#. module: account_invoice_change_date
787+#: view:account.change.date:0
788+msgid "Do not forget to recreate the invoice pdf !!!!"
789+msgstr ""
790+
791+#. module: account_invoice_change_date
792+#: model:ir.model,name:account_invoice_change_date.model_account_change_date
793+msgid "Change Date Period"
794+msgstr ""
795+
796+#. module: account_invoice_change_date
797+#: view:account.invoice:0
798+#: model:ir.actions.act_window,name:account_invoice_change_date.action_account_change_date
799+msgid "Change Date"
800+msgstr ""
801+
802+#. module: account_invoice_change_date
803+#: view:account.change.date:0
804+msgid "Change date/period"
805+msgstr ""
806+
807+#. module: account_invoice_change_date
808+#: code:addons/account_invoice_change_date/account_invoice.py:63
809+#, python-format
810+msgid "You can only change currency for Draft Invoice !"
811+msgstr ""
812+
813+#. module: account_invoice_change_date
814+#: code:addons/account_invoice_change_date/account_invoice.py:63
815+#: code:addons/account_invoice_change_date/account_invoice.py:80
816+#, python-format
817+msgid "Error"
818+msgstr ""
819+
820+#. module: account_invoice_change_date
821+#: view:account.change.date:0
822+msgid "Cancel"
823+msgstr ""
824
825=== added file 'account_invoice_change_date/i18n/de.po'
826--- account_invoice_change_date/i18n/de.po 1970-01-01 00:00:00 +0000
827+++ account_invoice_change_date/i18n/de.po 2014-12-05 03:33:54 +0000
828@@ -0,0 +1,87 @@
829+# Translation of OpenERP Server.
830+# This file contains the translation of the following modules:
831+# * account_invoice_change_date
832+#
833+# Ferdinand Gassauer, 2013.
834+msgid ""
835+msgstr ""
836+"Project-Id-Version: OpenERP Server 6.1\n"
837+"Report-Msgid-Bugs-To: \n"
838+"POT-Creation-Date: 2013-10-15 12:57+0000\n"
839+"PO-Revision-Date: 2013-10-15 15:00+0200\n"
840+"Last-Translator: Ferdinand Gassauer\n"
841+"Language-Team: German <>\n"
842+"MIME-Version: 1.0\n"
843+"Content-Type: text/plain; charset=UTF-8\n"
844+"Content-Transfer-Encoding: \n"
845+"Plural-Forms: \n"
846+"Language: de\n"
847+"X-Generator: Lokalize 1.5\n"
848+
849+#. module: account_invoice_change_date
850+#: field:account.change.date,date:0
851+msgid "New Date"
852+msgstr "Neues Datum"
853+
854+#. module: account_invoice_change_date
855+#: view:account.change.date:0
856+msgid "This wizard will change the date and period of the invoice"
857+msgstr ""
858+"Dieser Assistent erlaubt eine nachträgliche Korrektur von Datum und Periode"
859+
860+#. module: account_invoice_change_date
861+#: view:account.change.date:0
862+msgid "Invoice Date"
863+msgstr "Rechungsdatum"
864+
865+#. module: account_invoice_change_date
866+#: code:addons/account_invoice_change_date/account_invoice.py:80
867+#, python-format
868+msgid "You can not set a date in a closed period !"
869+msgstr "Sie können kein Datum in einer abgeschlossenen Periode setzten !"
870+
871+#. module: account_invoice_change_date
872+#: field:account.change.date,period_id:0
873+msgid "Period"
874+msgstr "Periode"
875+
876+#. module: account_invoice_change_date
877+#: view:account.change.date:0
878+msgid "Do not forget to recreate the invoice pdf !!!!"
879+msgstr "Vergessen Sie nicht das Rechungs pdf zu erzeugen !!!!"
880+
881+#. module: account_invoice_change_date
882+#: model:ir.model,name:account_invoice_change_date.model_account_change_date
883+msgid "Change Date Period"
884+msgstr "Veränder Datum und Periode"
885+
886+#. module: account_invoice_change_date
887+#: view:account.invoice:0
888+#: model:ir.actions.act_window,name:account_invoice_change_date.action_account_change_date
889+msgid "Change Date"
890+msgstr "Verändere Datum"
891+
892+#. module: account_invoice_change_date
893+#: view:account.change.date:0
894+msgid "Change date/period"
895+msgstr "Verändere Datum/Periode"
896+
897+#. module: account_invoice_change_date
898+#: code:addons/account_invoice_change_date/account_invoice.py:63
899+#, python-format
900+msgid "You can only change currency for Draft Invoice !"
901+msgstr ""
902+
903+#. module: account_invoice_change_date
904+#: code:addons/account_invoice_change_date/account_invoice.py:63
905+#: code:addons/account_invoice_change_date/account_invoice.py:80
906+#, python-format
907+msgid "Error"
908+msgstr "Fehler"
909+
910+#. module: account_invoice_change_date
911+#: view:account.change.date:0
912+msgid "Cancel"
913+msgstr "Abbruch"
914+
915+
916
917=== added directory 'account_invoice_ebInterface'
918=== added file 'account_invoice_ebInterface/__init__.py'
919--- account_invoice_ebInterface/__init__.py 1970-01-01 00:00:00 +0000
920+++ account_invoice_ebInterface/__init__.py 2014-12-05 03:33:54 +0000
921@@ -0,0 +1,35 @@
922+# -*- coding: utf-8 -*-
923+##############################################
924+#
925+# Swing Entwicklung betrieblicher Informationssysteme GmbH
926+# (<http://www.swing-system.com>)
927+# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
928+# all rights reserved
929+# 31-DEC-2012 (GK) created
930+#
931+# WARNING: This program as such is intended to be used by professional
932+# programmers who take the whole responsibility of assessing all potential
933+# consequences resulting from its eventual inadequacies and bugs.
934+# End users who are looking for a ready-to-use solution with commercial
935+# guarantees and support are strongly advised to contract a Free Software
936+# Service Company.
937+#
938+# This program is Free Software; you can redistribute it and/or
939+# modify it under the terms of the GNU General Public License
940+# as published by the Free Software Foundation; either version 3
941+# of the License, or (at your option) any later version.
942+#
943+# This program is distributed in the hope that it will be useful,
944+# but WITHOUT ANY WARRANTY; without even the implied warranty of
945+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
946+# GNU General Public License for more details.
947+#
948+# You should have received a copy of the GNU General Public License
949+# along with this program; if not, see <http://www.gnu.org/licenses/> or
950+# write to the Free Software Foundation, Inc.,
951+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
952+#
953+###############################################
954+import account_invoice
955+import installer
956+
957
958=== added file 'account_invoice_ebInterface/__openerp__.py'
959--- account_invoice_ebInterface/__openerp__.py 1970-01-01 00:00:00 +0000
960+++ account_invoice_ebInterface/__openerp__.py 2014-12-05 03:33:54 +0000
961@@ -0,0 +1,55 @@
962+# -*- coding: utf-8 -*-
963+##############################################
964+#
965+# Swing Entwicklung betrieblicher Informationssysteme GmbH
966+# (<http://www.swing-system.com>)
967+# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
968+# all rights reserved
969+# 31-DEC-2012 (GK) created
970+#
971+# WARNING: This program as such is intended to be used by professional
972+# programmers who take the whole responsibility of assessing all potential
973+# consequences resulting from its eventual inadequacies and bugs.
974+# End users who are looking for a ready-to-use solution with commercial
975+# guarantees and support are strongly advised to contract a Free Software
976+# Service Company.
977+#
978+# This program is Free Software; you can redistribute it and/or
979+# modify it under the terms of the GNU General Public License
980+# as published by the Free Software Foundation; either version 3
981+# of the License, or (at your option) any later version.
982+#
983+# This program is distributed in the hope that it will be useful,
984+# but WITHOUT ANY WARRANTY; without even the implied warranty of
985+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
986+# GNU General Public License for more details.
987+#
988+# You should have received a copy of the GNU General Public License
989+# along with this program; if not, see <http://www.gnu.org/licenses/> or
990+# write to the Free Software Foundation, Inc.,
991+# 59 Temple Place - Suite 330, Boston, MA 02111-1.17, USA.
992+#
993+###############################################
994+{ "name" : "Austrian electronic invoicing standard"
995+, "version" : "1.0"
996+, "author" : "Swing Entwicklung betrieblicher Informationssysteme GmbH"
997+, "website" : "http://www.swing-system.com"
998+, "description" :
999+"""
1000+ebInterface is a standardization of the Austrian governement.
1001+
1002+This module generates a XML-file per invoice and attaches it to the invoice.
1003+
1004+"""
1005+, "category" : "Accounting & Finance"
1006+, "depends" :
1007+ [ "account"
1008+ , "xml_template"
1009+ ]
1010+, "init_xml" : ["ebInterfaceV4.0.xml"]
1011+, "demo_xml" : []
1012+, "update_xml" : ["installer_view.xml"]
1013+, "test" : []
1014+, "auto_install": False
1015+, "installable" : True
1016+}
1017
1018=== added file 'account_invoice_ebInterface/account_invoice.py'
1019--- account_invoice_ebInterface/account_invoice.py 1970-01-01 00:00:00 +0000
1020+++ account_invoice_ebInterface/account_invoice.py 2014-12-05 03:33:54 +0000
1021@@ -0,0 +1,71 @@
1022+# -*- coding: utf-8 -*-
1023+##############################################
1024+#
1025+# Swing Entwicklung betrieblicher Informationssysteme GmbH
1026+# (<http://www.swing-system.com>)
1027+# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
1028+# all rights reserved
1029+# 31-DEC-2012 (GK) created
1030+#
1031+# WARNING: This program as such is intended to be used by professional
1032+# programmers who take the whole responsibility of assessing all potential
1033+# consequences resulting from its eventual inadequacies and bugs.
1034+# End users who are looking for a ready-to-use solution with commercial
1035+# guarantees and support are strongly advised to contract a Free Software
1036+# Service Company.
1037+#
1038+# This program is Free Software; you can redistribute it and/or
1039+# modify it under the terms of the GNU General Public License
1040+# as published by the Free Software Foundation; either version 3
1041+# of the License, or (at your option) any later version.
1042+#
1043+# This program is distributed in the hope that it will be useful,
1044+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1045+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1046+# GNU General Public License for more details.
1047+#
1048+# You should have received a copy of the GNU General Public License
1049+# along with this program; if not, see <http://www.gnu.org/licenses/> or
1050+# write to the Free Software Foundation, Inc.,
1051+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1052+#
1053+###############################################
1054+from osv import fields, osv
1055+from tools.translate import _
1056+
1057+class account_invoice(osv.osv) :
1058+ _inherit = "account.invoice"
1059+
1060+ def invoice_validate(self, cr, uid, ids, context=None):
1061+ self.generate_ebInterface(cr , uid, ids, context=context)
1062+ return super(account_invoice,self).invoice_validate(cr, uid, ids, context=context)
1063+# def invoice_validate
1064+
1065+ def generate_ebInterface(self, cr , uid, ids, context=None):
1066+ for invoice in self.browse(cr, uid, ids) :
1067+ template_obj = self.pool.get("xml.template")
1068+ template_ids = template_obj.search(cr, uid, [("name", "=", "ebInterface V4.0")])
1069+ if not template_ids :
1070+ raise osv.except_osv \
1071+ ( _("Customization Error !")
1072+ , _("No Template '%s' defined") % template_name
1073+ )
1074+ template_id = template_ids[0]
1075+ xml = template_obj.generate_xml \
1076+ (cr, uid
1077+ , template_id
1078+ , invoice = invoice
1079+ )
1080+ template_obj.attach_xml \
1081+ ( cr, uid
1082+ , template_id
1083+ , attach_to = invoice
1084+ , xml = xml
1085+ , name = invoice.number + "_ebInterface"
1086+ , fname = invoice.number + "_ebInterface" + ".xml"
1087+ , description = "ebInterface for invoice"
1088+ , context = None
1089+ )
1090+ # end def generate_ebInterface
1091+# end class account_invoice
1092+account_invoice()
1093
1094=== added file 'account_invoice_ebInterface/ebInterfaceV4.0.xml'
1095--- account_invoice_ebInterface/ebInterfaceV4.0.xml 1970-01-01 00:00:00 +0000
1096+++ account_invoice_ebInterface/ebInterfaceV4.0.xml 2014-12-05 03:33:54 +0000
1097@@ -0,0 +1,78 @@
1098+<?xml version='1.0' encoding='UTF-8'?>
1099+<openerp>
1100+ <data noupdate="1">
1101+ <record model="xml.template" id="xml_template_ebInterfaceV4_0" forcecreate="True">
1102+ <field name="name">ebInterface V4.0</field>
1103+ <field name="schema">http://www.ebinterface.at/schema/4p0/</field>
1104+ <field name="content" type="xml">
1105+ <!-- Language Codes according to ISO 639-2 -->
1106+ <Invoice
1107+ xmlns="http://www.ebinterface.at/schema/4p0/"
1108+ xmlns:n1="http://www.ebinterface.at/schema/4p0/"
1109+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1110+ n1:ManualProcessing="true"
1111+ n1:GeneratingSystem="OpenERP"
1112+ xsi:schemaLocation="http://www.ebinterface.at/schema/4p0/ http://www.ebinterface.at/schema/4p0/"
1113+ attr-name1="n1:DocumentTitle" attr-eval1="invoice.name"
1114+ attr-name2="n1:InvoiceCurrency" attr-eval2="invoice.company_id.currency_id.name"
1115+ attr-name3="n1:DocumentType" attr-eval3="'SubsequentDebit'"
1116+ attr-name4="n1:Language" attr-eval4="'ger'">
1117+ <InvoiceNumber text-eval="invoice.number"/>
1118+ <InvoiceDate text-eval="invoice.date_invoice"/>
1119+ <Biller>
1120+ <VATIdentificationNumber text-eval="invoice.company_id.partner_id.vat"/>
1121+ <Address>
1122+ <Name text-eval="invoice.company_id.name"/>
1123+ <Street text-eval="invoice.company_id.street or ''"/>
1124+ <Town text-eval="invoice.company_id.city or''"/>
1125+ <ZIP text-eval="invoice.company_id.zip or ''"/>
1126+ <Country
1127+ attr-name="n1:CountryCode"
1128+ attr-eval="invoice.company_id.country_id.code"/>
1129+ <Phone text-eval="invoice.company_id.phone or ''"/>
1130+ <Email text-eval="invoice.company_id.email or ''"/>
1131+ <Contact text-eval="invoice.company_id.partner_id.name"/>
1132+ </Address>
1133+ </Biller>
1134+ <InvoiceRecipient>
1135+ <VATIdentificationNumber text-eval="invoice.partner_id.vat if invoice.partner_id.vat else '00000000'"/>
1136+ <BillersInvoiceRecipientID text-eval="invoice.partner_id.ref"/>
1137+ <Address>
1138+ <Name text-eval="invoice.partner_id.name"/>
1139+ <Street text-eval="invoice.address_invoice_id.street or ''"/>
1140+ <Town text-eval="invoice.address_invoice_id.city or''"/>
1141+ <ZIP text-eval="invoice.address_invoice_id.zip or ''"/>
1142+ <Country
1143+ attr-name="n1:CountryCode"
1144+ attr-eval="invoice.address_invoice_id.country_id.code"/>
1145+ </Address>
1146+ </InvoiceRecipient>
1147+ <Details>
1148+ <ItemList loop-eval="sorted(invoice.invoice_line, key=lambda x: x.name)" var="l">
1149+ <ListLineItem>
1150+ <Description text-eval="l.name"/>
1151+ <Quantity attr-name1="Unit" attr-eval1="l.product_id.uom_id.name" text-eval="l.quantity"/>
1152+ <UnitPrice text-eval="l.price_unit"/>
1153+ <TaxRate>0</TaxRate>
1154+ <LineItemAmount text-eval="l.price_subtotal"/>
1155+ </ListLineItem>
1156+ </ItemList>
1157+ </Details>
1158+ <Tax>
1159+ <VAT loop-eval="[1] if not invoice.tax_line else []" var="tax">
1160+ <TaxExemption text-eval="'Par.19 UStG'"/>
1161+ </VAT>
1162+ <VAT loop-eval="invoice.tax_line if invoice.tax_line else []" var="tax">
1163+ <Item>
1164+ <TaxedAmount text-eval="invoice.amount_untaxed"/>
1165+ <TaxRate attr-name1="TaxCode" attr-eval1="tax.tax_code_id.code" text-eval="int(tax.amount * 100)"/>
1166+ <Amount text-eval="invoice.amount_tax"/>
1167+ </Item>
1168+ </VAT>
1169+ </Tax>
1170+ <TotalGrossAmount text-eval="invoice.amount_total"/>
1171+ </Invoice>
1172 </field>
1173+ </record>
1174+ </data>
1175+</openerp>
1176+
1177
1178=== added directory 'account_invoice_ebInterface/i18n'
1179=== added file 'account_invoice_ebInterface/installer.py'
1180--- account_invoice_ebInterface/installer.py 1970-01-01 00:00:00 +0000
1181+++ account_invoice_ebInterface/installer.py 2014-12-05 03:33:54 +0000
1182@@ -0,0 +1,51 @@
1183+# -*- coding: utf-8 -*-
1184+##############################################
1185+#
1186+# Swing Entwicklung betrieblicher Informationssysteme GmbH
1187+# (<http://www.swing-system.com>)
1188+# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
1189+# all rights reserved
1190+# 31-DEC-2012 (GK) created
1191+#
1192+# WARNING: This program as such is intended to be used by professional
1193+# programmers who take the whole responsibility of assessing all potential
1194+# consequences resulting from its eventual inadequacies and bugs.
1195+# End users who are looking for a ready-to-use solution with commercial
1196+# guarantees and support are strongly advised to contract a Free Software
1197+# Service Company.
1198+#
1199+# This program is Free Software; you can redistribute it and/or
1200+# modify it under the terms of the GNU General Public License
1201+# as published by the Free Software Foundation; either version 3
1202+# of the License, or (at your option) any later version.
1203+#
1204+# This program is distributed in the hope that it will be useful,
1205+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1206+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1207+# GNU General Public License for more details.
1208+#
1209+# You should have received a copy of the GNU General Public License
1210+# along with this program; if not, see <http://www.gnu.org/licenses/> or
1211+# write to the Free Software Foundation, Inc.,
1212+# 59 Temple Place - Suite 330, Boston, MA 02111-1.17, USA.
1213+#
1214+###############################################
1215+from osv import fields, osv
1216+
1217+class invoice_ebInterface_installer(osv.osv_memory):
1218+ _name = 'account.invoice.ebinterface.installer'
1219+ _inherit = 'res.config.installer'
1220+
1221+ def execute(self, cr, uid, ids, context=None):
1222+ self.execute_simple(cr, uid, ids, context)
1223+ super(invoice_ebInterface_installer, self).execute(cr, uid, ids, context=context)
1224+ # end def execute
1225+
1226+ def execute_simple(self, cr, uid, ids, context=None) :
1227+ inv_obj = self.pool.get('account.invoice')
1228+ inv_ids = inv_obj.search(cr, uid, [("state", "in", ("open", "paid"))])
1229+ inv_obj.generate_ebInterface(cr , uid, inv_ids, context=context)
1230+ # end def execute_simple
1231+# end class invoice_ebInterface_installer
1232+invoice_ebInterface_installer()
1233+
1234
1235=== added file 'account_invoice_ebInterface/installer_view.xml'
1236--- account_invoice_ebInterface/installer_view.xml 1970-01-01 00:00:00 +0000
1237+++ account_invoice_ebInterface/installer_view.xml 2014-12-05 03:33:54 +0000
1238@@ -0,0 +1,34 @@
1239+<openerp>
1240+ <data>
1241+ <record id="account_invoice_ebInterface_installer_form" model="ir.ui.view">
1242+ <field name="name">account.invoice.ebInterface.installer.form</field>
1243+ <field name="model">account.invoice.ebinterface.installer</field>
1244+ <field name="type">form</field>
1245+ <field name="inherit_id" ref="base.res_config_installer"/>
1246+ <field name="arch" type="xml">
1247+ <data>
1248+ <form position="attributes">
1249+ <attribute name="string">Add ebInterface to Invoice</attribute>
1250+ </form>
1251+ <separator string="title" position="attributes">
1252+ <attribute name="string">Create an ebInterface to all 'open'/'paid' invoices</attribute>
1253+ </separator>
1254+ </data>
1255+ </field>
1256+ </record>
1257+ <record id="action_account_invoice_ebInterface_installer" model="ir.actions.act_window">
1258+ <field name="name">Add ebInterface to Invoice</field>
1259+ <field name="type">ir.actions.act_window</field>
1260+ <field name="res_model">account.invoice.ebinterface.installer</field>
1261+ <field name="view_id" ref="account_invoice_ebInterface_installer_form"/>
1262+ <field name="view_type">form</field>
1263+ <field name="view_mode">form</field>
1264+ <field name="target">new</field>
1265+ </record>
1266+ <record id="account_invoice_ebInterface_installer_todo" model="ir.actions.todo">
1267+ <field name="action_id" ref="action_account_invoice_ebInterface_installer"/>
1268+ <field name="type">automatic</field>
1269+ </record>
1270+ </data>
1271+</openerp>
1272+
1273
1274=== added directory 'account_invoice_iban_qr_at'
1275=== added file 'account_invoice_iban_qr_at/__init__.py'
1276--- account_invoice_iban_qr_at/__init__.py 1970-01-01 00:00:00 +0000
1277+++ account_invoice_iban_qr_at/__init__.py 2014-12-05 03:33:54 +0000
1278@@ -0,0 +1,33 @@
1279+# -*- coding: utf-8 -*-
1280+##############################################################################
1281+#
1282+# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
1283+# All Right Reserved
1284+#
1285+# Author : Nicolas Bessi (Camptocamp)
1286+#
1287+# WARNING: This program as such is intended to be used by professional
1288+# programmers who take the whole responsability of assessing all potential
1289+# consequences resulting from its eventual inadequacies and bugs
1290+# End users who are looking for a ready-to-use solution with commercial
1291+# garantees and support are strongly adviced to contract a Free Software
1292+# Service Company
1293+#
1294+# This program is Free Software; you can redistribute it and/or
1295+# modify it under the terms of the GNU General Public License
1296+# as published by the Free Software Foundation; either version 2
1297+# of the License, or (at your option) any later version.
1298+#
1299+# This program is distributed in the hope that it will be useful,
1300+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1301+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1302+# GNU General Public License for more details.
1303+#
1304+# You should have received a copy of the GNU General Public License
1305+# along with this program; if not, write to the Free Software
1306+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1307+#
1308+##############################################################################
1309+import account_invoice
1310+import wizard
1311+import report
1312
1313=== added file 'account_invoice_iban_qr_at/__openerp__.py'
1314--- account_invoice_iban_qr_at/__openerp__.py 1970-01-01 00:00:00 +0000
1315+++ account_invoice_iban_qr_at/__openerp__.py 2014-12-05 03:33:54 +0000
1316@@ -0,0 +1,46 @@
1317+# -*- coding: utf-8 -*-
1318+##############################################################################
1319+#
1320+# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
1321+# All Right Reserved
1322+#
1323+# Author : Ferdinand GAssauer (Camptocamp Austria)
1324+#
1325+# WARNING: This program as such is intended to be used by professional
1326+# programmers who take the whole responsability of assessing all potential
1327+# consequences resulting from its eventual inadequacies and bugs
1328+# End users who are looking for a ready-to-use solution with commercial
1329+# garantees and support are strongly adviced to contract a Free Software
1330+# Service Company
1331+#
1332+# This program is Free Software; you can redistribute it and/or
1333+# modify it under the terms of the GNU General Public License
1334+# as published by the Free Software Foundation; either version 2
1335+# of the License, or (at your option) any later version.
1336+#
1337+# This program is distributed in the hope that it will be useful,
1338+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1339+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1340+# GNU General Public License for more details.
1341+#
1342+# You should have received a copy of the GNU General Public License
1343+# along with this program; if not, write to the Free Software
1344+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1345+#
1346+##############################################################################
1347+{ "name" : "Invoice IBAN QR CODE (AT) "
1348+, "description" : """
1349+Adds an image datafeld to invoice with IBAN BIC Information according to
1350+http://www.stuzza.at/11250_DE.6858781c0841bfb08be3ce61a7d21fb40e0f0830
1351+"""
1352+, "version" : "0.9"
1353+, "depends" :
1354+ [ "account"
1355+ ]
1356+, "category" : "Accounting & Finance"
1357+, "author" : "Camptocamp Austria"
1358+, "website" : "http://www.camptocamp.com/"
1359+, "data" : ["account_qrcode_view.xml"]
1360+, "installable" : True
1361+, "auto_install" : False
1362+}
1363
1364=== added file 'account_invoice_iban_qr_at/account_invoice.py'
1365--- account_invoice_iban_qr_at/account_invoice.py 1970-01-01 00:00:00 +0000
1366+++ account_invoice_iban_qr_at/account_invoice.py 2014-12-05 03:33:54 +0000
1367@@ -0,0 +1,107 @@
1368+# -*- coding: utf-8 -*-
1369+##############################################################################
1370+#
1371+# OpenERP, Open Source Management Solution
1372+# Copyright (C) 2004-2011 Tiny SPRL (<http://tiny.be>).
1373+# Copyright (C) 2011 Camptocamp Austria (<http://www.camptocamp.com>).
1374+#
1375+# This program is free software: you can redistribute it and/or modify
1376+# it under the terms of the GNU Affero General Public License as
1377+# published by the Free Software Foundation, either version 3 of the
1378+# License, or (at your option) any later version.
1379+#
1380+# This program is distributed in the hope that it will be useful,
1381+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1382+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1383+# GNU Affero General Public License for more details.
1384+#
1385+# You should have received a copy of the GNU Affero General Public License
1386+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1387+#
1388+##############################################################################
1389+from osv import fields, osv, orm
1390+from tools.translate import _
1391+import tempfile
1392+import base64
1393+from PIL import Image
1394+import io, StringIO
1395+
1396+
1397+import logging
1398+
1399+try:
1400+ import qrcode
1401+ qr_mod = True
1402+except:
1403+ qr_mod = False
1404+
1405+class account_invoice(osv.osv):
1406+ _inherit = "account.invoice"
1407+
1408+ def _iban_qrcode(self, cr, uid, ids, name, args, context=None):
1409+ _logger = logging.getLogger(__name__)
1410+
1411+ res = {}
1412+ min_size = 150
1413+ size = min_size, min_size
1414+ for inv in self.browse(cr, uid, ids, context=context):
1415+ if inv.type == 'out_invoice' and inv.number and qr_mod == True:
1416+ service = 'BCD'
1417+ version = '001'
1418+ code = '1'
1419+ function = 'SCT'
1420+ bic = inv.company_id.company_bank_id and inv.company_id.company_bank_id.bank.bic or ''
1421+ partner = inv.company_id.name
1422+ iban = inv.company_id.company_bank_id and inv.company_id.company_bank_id.acc_number.replace(' ','') or ''
1423+ currency = ''.join([inv.currency_id.name, str(inv.residual)])
1424+ usage = ''
1425+ ref = ', '.join([inv.number, inv.date_invoice or ''])
1426+ display = _('This QR-Code will be used to initialize bank payment, you will need to confirm this payment using your E-banking system')
1427+
1428+ lf ='\n'
1429+ qr_string = lf.join([service,version,code,function,bic,partner,iban,currency,usage,ref,display])
1430+ _logger.debug('FGF QR string %s', qr_string)
1431+ if len(qr_string) > 331:
1432+ raise osv.except_osv (_('Error'), _('QR string "%s" length %s exceeds 331 bytes') % (qr_string, len(qr_string)))
1433+ #qr = qrencode.encode_scaled(qr_string,min_size,2)
1434+ #f = tempfile.TemporaryFile(mode="r+")
1435+ #qrCode = qr[2]
1436+ #qrCode.save(f,'png')
1437+ #f.seek(0)
1438+ #qr_pic = base64.encodestring(f.read())
1439+ qr = qrcode.QRCode(
1440+ version=1,
1441+ error_correction=qrcode.constants.ERROR_CORRECT_M,
1442+ box_size=5,
1443+ border=4,
1444+ )
1445+ qr.add_data(qr_string)
1446+ qr.make(fit=True)
1447+
1448+ qr_pic = qr.make_image()
1449+ _logger.debug('FGF QR pic %s', qr_pic)
1450+ f = tempfile.TemporaryFile(mode="r+")
1451+ qr_pic.save(f,'png')
1452+ f.seek(0)
1453+ qr_pic1 = base64.encodestring(f.read())
1454+
1455+
1456+ #image_stream = io.BytesIO(qr_pic.decode('base64'))
1457+ #image_stream = qr_pic
1458+ #img = Image.open()
1459+ #img.thumbnail((120, 100), Image.ANTIALIAS)
1460+ #img_stream = StringIO.StringIO()
1461+ #img.save(img_stream, "JPEG")
1462+ #res[inv.id] = img_stream.getvalue().encode('base64')
1463+
1464+
1465+ res[inv.id] = qr_pic1
1466+ else:
1467+ res[inv.id] = False
1468+ return res
1469+
1470+
1471+ _columns = {
1472+ 'iban_qr_code': fields.function(_iban_qrcode, method=True, string='IBAN QR', type='binary'),
1473+ }
1474+account_invoice()
1475
1476=== added file 'account_invoice_iban_qr_at/account_qrcode_view.xml'
1477--- account_invoice_iban_qr_at/account_qrcode_view.xml 1970-01-01 00:00:00 +0000
1478+++ account_invoice_iban_qr_at/account_qrcode_view.xml 2014-12-05 03:33:54 +0000
1479@@ -0,0 +1,6 @@
1480+<?xml version="1.0" encoding="UTF-8"?>
1481+<openerp>
1482+ <data>
1483+
1484+ </data>
1485+</openerp>
1486
1487=== added directory 'account_invoice_iban_qr_at/i18n'
1488=== added file 'account_invoice_iban_qr_at/i18n/account_invoice_iban_qr_at.pot'
1489--- account_invoice_iban_qr_at/i18n/account_invoice_iban_qr_at.pot 1970-01-01 00:00:00 +0000
1490+++ account_invoice_iban_qr_at/i18n/account_invoice_iban_qr_at.pot 2014-12-05 03:33:54 +0000
1491@@ -0,0 +1,75 @@
1492+# Translation of OpenERP Server.
1493+# This file contains the translation of the following modules:
1494+# * account_invoice_iban_qr_at
1495+# <> <>, 2012.
1496+#
1497+msgid ""
1498+msgstr ""
1499+"Project-Id-Version: OpenERP Server 6.1\n"
1500+"Report-Msgid-Bugs-To: \n"
1501+"POT-Creation-Date: 2012-10-31 20:50+0000\n"
1502+"PO-Revision-Date: 2012-10-31 21:58+0100\n"
1503+"Last-Translator: <>\n"
1504+"Language-Team: \n"
1505+"MIME-Version: 1.0\n"
1506+"Content-Type: text/plain; charset=UTF-8\n"
1507+"Content-Transfer-Encoding: \n"
1508+"Plural-Forms: \n"
1509+
1510+#. module: account_invoice_iban_qr_at
1511+#: constraint:account.invoice:0
1512+msgid "Error: \"Reference\" is missing"
1513+msgstr ""
1514+
1515+#. module: account_invoice_iban_qr_at
1516+#: field:account.invoice,iban_qr_code:0
1517+msgid "IBAN QR"
1518+msgstr ""
1519+
1520+#. module: account_invoice_iban_qr_at
1521+#: constraint:account.invoice:0
1522+msgid "Error ! Violating product coding guideline "
1523+msgstr ""
1524+
1525+#. module: account_invoice_iban_qr_at
1526+#: model:ir.actions.report.xml,name:account_invoice_iban_qr_at.account_invoice_webkit
1527+msgid "WebKit Invoice"
1528+msgstr ""
1529+
1530+#. module: account_invoice_iban_qr_at
1531+#: constraint:account.invoice:0
1532+msgid "You must not define an analytic account."
1533+msgstr ""
1534+
1535+#. module: account_invoice_iban_qr_at
1536+#: sql_constraint:account.invoice:0
1537+msgid "Invoice Number must be unique per Company!"
1538+msgstr ""
1539+
1540+#. module: account_invoice_iban_qr_at
1541+#: constraint:account.invoice:0
1542+msgid "Error: Invalid \"Customer Data\" [numeric12]"
1543+msgstr ""
1544+
1545+#. module: account_invoice_iban_qr_at
1546+#: model:ir.model,name:account_invoice_iban_qr_at.model_account_invoice
1547+msgid "Invoice"
1548+msgstr ""
1549+
1550+#. module: account_invoice_iban_qr_at
1551+#: code:addons/account_invoice_iban_qr_at/account_invoice.py:59
1552+#, python-format
1553+msgid ""
1554+"This QR-Code will be used to initialize bank payment, you will need to "
1555+"confirm this payment using your E-banking system"
1556+msgstr ""
1557+
1558+#. module: account_invoice_iban_qr_at
1559+#: constraint:account.invoice:0
1560+msgid "You must not alter a fixed analytic account."
1561+msgstr ""
1562+
1563+#. module: account_invoice_iban_qr_at
1564+#: constraint:account.invoice:0
1565+msgid "You must assign an analytic account.(invoice)"
1566+msgstr ""
1567
1568=== added file 'account_invoice_iban_qr_at/i18n/de.po'
1569--- account_invoice_iban_qr_at/i18n/de.po 1970-01-01 00:00:00 +0000
1570+++ account_invoice_iban_qr_at/i18n/de.po 2014-12-05 03:33:54 +0000
1571@@ -0,0 +1,77 @@
1572+# Translation of OpenERP Server.
1573+# This file contains the translation of the following modules:
1574+# * account_invoice_iban_qr_at
1575+# <> <>, 2012.
1576+#
1577+msgid ""
1578+msgstr ""
1579+"Project-Id-Version: OpenERP Server 6.1\n"
1580+"Report-Msgid-Bugs-To: \n"
1581+"POT-Creation-Date: 2012-10-31 20:50+0000\n"
1582+"PO-Revision-Date: 2012-10-31 21:58+0100\n"
1583+"Last-Translator: <>\n"
1584+"Language-Team: \n"
1585+"MIME-Version: 1.0\n"
1586+"Content-Type: text/plain; charset=UTF-8\n"
1587+"Content-Transfer-Encoding: \n"
1588+"Plural-Forms: \n"
1589+
1590+#. module: account_invoice_iban_qr_at
1591+#: constraint:account.invoice:0
1592+msgid "Error: \"Reference\" is missing"
1593+msgstr "Fehler: \"Referenz\" fehlt"
1594+
1595+#. module: account_invoice_iban_qr_at
1596+#: field:account.invoice,iban_qr_code:0
1597+msgid "IBAN QR"
1598+msgstr "IBAN QR"
1599+
1600+#. module: account_invoice_iban_qr_at
1601+#: constraint:account.invoice:0
1602+msgid "Error ! Violating product coding guideline "
1603+msgstr "Fehler ! Produkt Code"
1604+
1605+#. module: account_invoice_iban_qr_at
1606+#: model:ir.actions.report.xml,name:account_invoice_iban_qr_at.account_invoice_webkit
1607+msgid "WebKit Invoice"
1608+msgstr "WebKit Rechnung"
1609+
1610+#. module: account_invoice_iban_qr_at
1611+#: constraint:account.invoice:0
1612+msgid "You must not define an analytic account."
1613+msgstr "Es darf kein analytisches Konto definiert werden"
1614+
1615+#. module: account_invoice_iban_qr_at
1616+#: sql_constraint:account.invoice:0
1617+msgid "Invoice Number must be unique per Company!"
1618+msgstr "Die Rechnungsnummer muss je Firma eindeutig sein"
1619+
1620+#. module: account_invoice_iban_qr_at
1621+#: constraint:account.invoice:0
1622+msgid "Error: Invalid \"Customer Data\" [numeric12]"
1623+msgstr "Fehler: ungültige \"Kundendaten\" [numerisch 12]"
1624+
1625+#. module: account_invoice_iban_qr_at
1626+#: model:ir.model,name:account_invoice_iban_qr_at.model_account_invoice
1627+msgid "Invoice"
1628+msgstr "Rechnung"
1629+
1630+#. module: account_invoice_iban_qr_at
1631+#: code:addons/account_invoice_iban_qr_at/account_invoice.py:59
1632+#, python-format
1633+msgid ""
1634+"This QR-Code will be used to initialize bank payment, you will need to "
1635+"confirm this payment using your E-banking system"
1636+msgstr ""
1637+"Dieser QR-Code kann eine Bankzahlung initialisieren, Sie müssen die Zahlung "
1638+"mit Ihrem E-Banking System bestätigen"
1639+
1640+#. module: account_invoice_iban_qr_at
1641+#: constraint:account.invoice:0
1642+msgid "You must not alter a fixed analytic account."
1643+msgstr "Sie dürfen kein Analysekonto ändern"
1644+
1645+#. module: account_invoice_iban_qr_at
1646+#: constraint:account.invoice:0
1647+msgid "You must assign an analytic account.(invoice)"
1648+msgstr "Sie müssen ein Analysekonto definieren"
1649
1650=== modified file 'account_invoice_reopen/account_invoice.py'
1651--- account_invoice_reopen/account_invoice.py 2012-12-20 15:30:00 +0000
1652+++ account_invoice_reopen/account_invoice.py 2014-12-05 03:33:54 +0000
1653@@ -130,7 +130,7 @@
1654 _logger.debug('FGF reopen move_copy_id %s' % (move_copy_id))
1655 name = name + '*'
1656 cr.execute("""update account_move_line
1657- set debit=credit, credit=debit
1658+ set debit=credit, credit=debit, tax_amount= -tax_amount
1659 where move_id = %s;""" % (move_copy_id))
1660 account_move_obj.write(cr, uid, [move_copy_id], {'name':name})
1661 _logger.debug('FGF reopen move_copy_id validate' )
1662
1663=== modified file 'account_invoice_reopen/account_invoice_workflow.xml'
1664--- account_invoice_reopen/account_invoice_workflow.xml 2012-08-13 21:14:02 +0000
1665+++ account_invoice_reopen/account_invoice_workflow.xml 2014-12-05 03:33:54 +0000
1666@@ -1,6 +1,7 @@
1667 <?xml version="1.0" encoding="utf-8"?>
1668 <openerp>
1669 <data>
1670+ <!--
1671 <record id="act_reopen" model="workflow.activity">
1672 <field name="wkf_id" ref="account.wkf"/>
1673 <field name="name">reopen</field>
1674@@ -28,6 +29,7 @@
1675 <field name="act_to" ref="account.act_cancel"/>
1676 <field name="signal">invoice_cancel</field>
1677 </record>
1678+ -->
1679 <!-- new -->
1680 <!-- 20120502
1681 <record id="trans_open_draft" model="workflow.transition">
1682
1683=== modified file 'account_invoice_webkit/__openerp__.py'
1684--- account_invoice_webkit/__openerp__.py 2012-12-20 15:30:00 +0000
1685+++ account_invoice_webkit/__openerp__.py 2014-12-05 03:33:54 +0000
1686@@ -36,6 +36,8 @@
1687 using address label field with addressee's country specific zip position
1688
1689 top margin of webkit header must be set to 35mm to get correctly positioned folding marks
1690+
1691+set "print code" in company to print internal product code on sale_order,icking and invoice
1692 """
1693 , "version" : "0.9"
1694 , "depends" :
1695@@ -45,6 +47,7 @@
1696 , "picking_invoice_rel"
1697 , "stock_packing_webkit"
1698 , "one2many_sorted"
1699+ , "account_invoice_iban_qr_at"
1700 ]
1701 , "category" : "Accounting & Finance"
1702 , "author" : "Camptocamp - NBessi, Ferdinand Gassauer"
1703
1704=== modified file 'account_invoice_webkit/account_invoice.py'
1705--- account_invoice_webkit/account_invoice.py 2012-12-20 15:30:00 +0000
1706+++ account_invoice_webkit/account_invoice.py 2014-12-05 03:33:54 +0000
1707@@ -26,7 +26,7 @@
1708
1709 class account_invoice(osv.osv):
1710 _inherit = "account.invoice"
1711-
1712+
1713 def _amount_discount(self, cr, uid, ids, name, args, context=None):
1714 res = {}
1715 amount_discount = 0.0
1716@@ -66,7 +66,7 @@
1717 res = {}
1718 for inv in self.browse(cr, uid, ids, context=context):
1719 print_code = False
1720- if inv.invoice_line:
1721+ if inv.invoice_line and inv.company_id.print_code:
1722 for line in inv.invoice_line:
1723 if line.product_id.default_code:
1724 print_code = True
1725@@ -97,6 +97,9 @@
1726 'print_ean': fields.function(_print_ean, method=True, type='boolean', string='Print EAN if available',),
1727 'print_code': fields.function(_print_code, method=True, type='boolean', string='Print code if available',),
1728 'cols': fields.function(_get_cols, method=True, type='integer', string='No of columns before totals',),
1729+ 'print_address_info': fields.related('company_id', 'print_address_info', type ='boolen', relation='res.company', string="Print Address Info", readonly = True),
1730+ 'print_cell_borders': fields.related('company_id', 'print_cell_borders', type ='boolen', relation='res.company', string="Print Cell Borders", readonly = True),
1731+ 'document_label_position': fields.related('company_id', 'document_label_position', type ='boolen', relation='res.company', string="Document Label Position", readonly = True),
1732 'invoice_line_sorted' : one2many_sorted.one2many_sorted
1733 ( 'account.invoice.line'
1734 , 'invoice_id'
1735
1736=== modified file 'account_invoice_webkit/account_invoice_webkit_view.xml'
1737--- account_invoice_webkit/account_invoice_webkit_view.xml 2011-07-03 07:20:55 +0000
1738+++ account_invoice_webkit/account_invoice_webkit_view.xml 2014-12-05 03:33:54 +0000
1739@@ -9,5 +9,17 @@
1740 name="account.invoice.webkit"
1741 report_type="webkit"
1742 string="WebKit Invoice"/>
1743+
1744+ <record id="invoice_button_form" model="ir.ui.view">
1745+ <field name="name">account.invoice.button.form</field>
1746+ <field name="model">account.invoice</field>
1747+ <field name="type">form</field>
1748+ <field name="inherit_id" ref="account.invoice_form"/>
1749+ <field name="arch" type="xml">
1750+ <xpath expr="/form/notebook/page[@string='Invoice']/group/group/button[@string='Print Invoice']" position="replace">
1751+ <button name="%(account_invoice_webkit)d" string="Print Invoice" type="action" icon="gtk-print" states="open,paid,proforma,sale,proforma2"/>
1752+ </xpath>
1753+ </field>
1754+ </record>
1755 </data>
1756 </openerp>
1757
1758=== modified file 'account_invoice_webkit/i18n/de.po'
1759--- account_invoice_webkit/i18n/de.po 2014-05-22 06:35:46 +0000
1760+++ account_invoice_webkit/i18n/de.po 2014-12-05 03:33:54 +0000
1761@@ -1,21 +1,34 @@
1762 # German translation for c2c-rd-addons
1763 # Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
1764 # This file is distributed under the same license as the c2c-rd-addons package.
1765-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
1766 #
1767+# FIRST AUTHOR <EMAIL@ADDRESS>, 2012, 2013.
1768 msgid ""
1769 msgstr ""
1770 "Project-Id-Version: c2c-rd-addons\n"
1771 "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
1772 "POT-Creation-Date: 2012-06-19 15:26+0000\n"
1773+<<<<<<< TREE
1774 "PO-Revision-Date: 2012-01-24 07:36+0000\n"
1775 "Last-Translator: Ferdinand <Unknown>\n"
1776 "Language-Team: German <de@li.org>\n"
1777+=======
1778+"PO-Revision-Date: 2013-02-15 21:42+0100\n"
1779+"Last-Translator: Ferdinand Gassauer\n"
1780+"Language-Team: German <kde-i18n-doc@kde.org>\n"
1781+>>>>>>> MERGE-SOURCE
1782 "MIME-Version: 1.0\n"
1783 "Content-Type: text/plain; charset=UTF-8\n"
1784 "Content-Transfer-Encoding: 8bit\n"
1785+<<<<<<< TREE
1786 "X-Launchpad-Export-Date: 2014-05-22 06:34+0000\n"
1787 "X-Generator: Launchpad (build 17017)\n"
1788+=======
1789+"X-Launchpad-Export-Date: 2012-10-23 05:13+0000\n"
1790+"X-Generator: Lokalize 1.5\n"
1791+"Language: de\n"
1792+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1793+>>>>>>> MERGE-SOURCE
1794
1795 #. module: account_invoice_webkit
1796 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:243
1797@@ -72,7 +85,7 @@
1798 #. module: account_invoice_webkit
1799 #: field:account.invoice,print_ean:0
1800 msgid "Print EAN if available"
1801-msgstr ""
1802+msgstr "Drucke EAN wenn verfügbar"
1803
1804 #. module: account_invoice_webkit
1805 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:50
1806@@ -113,7 +126,7 @@
1807 #. module: account_invoice_webkit
1808 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:139
1809 msgid "Refund Date"
1810-msgstr ""
1811+msgstr "Datum Rückvergütung"
1812
1813 #. module: account_invoice_webkit
1814 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:45
1815@@ -139,17 +152,17 @@
1816 #. module: account_invoice_webkit
1817 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:144
1818 msgid "Due Date"
1819-msgstr ""
1820+msgstr "Datum Fälligkeit"
1821
1822 #. module: account_invoice_webkit
1823 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:130
1824 msgid "Customer Ref"
1825-msgstr ""
1826+msgstr "Kunden Ref."
1827
1828 #. module: account_invoice_webkit
1829 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:217
1830 msgid "Net Total"
1831-msgstr ""
1832+msgstr "Netto Summe"
1833
1834 #. module: account_invoice_webkit
1835 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:173
1836@@ -166,17 +179,17 @@
1837 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:60
1838 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:91
1839 msgid "VAT"
1840-msgstr "USt."
1841+msgstr "UID"
1842
1843 #. module: account_invoice_webkit
1844 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:226
1845 msgid "Total"
1846-msgstr ""
1847+msgstr "Gessamtsumme"
1848
1849 #. module: account_invoice_webkit
1850 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:133
1851 msgid "Origin"
1852-msgstr ""
1853+msgstr "Ursprung"
1854
1855 #. module: account_invoice_webkit
1856 #: sql_constraint:account.invoice:0
1857@@ -232,10 +245,11 @@
1858 #. module: account_invoice_webkit
1859 #: field:account.invoice,invoice_line_sorted:0
1860 msgid "Invoice Lines Sorted"
1861-msgstr ""
1862+msgstr "Sortierte Zeilen"
1863
1864 #. module: account_invoice_webkit
1865 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:175
1866 #: report:addons/account_invoice_webkit/report/account_invoice_webkit.mako:204
1867 msgid "Unit"
1868 msgstr "ME"
1869+
1870
1871=== modified file 'account_invoice_webkit/report/account_invoice_webkit.mako'
1872--- account_invoice_webkit/report/account_invoice_webkit.mako 2012-07-02 13:27:14 +0000
1873+++ account_invoice_webkit/report/account_invoice_webkit.mako 2014-12-05 03:33:54 +0000
1874@@ -1,3 +1,4 @@
1875+## -*- coding: utf-8 -*-
1876 <html>
1877 <head>
1878 <style type="text/css">
1879@@ -15,7 +16,8 @@
1880 cellspacing="0";
1881 font-size:12px;
1882 }
1883- td { margin: 0px; padding: 3px; border: 1px solid lightgrey; vertical-align: top; }
1884+
1885+ th { margin: 0px; padding: 3px; border: 1px solid Grey; vertical-align: top; }
1886 pre {font-family:helvetica; font-size:15;}
1887 </style>
1888 <%
1889@@ -24,6 +26,15 @@
1890 %>
1891
1892 %for inv in objects :
1893+
1894+ <style type="text/css">
1895+ %if inv.print_cell_borders:
1896+ td { margin: 0px; padding: 3px; border: 1px solid #E3E3E3; vertical-align: top; }
1897+ %else:
1898+ td { margin: 0px; padding: 3px; border: 1px solid White; vertical-align: top; }
1899+ %endif
1900+ </style>
1901+
1902 <% setLang(inv.partner_id.lang) %>
1903 <br>
1904 <table >
1905@@ -40,8 +51,10 @@
1906 %endif
1907 ${inv.address_invoice_id.address_label|carriage_returns}
1908 </td>
1909- <td style="width:50%;padding:0px;font-size:100%;padding-left:5mm;padding-top:3mm">
1910-<table style="padding:0px;" >
1911+
1912+ <td style="width:max;padding:0px;font-size:100%;padding-left:5mm;padding-top:3mm">
1913+ %if inv.print_address_info:
1914+ <table style="padding:0px;" >
1915 %if inv.address_invoice_id.phone :
1916 <tr>
1917 <td style="border:none"> ${_("Phone")}</td><td style="border:none"> ${inv.address_invoice_id.phone|entity} </td
1918@@ -63,7 +76,15 @@
1919 </tr>
1920 %endif
1921 </table>
1922- </td>
1923+ %endif
1924+ </td>
1925+
1926+
1927+ %if 'iban_qr_code' in inv._columns and inv.iban_qr_code:
1928+ <td style="width:150px">
1929+ ${helper.embed_image('png',inv.iban_qr_code, width=100)}
1930+ </td>
1931+ %endif
1932 </tr>
1933 %endif
1934 <!--
1935@@ -72,11 +93,18 @@
1936 ******************************-->
1937 %if inv.company_id.address_label_position == 'right' or not inv.company_id.address_label_position:
1938 <tr>
1939- <td style="width:50%">
1940+ %if 'iban_qr_code' in inv._columns and inv.iban_qr_code:
1941+ <td style="width:150px">
1942+ ${helper.embed_image('png',inv.iban_qr_code, width=150)}
1943+ </td>
1944+ %endif
1945+ <td>
1946+ %if inv.print_address_info:
1947 <table {border:none} >
1948+
1949 %if inv.address_invoice_id.phone :
1950 <tr>
1951-<td> ${_("Phone")}</td><td> ${inv.address_invoice_id.phone|entity} </td
1952+<td> ${_("Phone")}</td><td> ${inv.address_invoice_id.phone|entity} </td>
1953 </tr>
1954 %endif
1955 %if inv.address_invoice_id.fax :
1956@@ -94,6 +122,7 @@
1957 <td>${_("VAT")}</td><td> ${inv.partner_id.vat|entity} </td>
1958 </tr>
1959 %endif
1960+ %endif
1961 </table>
1962 </td>
1963 <td style="width:50%">
1964@@ -121,9 +150,14 @@
1965 <h1 style="clear:both;">${_("ProForma")}</h1>
1966 %endif
1967
1968-<table style="width:auto;float:right;font-weight:bold;font-size:140%">
1969+%if inv.document_label_position == 'right':
1970+ <table style="width:auto;float:right;font-weight:bold;font-size:140%">
1971+%else:
1972+ <table style="width:auto;float:left;font-weight:bold;font-size:140%">
1973+%endif
1974+
1975 <tr>
1976- <td style="text-align:right">
1977+ <td style='text-align:right'>
1978 %if inv.type == 'out_invoice' :
1979 ${_("Customer Invoice")}
1980 %elif inv.type == 'in_invoice' :
1981@@ -133,10 +167,19 @@
1982 %elif inv.type == 'in_refund' :
1983 ${_("Supplier Refund")}
1984 %endif
1985- </td>
1986- <td style="text-align:right;">${inv.number or ''|entity}
1987- </td>
1988-
1989+ %if inv.state == 'cancel' :
1990+ <br/> ${_("Cancelled")}
1991+ %endif
1992+ </td>
1993+ %if inv.state == 'cancel' :
1994+ <td style="text-align:right;text-decoration: line-through;}">
1995+ ${inv.internal_number}
1996+ </td>
1997+ %else:
1998+ <td style="text-align:right;">
1999+ ${inv.number or ''|entity}
2000+ </td>
2001+ %endif
2002 </tr>
2003 <tr>
2004 <td style="text-align:right;">${_("Datum")} </td><td style="text-align:right;"> ${formatLang(inv.date_invoice, date=True)|entity}</td>
2005@@ -145,29 +188,27 @@
2006 <td style="border:none"></td>
2007 </tr>
2008 </table>
2009-<br>
2010- %if inv.state == 'cancel' :
2011- <h1 style="clear:both;">${inv.state}</h1>
2012- <br/>
2013- %endif
2014+
2015+
2016+<br/>
2017 <table >
2018 <tr>
2019 %if inv.name :
2020- <td>${_("Customer Ref")}</td>
2021+ <th>${_("Customer Ref")}</th>
2022 %endif
2023 %if not inv.picking_ids and inv.origin:
2024- <td>${_("Origin")}</td>
2025+ <th>${_("Origin")}</td>
2026 %endif
2027 %if inv.picking_ids:
2028- <td>${_("Pickings/Order")}</td>
2029+ <th>${_("Pickings/Order")}</th>
2030 %endif
2031 %if inv.reference:
2032- <td>${_("Reference")}</td>
2033+ <th>${_("Reference")}</th>
2034 %endif
2035
2036- <td style="white-space:nowrap">${_("Payment Term")}</td>
2037- <td style="white-space:nowrap">${_("Due Date")}</td>
2038- <td>${_("Curr")}</td>
2039+ <th >${_("Payment Term")}</th>
2040+ <th >${_("Due Date")}</th>
2041+ <th>${_("Curr")}</th>
2042 </tr>
2043 <tr>
2044 %if inv.name :
2045@@ -182,7 +223,7 @@
2046 <td style="padding:0px;">
2047 <table style="border:none;">
2048 %for pick in inv.picking_ids:
2049- <tr style="white-space:nowrap;border:none">
2050+ <tr style="border:none">
2051 <td style="border:none">${pick.name} / ${formatLang(pick.date, date=True)|entity}</td>
2052 %if pick.sale_id:
2053 <td style="border:none">${pick.sale_id.name} / ${formatLang(pick.sale_id.date_order, date=True)|entity}</td>
2054@@ -233,7 +274,7 @@
2055 %if inv.print_code:
2056 <td>${line.product_id.default_code or ''|entity}</td>
2057 %endif
2058- <td>${line.product_id.name or line.name|entity}
2059+ <td>${line.name or line.product_id.name |entity}
2060
2061 %if line.note and len(line.note.replace('\n','')) > 0 :
2062 <br>
2063@@ -266,7 +307,7 @@
2064 </tr>
2065 <tr>
2066 <td colspan="${inv.cols}" style="border-style:none"/>
2067- <td style="border-style:none"><b>${_("Taxes")}:</b></td>
2068+ <td ><b>${_("Taxes")}:</b></td>
2069 <td style="text-align:right">${formatLang(inv.amount_tax)}</td></tr>
2070 <tr>
2071 <td colspan="${inv.cols}" style="border-style:none"/>
2072@@ -276,21 +317,30 @@
2073 </table>
2074 <br>
2075 %if inv.tax_line :
2076- <table class="list_table" style="width:40%;border:1px solid grey">
2077- <tr><th>${_("Tax")}</th><th style="text-align:left;">${_("Base")}</th><th style="text-align:left;">${_("Amount")}</th></tr>
2078+ <table style="width:40%;border:1px solid;page-break-inside:avoid;">
2079+ <thead>
2080+ <tr style=" border-width:1px; border-style:solid;">
2081+ <th style="text-align:center;border-width:1px; border-style:solid;">${_("Tax")}</th>
2082+ <th style="text-align:center;border-width:1px; border-style:solid;">${_("Base")}</th>
2083+ <th style="text-align:center;border-width:1px; border-style:solid;">${_("Amount")}</th>
2084+ </tr>
2085+ </thead>
2086+ <tbody style=" border-width:0px; border-style:none;">
2087 %for t in inv.tax_line :
2088- <tr>
2089- <td style="border:1px solid grey">${ t.name|entity } </td>
2090- <td style="text-align:right;border:1px solid grey;white-space:nowrap">${ formatLang(t.base)}</td>
2091- <td style="text-align:right;border:1px solid grey;white-space:nowrap">${ formatLang(t.amount) }</td>
2092+
2093+
2094+ <td>${ t.name|entity } </td>
2095+ <td style="text-align:right;white-space:nowrap">${ formatLang(t.base)}</td>
2096+ <td style="text-align:right;white-space:nowrap">${ formatLang(t.amount) }</td>
2097 </tr>
2098 %endfor
2099- <tr>
2100- <td style="border-style:none"/>
2101- <td style="border-top:0px solid;text-align:right;white-space:nowrap"><b>${_("Total Tax:")}</b></td>
2102- <td style="border-top:0px solid;text-align:right;white-space:nowrap">${ formatLang(inv.amount_tax) }</td>
2103+ <tr style=" border-width:0px; border-style:none;">
2104+ <td style="border:1px solid White"/>
2105+ <td style="border:2px solid;text-align:right;white-space:nowrap"><b>${_("Total Tax:")}</b></td>
2106+ <td style="border:2px solid;text-align:right;white-space:nowrap">${ formatLang(inv.amount_tax) }</td>
2107 </tr>
2108 %endif
2109+ </tbody>
2110 </table>
2111 %if inv.comment:
2112 <br> ${inv.comment|carriage_returns}
2113
2114=== modified file 'account_payment_edifact/__init__.py'
2115--- account_payment_edifact/__init__.py 2012-08-09 07:28:48 +0000
2116+++ account_payment_edifact/__init__.py 2014-12-05 03:33:54 +0000
2117@@ -33,6 +33,5 @@
2118 import unicode2ascii
2119 import res_bank
2120 import payment_line
2121-import payment_mode
2122 import payment_order
2123 import wizard
2124
2125=== modified file 'account_payment_edifact/__openerp__.py'
2126--- account_payment_edifact/__openerp__.py 2012-08-09 07:28:48 +0000
2127+++ account_payment_edifact/__openerp__.py 2014-12-05 03:33:54 +0000
2128@@ -74,8 +74,7 @@
2129 , "init_xml" : []
2130 , "demo_xml" : []
2131 , "update_xml" :
2132- [ 'payment_mode_view.xml'
2133- , 'payment_iban.xml'
2134+ [ 'payment_iban.xml'
2135 , 'res_bank_view.xml'
2136 , 'wizard/generate_edifact_view.xml'
2137 ]
2138
2139=== removed file 'account_payment_edifact/payment_mode.py'
2140--- account_payment_edifact/payment_mode.py 2012-10-11 06:50:33 +0000
2141+++ account_payment_edifact/payment_mode.py 1970-01-01 00:00:00 +0000
2142@@ -1,83 +0,0 @@
2143-# -*- coding: utf-8 -*-
2144-##############################################
2145-#
2146-# Swing Entwicklung betrieblicher Informationssysteme GmbH
2147-# (<http://www.swing-system.com>)
2148-# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
2149-# all rights reserved
2150-# 05-AUG-2010 (GK) created
2151-#
2152-# WARNING: This program as such is intended to be used by professional
2153-# programmers who take the whole responsibility of assessing all potential
2154-# consequences resulting from its eventual inadequacies and bugs.
2155-# End users who are looking for a ready-to-use solution with commercial
2156-# guarantees and support are strongly advised to contract a Free Software
2157-# Service Company.
2158-#
2159-# This program is Free Software; you can redistribute it and/or
2160-# modify it under the terms of the GNU Affero General Public License
2161-# as published by the Free Software Foundation; either version 3
2162-# of the License, or (at your option) any later version.
2163-#
2164-# This program is distributed in the hope that it will be useful,
2165-# but WITHOUT ANY WARRANTY; without even the implied warranty of
2166-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2167-# GNU Affero General Public License for more details.
2168-#
2169-# You should have received a copy of the GNU Affero General Public License
2170-# along with this program; if not, see <http://www.gnu.org/licenses/> or
2171-# write to the Free Software Foundation, Inc.,
2172-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2173-#
2174-###############################################
2175-from osv import fields, osv
2176-from tools.translate import _
2177-
2178-class payment_mode(osv.osv) :
2179- _inherit = "payment.mode"
2180- # http://www.unece.org/trade/untdid/d00a/tred/tred4471.htm
2181- _columns = \
2182- { 'charges_alloc' : fields.selection
2183- ([ ( '1', _('Bill back'))
2184- , ( '2', _('Off invoice'))
2185- , ( '3', _('Vendor check to customer'))
2186- , ( '4', _('Credit customer account'))
2187- , ( '5', _('Charge to be paid by vendor'))
2188- , ( '6', _('Charge to be paid by customer'))
2189- , ( '7', _('Optional'))
2190- , ( '8', _('Off gross quantity invoiced'))
2191- , ( '9', _('Electric cost recovery factor'))
2192- , ('10', _('Gas cost recovery factor'))
2193- , ('11', _('Prior credit balance'))
2194- , ('12', _('Non-dutiable'))
2195- , ('13', _('All charges borne by payee'))
2196- , ('14', _('Each pay own cost'))
2197- , ('15', _('All charges borne by payor'))
2198- , ('16', _('All bank charges to be borne by applicant'))
2199- , ('17', _('All bank charges except confirmation commission to be borne by applicant'))
2200- , ('18', _('All bank charges to be borne by beneficiary'))
2201- , ('20', _('Amendment charges to be borne by applicant'))
2202- , ('21', _('Amendment charges to be borne by beneficiary'))
2203- , ('22', _('Discount charges to be borne by applicant'))
2204- , ('23', _('Discount charges to be borne by beneficiary'))
2205- , ('24', _('All bank charges other than those of the issuing bank to be borne by beneficiary'))
2206- , ('25', _('Amendment charges other than those of the issuing bank to be borne by beneficiary'))
2207- , ('26', _('All charges to be paid by the principal of the collection'))
2208- , ('27', _('All charges to be paid by the drawee of the collection'))
2209- , ('28', _('All charges to be borne by the drawee except those levied by the remitting bank, to be paid by principal'))
2210- , ('29', _('All bank charges are to be paid by the principal of the documentary credit collection'))
2211- , ('30', _('All bank charges to be borne by receiving bank'))
2212- , ('31', _('All bank charges to be borne by sending bank'))
2213- , ('32', _('Charges levied by a third bank'))
2214- , ('33', _('Information charges levied by a third bank'))
2215- , ('34', _('Total payment borne by patient'))
2216- , ('35', _('Part payment borne by patient'))
2217- , ('ZZZ', _('Mutually defined'))
2218- ]
2219- , 'Financial Charges Allocation'
2220- , required=True
2221- )
2222- }
2223- _defaults = {'charges_alloc' : lambda *a: '14'}
2224-# end class payment_mode
2225-payment_mode()
2226
2227=== removed file 'account_payment_edifact/payment_mode_view.xml'
2228--- account_payment_edifact/payment_mode_view.xml 2012-02-03 15:24:46 +0000
2229+++ account_payment_edifact/payment_mode_view.xml 1970-01-01 00:00:00 +0000
2230@@ -1,16 +0,0 @@
2231-<?xml version="1.0" encoding="UTF-8"?>
2232-<openerp>
2233- <data>
2234- <record id="view_payment_mode_edifact_form" model="ir.ui.view">
2235- <field name="name">payment.mode.edifact.form</field>
2236- <field name="model">payment.mode</field>
2237- <field name="type">form</field>
2238- <field name="inherit_id" ref="account_payment.view_payment_mode_form"/>
2239- <field name="arch" type="xml">
2240- <field name="bank_id" position="after">
2241- <field name="charges_alloc"/>
2242- </field>
2243- </field>
2244- </record>
2245- </data>
2246-</openerp>
2247
2248=== modified file 'account_payment_edifact/payment_order.py'
2249--- account_payment_edifact/payment_order.py 2012-10-25 18:56:20 +0000
2250+++ account_payment_edifact/payment_order.py 2014-12-05 03:33:54 +0000
2251@@ -150,9 +150,12 @@
2252 s.append("RFF+PQ:%(move_name)s'" % l)
2253 if l['customer_data'] and not interntl :
2254 s.append("RFF+AEF:%(customer_data)s'" % l)
2255-# s.append("FCA+%(fca)s'" % l)
2256 # s.append("FII+BF+%(iban)s:%(name)s+%(bic)s:25:5'" % l)
2257- s.append("FII+BF+%(iban)s:%(name)s'" % l)
2258+ if interntl :
2259+ s.append("FCA+14'")
2260+ s.append("FII+BF+%(iban)s:%(name)s:25:5'" % l)
2261+ else :
2262+ s.append("FII+BF+%(iban)s:%(name)s'" % l)
2263 s.append("NAD+BE+++%(name)s+%(street)s+%(city)s+%(zip)s+%(country)s'" % l) # sgr3
2264 s.append("PRC+11'")
2265 s.append("FTX+PMD+++%(reference)s'" % l)
2266@@ -191,6 +194,8 @@
2267 own_ref.append(self._u2a(invoice.reference).upper())
2268 if l.communication != "/" :
2269 customer_ref.append(self._u2a(l.communication).upper())
2270+ else:
2271+ customer_ref.append(self._u2a(invoice.number).upper())
2272 if l.communication2 :
2273 customer_ref.append(self._u2a(l.communication2).upper())
2274 if not customer_ref :
2275@@ -211,7 +216,6 @@
2276 , 'currency' : line.currency.name
2277 , 'move_name' : (" ".join(customer_ref))[0:35]
2278 , 'customer_data' : None
2279- , 'fca' : order.mode.charges_alloc
2280 , 'name' : self._u2a(line.partner_id.name).upper()[0:35]
2281 , 'street' : self._u2a(p_address.street).upper()[0:35]
2282 , 'city' : self._u2a(p_address.city).upper()[0:35]
2283@@ -234,6 +238,8 @@
2284 own_ref.append(self._u2a(invoice.reference).upper())
2285 if line.communication != "/" :
2286 customer_ref.append(self._u2a(line.communication).upper())
2287+ else:
2288+ customer_ref.append(self._u2a(invoice.number).upper())
2289 if line.communication2 :
2290 customer_ref.append(self._u2a(line.communication2).upper())
2291 if invoice.customer_data :
2292@@ -256,7 +262,6 @@
2293 , 'currency' : line.currency.name
2294 , 'move_name' : (" ".join(customer_ref))[0:28] # smaller for AEF
2295 , 'customer_data' : customer_data
2296- , 'fca' : order.mode.charges_alloc
2297 , 'name' : self._u2a(line.partner_id.name).upper()[0:35]
2298 , 'street' : self._u2a(p_address.street).upper()[0:35]
2299 , 'city' : self._u2a(p_address.city).upper()[0:35]
2300
2301=== renamed directory 'account_payment_extension' => 'account_payment_extension_chricar'
2302=== modified file 'account_payment_extension_chricar/__openerp__.py'
2303--- account_payment_extension/__openerp__.py 2012-10-22 16:58:57 +0000
2304+++ account_payment_extension_chricar/__openerp__.py 2014-12-05 03:33:54 +0000
2305@@ -20,7 +20,7 @@
2306 # along with this program. If not, see <http://www.gnu.org/licenses/>.
2307 #
2308 ##############################################################################
2309-{ "name" : "Account Payment Extension"
2310+{ "name" : "Account Payment Extension - DO NOT INSTALL along with c2c_account_payment_extension_chricar"
2311 , "version" : "1.1"
2312 , "author" : "Zikzakmedia SL"
2313 , "category" : "Generic Modules/Accounting"
2314
2315=== modified file 'account_payment_extension_chricar/account_move_line.py'
2316--- account_payment_extension/account_move_line.py 2012-06-09 20:14:55 +0000
2317+++ account_payment_extension_chricar/account_move_line.py 2014-12-05 03:33:54 +0000
2318@@ -168,15 +168,15 @@
2319
2320 def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
2321 menus = [
2322- self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'menu_action_invoice_payments'),
2323- self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'menu_action_done_payments'),
2324+ self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension_chricar', 'menu_action_invoice_payments'),
2325+ self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension_chricar', 'menu_action_done_payments'),
2326 ]
2327 menus = [m[1] for m in menus]
2328 if 'active_id' in context and context['active_id'] in menus:
2329 # Use standard views for account.move.line object
2330 if view_type == 'search':
2331 # Get a specific search view (bug in 6.0RC1, it does not give the search view defined in the action window)
2332- view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'view_payments_filter')[1]
2333+ view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension_chricar', 'view_payments_filter')[1]
2334 result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
2335 else:
2336 # Use special views for account.move.line object (for ex. tree view contains user defined fields)
2337
2338=== modified file 'account_payment_sepa/__openerp__.py'
2339--- account_payment_sepa/__openerp__.py 2012-08-09 07:28:48 +0000
2340+++ account_payment_sepa/__openerp__.py 2014-12-05 03:33:54 +0000
2341@@ -37,7 +37,7 @@
2342 , "description" :
2343 """
2344 SEPA (Single European Payment Area) is a standardization of the ECBS (European Commitee for Banking Standards).
2345-It conforms to the ISO 20022 standard (Finmancial services - universal financial industry message scheme).
2346+It conforms to the ISO 20022 standard (Financial services - universal financial industry message scheme).
2347
2348 This module implements the credit transfer (ISO.pain.001.101).
2349 It generates an XML-file per payment-order and attaches it to the payment order at the time of payment_order.action_open.
2350@@ -53,7 +53,10 @@
2351 , "xml_template"
2352 , "account_payment_customer_data"
2353 ]
2354-, "init_xml" : []
2355+, "init_xml" :
2356+ [ "pain_001_001_03_austrian_001.xml"
2357+ , "pain_001_001_02_austrian_002.xml"
2358+ ]
2359 , "demo_xml" : []
2360 , "update_xml" : ["wizard/generate_sepa_view.xml"]
2361 , "test" : []
2362
2363=== modified file 'account_payment_sepa/pain_001_001_02_austrian_002.xml'
2364--- account_payment_sepa/pain_001_001_02_austrian_002.xml 2012-02-04 08:01:12 +0000
2365+++ account_payment_sepa/pain_001_001_02_austrian_002.xml 2014-12-05 03:33:54 +0000
2366@@ -1,8 +1,15 @@
2367+<?xml version='1.0' encoding='UTF-8'?>
2368+<openerp>
2369+ <data noupdate="1">
2370+ <record model="xml.template" id="xml_template_sepa_pain_001_001_02_austrian_002" forcecreate="True">
2371+ <field name="name">pain_001_001_02_austrian_002</field>
2372+ <field name="schema">http://www.stuzza.at/schemata/ISO.pain.001.001.02.austrian.002.xsd</field>
2373+ <field name="content" type="xml">
2374 <Document>
2375 <pain.001.001.02>
2376 <GrpHdr>
2377- <MsgId text-eval="time.strftime('%Y%m%d%H%M%S')"/>
2378- <CreDtTm text-eval="time.strftime('%Y-%m-%dT%H:%M:%S')"/>
2379+ <MsgId text-eval="time1"/>
2380+ <CreDtTm text-eval="time2"/>
2381 <NbOfTxs text-eval="sum(len(l) for date,l in sepa_payments(order,company).iteritems())"/>
2382 <CtrlSum text-eval="order.total"/>
2383 <Grpg text-eval="'MIXD'"/>
2384@@ -14,8 +21,8 @@
2385 </Id>
2386 </InitgPty>
2387 </GrpHdr>
2388- <PmtInf var="date,p_banks" loop-eval="sepa_payments(order,company).iteritems()">
2389- <PmtInfId text-eval="time.strftime('%Y%m%d%H%M%S')"/>
2390+ <PmtInf var="date" seq-eval="sepa_payments(order,company)">
2391+ <PmtInfId text-eval="date.replace('-', '')"/>
2392 <PmtMtd text-eval="'TRF'"/>
2393 <PmtTpInf>
2394 <SvcLvl>
2395@@ -37,7 +44,7 @@
2396 <BIC text-eval="order.mode.bank_id.bank.bic.replace(' ','').upper()"/>
2397 </FinInstnId>
2398 </DbtrAgt>
2399- <CdtTrfTxInf var="line" seq-eval="p_banks">
2400+ <CdtTrfTxInf var="line" seq-eval="p_sepa_payments(order,company)[date]">
2401 <PmtId>
2402 <EndToEndId text-eval="line.customer_data[0:35]"/>
2403 </PmtId>
2404@@ -63,4 +70,9 @@
2405 </CdtTrfTxInf>
2406 </PmtInf>
2407 </pain.001.001.02>
2408-</Document>
2409\ No newline at end of file
2410+</Document>
2411+ </field>
2412+ </record>
2413+ </data>
2414+</openerp>
2415+
2416
2417=== modified file 'account_payment_sepa/pain_001_001_03_austrian_001.xml'
2418--- account_payment_sepa/pain_001_001_03_austrian_001.xml 2012-02-04 08:01:12 +0000
2419+++ account_payment_sepa/pain_001_001_03_austrian_001.xml 2014-12-05 03:33:54 +0000
2420@@ -1,8 +1,15 @@
2421+<?xml version='1.0' encoding='UTF-8'?>
2422+<openerp>
2423+ <data noupdate="1">
2424+ <record model="xml.template" id="xml_template_sepa_pain_001_001_03_austrian_001" forcecreate="True">
2425+ <field name="name">pain_001_001_03_austrian_001</field>
2426+ <field name="schema">http://www.stuzza.at/schemata/ISO.pain.001.001.02.austrian.001.xsd</field>
2427+ <field name="content" type="xml">
2428 <Document>
2429 <CstmrCdtTrfInitn>
2430 <GrpHdr>
2431- <MsgId text-eval="time.strftime('%Y%m%d%H%M%S')"/>
2432- <CreDtTm text-eval="time.strftime('%Y-%m-%dT%H:%M:%S')"/>
2433+ <MsgId text-eval="time1"/>
2434+ <CreDtTm text-eval="time2"/>
2435 <NbOfTxs text-eval="sum(len(l) for date,l in sepa_payments(order,company).iteritems())"/>
2436 <CtrlSum text-eval="order.total"/>
2437 <InitgPty>
2438@@ -10,7 +17,7 @@
2439 </InitgPty>
2440 </GrpHdr>
2441 <PmtInf var="date,p_banks" loop-eval="sepa_payments(order,company).iteritems()">
2442- <PmtInfId text-eval="time.strftime('%Y%m%d%H%M%S')"/>
2443+ <PmtInfId text-eval="time1"/>
2444 <PmtMtd text-eval="'TRF'"/>
2445 <CtrlSum text-eval="sum(line.amount for line in p_banks)"/>
2446 <ReqdExctnDt text-eval="date"/>
2447@@ -59,4 +66,9 @@
2448 </CdtTrfTxInf>
2449 </PmtInf>
2450 </CstmrCdtTrfInitn>
2451-</Document>
2452\ No newline at end of file
2453+</Document>
2454+ </field>
2455+ </record>
2456+ </data>
2457+</openerp>
2458+
2459
2460=== modified file 'account_payment_sepa/payment_order.py'
2461--- account_payment_sepa/payment_order.py 2012-08-09 07:28:48 +0000
2462+++ account_payment_sepa/payment_order.py 2014-12-05 03:33:54 +0000
2463@@ -77,9 +77,12 @@
2464
2465 class _Record (object) :
2466 def __init__ (self, **kw):
2467- self.__dict__ ["_kw"] = kw.copy ()
2468+ self.__dict__["_kw"] = kw.copy()
2469 # end def __init__
2470
2471+ def __repr__(self):
2472+ return str(self.__dict__["_kw"])
2473+
2474 def copy (self, **kw):
2475 result = self.__class__ (** self._kw)
2476 result._kw.update (kw)
2477@@ -167,7 +170,7 @@
2478 elif p_bank not in dates[date] :
2479 dates[date].add(P_Bank(p_bank, line))
2480 else :
2481- dates[date].append(p_banks, line)
2482+ dates[date].append(p_bank, line)
2483
2484 for date, p_banks in dates.iteritems() :
2485 for p_bank, lines in p_banks.iteritems() :
2486@@ -267,7 +270,7 @@
2487 protocol = template_ref.xml_template_id.name
2488 template_obj = self.pool.get("xml.template")
2489 namespaces = \
2490- { None : "urn:iso:std:iso:20022:tech:xsd:pain.001.001.02"
2491+ { None : "APC:STUZZA:payments:ISO:pain:001:001:02:austrian:002"
2492 , "xsi" : "http://www.w3.org/2001/XMLSchema-instance"
2493 }
2494 xml = template_obj.generate_xml \
2495@@ -276,7 +279,8 @@
2496 , nsmap = namespaces
2497 , order = order
2498 , company = company
2499- , time = time
2500+ , time1 = time.strftime('%Y%m%d%H%M%S')
2501+ , time2 = time.strftime('%Y-%m-%dT%H:%M:%S')
2502 , sepa_payments = self.sepa_payments
2503 )
2504 template_obj.attach_xml \
2505@@ -284,7 +288,7 @@
2506 , template_ref.xml_template_id.id
2507 , attach_to = order
2508 , xml = xml
2509- , name = order.reference + " " + protocol
2510+ , name = "SEPA_" + order.reference
2511 , fname = self._sepa_strip(order.reference).upper()
2512 , description = "SEPA credit transfer " + protocol
2513 , context = None
2514
2515=== modified file 'account_payment_sepa/wizard/generate_sepa_view.xml'
2516--- account_payment_sepa/wizard/generate_sepa_view.xml 2012-02-22 09:40:11 +0000
2517+++ account_payment_sepa/wizard/generate_sepa_view.xml 2014-12-05 03:33:54 +0000
2518@@ -27,15 +27,5 @@
2519 target="new"
2520 key2="client_action_multi"
2521 id="generate_sepa_act_window"/>
2522- <!--
2523- <record id="action_payment_order_sepa" model="ir.actions.act_window">
2524- <field name="name">Generate SEPA</field>
2525- <field name="res_model">payment.order.sepa</field>
2526- <field name="view_type">form</field>
2527- <field name="view_mode">form</field>
2528- <field name="view_id" ref="payment_order_sepa_form_view"/>
2529- <field name="target">new</field>
2530- </record>
2531- -->
2532 </data>
2533-</openerp>
2534\ No newline at end of file
2535+</openerp>
2536
2537=== added directory 'account_period_U30_at'
2538=== added file 'account_period_U30_at/U30.xml'
2539--- account_period_U30_at/U30.xml 1970-01-01 00:00:00 +0000
2540+++ account_period_U30_at/U30.xml 2014-12-05 03:33:54 +0000
2541@@ -0,0 +1,92 @@
2542+<?xml version='1.0' encoding='UTF-8'?>
2543+<openerp>
2544+ <data noupdate="1">
2545+ <record model="xml.template" id="xml_template_U30" forcecreate="True">
2546+ <field name="name">U30 VAT declaration</field>
2547+ <field name="schema">http://www.bmf.gv.at/EGovernment/FINANZOnline/InformationenfrSoft_3165/Umsatzsteuervoranme_11373/ERKLAERUNGS_UEBERMITTLUNG_U30(2).xsd</field>
2548+ <field name="content" type="xml">
2549+ <!-- Umsatzsteuervoranmeldung ab 01/2009 - Stand: 11.01.2013-->
2550+ <ERKLAERUNGS_UEBERMITTLUNG>
2551+ <INFO_DATEN>
2552+ <ART_IDENTIFIKATIONSBEGRIFF text-eval="'FASTNR'"/>
2553+ <IDENTIFIKATIONSBEGRIFF text-eval="tax_nr"/>
2554+ <PAKET_NR text-eval="paket_nr"/>
2555+ <DATUM_ERSTELLUNG type="datum" text-eval="datum"/>
2556+ <UHRZEIT_ERSTELLUNG type="uhrzeit" text-eval="uhrzeit"/>
2557+ <ANZAHL_ERKLAERUNGEN text-eval="1"/>
2558+ </INFO_DATEN>
2559+ <ERKLAERUNG art="U30">
2560+ <SATZNR text-eval="paket_nr"/>
2561+ <ALLGEMEINE_DATEN>
2562+ <ANBRINGEN text-eval="'U30'"/>
2563+ <ZRVON type="jahrmonat" text-eval="beginn"/>
2564+ <ZRBIS type="jahrmonat" text-eval="ende"/>
2565+ <FASTNR text-eval="tax_nr"/>
2566+ <KUNDENINFO text-eval="period.company_id.name"/>
2567+ </ALLGEMEINE_DATEN>
2568+ <LIEFERUNGEN_LEISTUNGEN_EIGENVERBRAUCH>
2569+ <KZ000 type="kz" text-eval="kz(period, 'KZ000')"/>
2570+ <KZ001 type="kz" text-eval="kz(period, 'KZ001')"/>
2571+ <KZ021 type="kz" text-eval="kz(period, 'KZ021')"/>
2572+ <STEUERFREI>
2573+ <KZ011 type="kz" text-eval="kz(period, 'KZ011')"/>
2574+ <KZ012 type="kz" text-eval="kz(period, 'KZ012')"/>
2575+ <KZ015 type="kz" text-eval="kz(period, 'KZ015')"/>
2576+ <KZ017 type="kz" text-eval="kz(period, 'KZ017')"/>
2577+ <KZ018 type="kz" text-eval="kz(period, 'KZ018')"/>
2578+ <KZ019 type="kz" text-eval="kz(period, 'KZ019')"/>
2579+ <KZ016 type="kz" text-eval="kz(period, 'KZ016')"/>
2580+ <VST text-eval="vst"/>
2581+ <KZ020 type="kz" text-eval="kz(period, 'KZ020')"/>
2582+ </STEUERFREI>
2583+ <VERSTEUERT>
2584+ <KZ022 type="kz" text-eval="kz(period, 'KZ022')"/>
2585+ <KZ029 type="kz" text-eval="kz(period, 'KZ029')"/>
2586+ <KZ025 type="kz" text-eval="kz(period, 'KZ025')"/>
2587+ <KZ037 type="kz" text-eval="kz(period, 'KZ037')"/>
2588+ <KZ052 type="kz" text-eval="kz(period, 'KZ052')"/>
2589+ <KZ038 type="kz" text-eval="kz(period, 'KZ038')"/>
2590+ <KZ056 type="kz" text-eval="kz(period, 'KZ056')"/>
2591+ <KZ057 type="kz" text-eval="kz(period, 'KZ057')"/>
2592+ <KZ048 type="kz" text-eval="kz(period, 'KZ048')"/>
2593+ <KZ044 type="kz" text-eval="kz(period, 'KZ044')"/>
2594+ <KZ032 type="kz" text-eval="kz(period, 'KZ032')"/>
2595+ </VERSTEUERT>
2596+ </LIEFERUNGEN_LEISTUNGEN_EIGENVERBRAUCH>
2597+ <INNERGEMEINSCHAFTLICHE_ERWERBE>
2598+ <KZ070 type="kz" text-eval="kz(period, 'KZ070')"/>
2599+ <KZ071 type="kz" text-eval="kz(period, 'KZ071')"/>
2600+ <VERSTEUERT_IGE>
2601+ <KZ072 type="kz" text-eval="kz(period, 'KZ072')"/>
2602+ <KZ073 type="kz" text-eval="kz(period, 'KZ073')"/>
2603+ <KZ088 type="kz" text-eval="kz(period, 'KZ088')"/>
2604+ <KZ076 type="kz" text-eval="kz(period, 'KZ076')"/>
2605+ <KZ077 type="kz" text-eval="kz(period, 'KZ077')"/>
2606+ </VERSTEUERT_IGE>
2607+ </INNERGEMEINSCHAFTLICHE_ERWERBE>
2608+ <VORSTEUER>
2609+ <KZ060 type="kz" text-eval="kz(period, 'KZ060')"/>
2610+ <KZ061 type="kz" text-eval="kz(period, 'KZ061')"/>
2611+ <KZ083 type="kz" text-eval="kz(period, 'KZ083')"/>
2612+ <KZ065 type="kz" text-eval="kz(period, 'KZ065')"/>
2613+ <KZ066 type="kz" text-eval="kz(period, 'KZ066')"/>
2614+ <KZ082 type="kz" text-eval="kz(period, 'KZ082')"/>
2615+ <KZ087 type="kz" text-eval="kz(period, 'KZ087')"/>
2616+ <KZ089 type="kz" text-eval="kz(period, 'KZ089')"/>
2617+ <KZ064 type="kz" text-eval="kz(period, 'KZ064')"/>
2618+ <KZ062 type="kz" text-eval="kz(period, 'KZ062')"/>
2619+ <KZ063 type="kz" text-eval="kz(period, 'KZ063')"/>
2620+ <KZ067 type="kz" text-eval="kz(period, 'KZ067')"/>
2621+ <KZ027 type="kz" text-eval="kz(period, 'KZ027')"/>
2622+ <KZ028 type="kz" text-eval="kz(period, 'KZ028')"/>
2623+ <KZ090 type="kz" text-eval="kz(period, 'KZ090')"/>
2624+ <ARE text-eval="are"/>
2625+ <REPO text-eval="repo"/>
2626+ </VORSTEUER>
2627+ </ERKLAERUNG>
2628+ </ERKLAERUNGS_UEBERMITTLUNG>
2629+ </field>
2630+ </record>
2631+ </data>
2632+</openerp>
2633+
2634
2635=== added file 'account_period_U30_at/__init__.py'
2636--- account_period_U30_at/__init__.py 1970-01-01 00:00:00 +0000
2637+++ account_period_U30_at/__init__.py 2014-12-05 03:33:54 +0000
2638@@ -0,0 +1,35 @@
2639+# -*- coding: utf-8 -*-
2640+##############################################
2641+#
2642+# Swing Entwicklung betrieblicher Informationssysteme GmbH
2643+# (<http://www.swing-system.com>)
2644+# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
2645+# all rights reserved
2646+# 23-Jan-2013 (GK) created
2647+#
2648+# WARNING: This program as such is intended to be used by professional
2649+# programmers who take the whole responsibility of assessing all potential
2650+# consequences resulting from its eventual inadequacies and bugs.
2651+# End users who are looking for a ready-to-use solution with commercial
2652+# guarantees and support are strongly advised to contract a Free Software
2653+# Service Company.
2654+#
2655+# This program is Free Software; you can redistribute it and/or
2656+# modify it under the terms of the GNU General Public License
2657+# as published by the Free Software Foundation; either version 3
2658+# of the License, or (at your option) any later version.
2659+#
2660+# This program is distributed in the hope that it will be useful,
2661+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2662+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2663+# GNU General Public License for more details.
2664+#
2665+# You should have received a copy of the GNU General Public License
2666+# along with this program; if not, see <http://www.gnu.org/licenses/> or
2667+# write to the Free Software Foundation, Inc.,
2668+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2669+#
2670+###############################################
2671+import account_period
2672+import installer
2673+
2674
2675=== added file 'account_period_U30_at/__openerp__.py'
2676--- account_period_U30_at/__openerp__.py 1970-01-01 00:00:00 +0000
2677+++ account_period_U30_at/__openerp__.py 2014-12-05 03:33:54 +0000
2678@@ -0,0 +1,56 @@
2679+# -*- coding: utf-8 -*-
2680+##############################################
2681+#
2682+# Swing Entwicklung betrieblicher Informationssysteme GmbH
2683+# (<http://www.swing-system.com>)
2684+# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
2685+# all rights reserved
2686+# 23-Jan-2013 (GK) created
2687+#
2688+# WARNING: This program as such is intended to be used by professional
2689+# programmers who take the whole responsibility of assessing all potential
2690+# consequences resulting from its eventual inadequacies and bugs.
2691+# End users who are looking for a ready-to-use solution with commercial
2692+# guarantees and support are strongly advised to contract a Free Software
2693+# Service Company.
2694+#
2695+# This program is Free Software; you can redistribute it and/or
2696+# modify it under the terms of the GNU General Public License
2697+# as published by the Free Software Foundation; either version 3
2698+# of the License, or (at your option) any later version.
2699+#
2700+# This program is distributed in the hope that it will be useful,
2701+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2702+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2703+# GNU General Public License for more details.
2704+#
2705+# You should have received a copy of the GNU General Public License
2706+# along with this program; if not, see <http://www.gnu.org/licenses/> or
2707+# write to the Free Software Foundation, Inc.,
2708+# 59 Temple Place - Suite 330, Boston, MA 02111-1.17, USA.
2709+#
2710+###############################################
2711+{ "name" : "Austrian VAT declaration"
2712+, "version" : "1.0"
2713+, "author" : "Swing Entwicklung betrieblicher Informationssysteme GmbH"
2714+, "website" : "http://www.swing-system.com"
2715+, "description" :
2716+"""
2717+U30 is a XML-type VAT declaration for the Austrian governement.
2718+
2719+This module generates a XML-file per account period attaches it to the period.
2720+
2721+"""
2722+, "category" : "Accounting & Finance"
2723+, "depends" :
2724+ [ "account"
2725+ , "xml_template"
2726+ ]
2727+, "init_xml" : ["U30.xml"]
2728+, "demo_xml" : []
2729+, "update_xml" : ["installer_view.xml"]
2730+, "test" : []
2731+, "auto_install": False
2732+, "installable" : True
2733+}
2734+
2735
2736=== added file 'account_period_U30_at/account_period.py'
2737--- account_period_U30_at/account_period.py 1970-01-01 00:00:00 +0000
2738+++ account_period_U30_at/account_period.py 2014-12-05 03:33:54 +0000
2739@@ -0,0 +1,92 @@
2740+# -*- coding: utf-8 -*-
2741+##############################################
2742+#
2743+# Swing Entwicklung betrieblicher Informationssysteme GmbH
2744+# (<http://www.swing-system.com>)
2745+# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
2746+# all rights reserved
2747+# 23-Jan-2013 (GK) created
2748+#
2749+# WARNING: This program as such is intended to be used by professional
2750+# programmers who take the whole responsibility of assessing all potential
2751+# consequences resulting from its eventual inadequacies and bugs.
2752+# End users who are looking for a ready-to-use solution with commercial
2753+# guarantees and support are strongly advised to contract a Free Software
2754+# Service Company.
2755+#
2756+# This program is Free Software; you can redistribute it and/or
2757+# modify it under the terms of the GNU General Public License
2758+# as published by the Free Software Foundation; either version 3
2759+# of the License, or (at your option) any later version.
2760+#
2761+# This program is distributed in the hope that it will be useful,
2762+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2763+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2764+# GNU General Public License for more details.
2765+#
2766+# You should have received a copy of the GNU General Public License
2767+# along with this program; if not, see <http://www.gnu.org/licenses/> or
2768+# write to the Free Software Foundation, Inc.,
2769+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2770+#
2771+###############################################
2772+from osv import fields, osv
2773+import time
2774+from tools.translate import _
2775+
2776+class account_period(osv.osv) :
2777+ _inherit = "account.period"
2778+
2779+ def kz(self, period, code) :
2780+ cr = self.cr
2781+ uid = self.uid
2782+ aml_obj = self.pool.get("account.move.line")
2783+ atc_obj = self.pool.get("account.tax.code")
2784+ atc_ids = atc_obj.search(cr, uid, [("code", "=", code.replace("KZ", ""))])
2785+ aml_ids = aml_obj.search(cr, uid, [("period_id", "=", period.id), ("tax_code_id", "in", tuple(atc_ids))]) # vereinbarte entgelte, hängt von Firmenart ab, currency_id
2786+ if not aml_ids :
2787+ return "0.00"
2788+ else :
2789+ return "%f0.2" % sum(l.tax_amount for l in aml_obj.browse(cr, uid, aml_ids))
2790+ # end def kz
2791+
2792+ def generate_u30(self, cr , uid, ids, context=None):
2793+ self.cr = cr
2794+ self.uid = uid
2795+ for period in self.browse(cr, uid, ids) :
2796+ template_obj = self.pool.get("xml.template")
2797+ template_ids = template_obj.search(cr, uid, [("name", "=", "U30 VAT declaration")])
2798+ if not template_ids :
2799+ raise osv.except_osv \
2800+ ( _("Customization Error !")
2801+ , _("No Template '%s' defined") % template_name
2802+ )
2803+ template_id = template_ids[0]
2804+ xml = template_obj.generate_xml \
2805+ (cr, uid
2806+ , template_id
2807+ , period = period
2808+ , paket_nr = time.strftime("%y%m%d%H")
2809+ , datum = time.strftime("%Y-%m-%d")
2810+ , uhrzeit = time.strftime("%H:%M:%S")
2811+ , beginn = period.date_start[0:7]
2812+ , ende = period.date_stop[0:7]
2813+ , vst = "000"
2814+ , are = "J"
2815+ , repo = "J"
2816+ , kz = self.kz
2817+ , tax_nr = "123456789"
2818+ )
2819+ template_obj.attach_xml \
2820+ ( cr, uid
2821+ , template_id
2822+ , attach_to = period
2823+ , xml = xml
2824+ , name = period.code + "_U30"
2825+ , fname = period.code + "_U30" + ".xml"
2826+ , description = "U30 VAT declaration for period"
2827+ , context = None
2828+ )
2829+ # end def generate_u30
2830+# end class account_period
2831+account_period()
2832
2833=== added directory 'account_period_U30_at/i18n'
2834=== added file 'account_period_U30_at/installer.py'
2835--- account_period_U30_at/installer.py 1970-01-01 00:00:00 +0000
2836+++ account_period_U30_at/installer.py 2014-12-05 03:33:54 +0000
2837@@ -0,0 +1,51 @@
2838+# -*- coding: utf-8 -*-
2839+##############################################
2840+#
2841+# Swing Entwicklung betrieblicher Informationssysteme GmbH
2842+# (<http://www.swing-system.com>)
2843+# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
2844+# all rights reserved
2845+# 23-Jan-2013 (GK) created
2846+#
2847+# WARNING: This program as such is intended to be used by professional
2848+# programmers who take the whole responsibility of assessing all potential
2849+# consequences resulting from its eventual inadequacies and bugs.
2850+# End users who are looking for a ready-to-use solution with commercial
2851+# guarantees and support are strongly advised to contract a Free Software
2852+# Service Company.
2853+#
2854+# This program is Free Software; you can redistribute it and/or
2855+# modify it under the terms of the GNU General Public License
2856+# as published by the Free Software Foundation; either version 3
2857+# of the License, or (at your option) any later version.
2858+#
2859+# This program is distributed in the hope that it will be useful,
2860+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2861+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2862+# GNU General Public License for more details.
2863+#
2864+# You should have received a copy of the GNU General Public License
2865+# along with this program; if not, see <http://www.gnu.org/licenses/> or
2866+# write to the Free Software Foundation, Inc.,
2867+# 59 Temple Place - Suite 330, Boston, MA 02111-1.17, USA.
2868+#
2869+###############################################
2870+from osv import fields, osv
2871+
2872+class period_u30_installer(osv.osv_memory):
2873+ _name = 'account.period.u30.installer'
2874+ _inherit = 'res.config.installer'
2875+
2876+ def execute(self, cr, uid, ids, context=None):
2877+ self.execute_simple(cr, uid, ids, context)
2878+ super(period_u30_installer, self).execute(cr, uid, ids, context=context)
2879+ # end def execute
2880+
2881+ def execute_simple(self, cr, uid, ids, context=None) :
2882+ period_obj = self.pool.get('account.period')
2883+ period_ids = period_obj.search(cr, uid, [])
2884+ period_obj.generate_u30(cr, uid, period_ids, context=context)
2885+ # end def execute_simple
2886+# end class period_u30_installer
2887+period_u30_installer()
2888+
2889
2890=== added file 'account_period_U30_at/installer_view.xml'
2891--- account_period_U30_at/installer_view.xml 1970-01-01 00:00:00 +0000
2892+++ account_period_U30_at/installer_view.xml 2014-12-05 03:33:54 +0000
2893@@ -0,0 +1,34 @@
2894+<openerp>
2895+ <data>
2896+ <record id="account_period_u30_installer_form" model="ir.ui.view">
2897+ <field name="name">account.period.u30.installer.form</field>
2898+ <field name="model">account.period.u30.installer</field>
2899+ <field name="type">form</field>
2900+ <field name="inherit_id" ref="base.res_config_installer"/>
2901+ <field name="arch" type="xml">
2902+ <data>
2903+ <form position="attributes">
2904+ <attribute name="string">Add U30 VAT declaration to account period</attribute>
2905+ </form>
2906+ <separator string="title" position="attributes">
2907+ <attribute name="string">Add U30 VAT decalaration to all account periods</attribute>
2908+ </separator>
2909+ </data>
2910+ </field>
2911+ </record>
2912+ <record id="action_account_period_u30_installer" model="ir.actions.act_window">
2913+ <field name="name">Add U30 VAT declaration to account period</field>
2914+ <field name="type">ir.actions.act_window</field>
2915+ <field name="res_model">account.period.u30.installer</field>
2916+ <field name="view_id" ref="account_period_u30_installer_form"/>
2917+ <field name="view_type">form</field>
2918+ <field name="view_mode">form</field>
2919+ <field name="target">new</field>
2920+ </record>
2921+ <record id="account_period_U30_installer_todo" model="ir.actions.todo">
2922+ <field name="action_id" ref="action_account_period_u30_installer"/>
2923+ <field name="type">automatic</field>
2924+ </record>
2925+ </data>
2926+</openerp>
2927+
2928
2929=== added directory 'account_reconcile_constraint'
2930=== added file 'account_reconcile_constraint/__init__.py'
2931--- account_reconcile_constraint/__init__.py 1970-01-01 00:00:00 +0000
2932+++ account_reconcile_constraint/__init__.py 2014-12-05 03:33:54 +0000
2933@@ -0,0 +1,24 @@
2934+# -*- coding: utf-8 -*-
2935+##############################################################################
2936+#
2937+# OpenERP, Open Source Management Solution
2938+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
2939+#
2940+# This program is free software: you can redistribute it and/or modify
2941+# it under the terms of the GNU Affero General Public License as
2942+# published by the Free Software Foundation, either version 3 of the
2943+# License, or (at your option) any later version.
2944+#
2945+# This program is distributed in the hope that it will be useful,
2946+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2947+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2948+# GNU Affero General Public License for more details.
2949+#
2950+# You should have received a copy of the GNU Affero General Public License
2951+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2952+#
2953+##############################################################################
2954+
2955+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2956+
2957+import account_move_line
2958
2959=== added file 'account_reconcile_constraint/__openerp__.py'
2960--- account_reconcile_constraint/__openerp__.py 1970-01-01 00:00:00 +0000
2961+++ account_reconcile_constraint/__openerp__.py 2014-12-05 03:33:54 +0000
2962@@ -0,0 +1,41 @@
2963+# -*- coding: utf-8 -*-
2964+##############################################################################
2965+#
2966+# OpenERP, Open Source Management Solution
2967+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
2968+#
2969+# This program is free software: you can redistribute it and/or modify
2970+# it under the terms of the GNU Affero General Public License as
2971+# published by the Free Software Foundation, either version 3 of the
2972+# License, or (at your option) any later version.
2973+#
2974+# This program is distributed in the hope that it will be useful,
2975+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2976+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2977+# GNU Affero General Public License for more details.
2978+#
2979+# You should have received a copy of the GNU Affero General Public License
2980+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2981+#
2982+##############################################################################
2983+
2984+{
2985+ "name" : "Reconcile reconcile accounts",
2986+ "version" : "1.1",
2987+ "author" : "Camptocamp SA",
2988+ "category": 'Accounting & Finance',
2989+ 'complexity': "normal",
2990+ "description": """
2991+Allow reconciliation only for accounts marked to be reconciled
2992+
2993+ """,
2994+ 'website': 'http://www.camptocamp.com',
2995+ "depends" : ["account"],
2996+ 'init_xml': [],
2997+ 'update_xml': [],
2998+ 'demo_xml': [],
2999+ 'installable': True,
3000+ 'auto_install': False,
3001+}
3002+
3003+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3004
3005=== added file 'account_reconcile_constraint/account_move_line.py'
3006--- account_reconcile_constraint/account_move_line.py 1970-01-01 00:00:00 +0000
3007+++ account_reconcile_constraint/account_move_line.py 2014-12-05 03:33:54 +0000
3008@@ -0,0 +1,61 @@
3009+# -*- coding: utf-8 -*-
3010+##############################################################################
3011+#
3012+# OpenERP, Open Source Management Solution
3013+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
3014+# Copyright (C) 2012-2012 Camptocamp Austria (<http://www.camptocamp.at>)
3015+#
3016+# This program is free software: you can redistribute it and/or modify
3017+# it under the terms of the GNU Affero General Public License as
3018+# published by the Free Software Foundation, either version 3 of the
3019+# License, or (at your option) any later version.
3020+#
3021+# This program is distributed in the hope that it will be useful,
3022+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3023+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3024+# GNU Affero General Public License for more details.
3025+#
3026+# You should have received a copy of the GNU Affero General Public License
3027+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3028+#
3029+##############################################################################
3030+
3031+# FIXME remove logger lines or change to debug
3032+
3033+from osv import fields, osv
3034+from tools.translate import _
3035+import logging
3036+
3037+class account_move_line(osv.osv):
3038+ _inherit = 'account.move.line'
3039+ _logger = logging.getLogger(__name__)
3040+
3041+ def _reconcile(self, cr, uid, ids, context=None):
3042+ for l in self.browse(cr, uid, ids, context):
3043+ r = True
3044+ if l.reconcile_id and not l.account_id.reconcile:
3045+ raise osv.except_osv("Reconcile Error", 'Reconcile id: "%s" Account Name: %s' % (l.reconcile_id.name, l.account_id.name))
3046+ r = False
3047+ return r
3048+
3049+ def _new_constraints(self, cr, uid, ids, context=None):
3050+ self._logger.debug('constraints start')
3051+ model_obj = self.pool.get('ir.model')
3052+ model_ids = model_obj.search(cr, uid, [('name','=','account.move.line')])
3053+ constraints = []
3054+ for m in model_obj.browse(cr, uid, model_ids):
3055+ if m._constraints:
3056+ constraints = m._constraints
3057+ self._logger.debug('constraints %s', constraints)
3058+ s = "(_reconcile,_('You must not reconcile moves on account '),['reconcile_id'])"
3059+ self._logger.debug('constraints string %s', s)
3060+ constraints.append(s)
3061+ self._logger.info('new constraints %s', constraints)
3062+ return constraints
3063+
3064+# FIXME
3065+# _constraints = _new_constraints
3066+ _constraints = [(_reconcile,_('You must not reconcile moves on account'),['reconcile_id'])]
3067+
3068+
3069+account_move_line()
3070
3071=== modified file 'analytic_user_function_project/hr_timesheet.py'
3072--- analytic_user_function_project/hr_timesheet.py 2011-12-30 08:06:54 +0000
3073+++ analytic_user_function_project/hr_timesheet.py 2014-12-05 03:33:54 +0000
3074@@ -50,13 +50,13 @@
3075 cr.execute("""
3076 update account_analytic_line a set product_id = (select product_id from analytic_user_funct_grid where user_id = a.user_id and account_id = a.account_id)
3077 where invoice_id is null and to_invoice is not null and product_id is not null
3078- and id in (select id from account_analytic_line where invoice_id is null and to_invoice is not null and product_id is not null )
3079+ --and id in (select id from account_analytic_line where invoice_id is null and to_invoice is not null and product_id is not null )
3080 and account_id in (select account_id from analytic_user_funct_grid);
3081 """)
3082 cr.execute("""
3083 update account_analytic_line a set amount = (select -a.unit_amount * standard_price from product_product p, product_template t where p.id = a.product_id and t.id = p.product_tmpl_id)
3084 where invoice_id is null and to_invoice is not null and product_id is not null and unit_amount is not null
3085- and id in (select id from account_analytic_line where invoice_id is null and to_invoice is not null and product_id is not null )
3086+ --and id in (select id from account_analytic_line where invoice_id is null and to_invoice is not null and product_id is not null )
3087 and account_id in (select account_id from analytic_user_funct_grid);
3088 """)
3089
3090
3091=== modified file 'base_ordered/ordered.py'
3092--- base_ordered/ordered.py 2012-12-20 15:30:00 +0000
3093+++ base_ordered/ordered.py 2014-12-05 03:33:54 +0000
3094@@ -54,3 +54,9 @@
3095
3096 account_invoice()
3097
3098+class account_fiscalyear(osv.osv):
3099+ _inherit = "account.fiscalyear"
3100+ _order = 'date_start desc, id desc'
3101+
3102+account_fiscalyear()
3103+
3104
3105=== modified file 'base_partner_contact/partner.py'
3106--- base_partner_contact/partner.py 2012-10-14 17:12:13 +0000
3107+++ base_partner_contact/partner.py 2014-12-05 03:33:54 +0000
3108@@ -47,28 +47,35 @@
3109 # this is for partner - alphabetical address book - sort
3110 res = {}
3111 for partner in self.browse(cr, uid, ids, context):
3112+ if partner.name and not partner.last_name:
3113+ l_name = partner.name
3114 if partner.is_company:
3115- name = partner.last_name
3116+ name = partner.last_name or l_name
3117 else:
3118 first_name = partner.first_name or '' + ' '
3119 middle_name = partner.middle_name and ' ' + partner.middle_name + ' ' or ''
3120- last_name = partner.last_name+', '
3121+ last_name = partner.last_name or l_name +', '
3122 title_prefix = ' '+ self._get_title_name(cr,uid, partner.title_prefix_id) + ' '
3123 title_postfix = ' ' + self._get_title_name(cr,uid, partner.title_postfix_id)
3124
3125 name = last_name + first_name + middle_name + title_prefix + title_postfix
3126 if name == last_name:
3127 name = replace(name, ', ', '')
3128-
3129- res[partner.id] = name.replace(' ',' ').rstrip(' ').lstrip(' ') # to avoid double spaces
3130+ if name:
3131+ res[partner.id] = name.replace(' ',' ').rstrip(' ').lstrip(' ') # to avoid double spaces
3132+ else:
3133+ res[partner.id] = ''
3134+
3135 return res
3136
3137 def _compose_full_name(self, cr, uid, ids, name, arg, context=None):
3138 # this is for Address
3139 res = {}
3140 for partner in self.browse(cr, uid, ids, context):
3141+ if partner.name and not partner.last_name:
3142+ l_name = partner.name
3143 if partner.is_company:
3144- name = partner.last_name
3145+ name = partner.last_name or l_name
3146 else:
3147 salutation = partner.salutation_id and partner.salutation_id.name_address or ''
3148 first_name = partner.first_name or ''
3149@@ -127,6 +134,15 @@
3150 set last_name = name
3151 where last_name is null;""")
3152
3153+ def create(self, cr, uid, vals, context=None):
3154+ if vals.get('name') and not vals.get('last_name') or ( vals.get('last_name') and not vals['last_name']):
3155+ vals['last_name'] = vals['name']
3156+ if vals.get('last_name') and not vals.get('name'):
3157+ vals['name'] = vals['last_name']
3158+ res = super(res_partner, self).create(cr, uid, vals, context)
3159+ return res
3160+
3161+
3162 # def onchange_name(self, cr, uid, id, is_company = False, name='', first_name='', last_name='', middle_name='', title_prefix_id='', title_postfix_id='', context={}):
3163 # vals = {}
3164 # vals['is_company'] = is_company
3165
3166=== added directory 'base_vat_check'
3167=== added file 'base_vat_check/__init__.py'
3168--- base_vat_check/__init__.py 1970-01-01 00:00:00 +0000
3169+++ base_vat_check/__init__.py 2014-12-05 03:33:54 +0000
3170@@ -0,0 +1,25 @@
3171+# -*- coding: utf-8 -*-
3172+##############################################################################
3173+#
3174+# OpenERP, Open Source Management Solution
3175+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
3176+# Copyright (C) 2010-2012 Camptocamp Austria (<http://www.camptocamp.at>)
3177+#
3178+# This program is free software: you can redistribute it and/or modify
3179+# it under the terms of the GNU Affero General Public License as
3180+# published by the Free Software Foundation, either version 3 of the
3181+# License, or (at your option) any later version.
3182+#
3183+# This program is distributed in the hope that it will be useful,
3184+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3185+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3186+# GNU Affero General Public License for more details.
3187+#
3188+# You should have received a copy of the GNU Affero General Public License
3189+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3190+#
3191+##############################################################################
3192+import base_vat
3193+import installer
3194+
3195+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3196
3197=== added file 'base_vat_check/__openerp__.py'
3198--- base_vat_check/__openerp__.py 1970-01-01 00:00:00 +0000
3199+++ base_vat_check/__openerp__.py 2014-12-05 03:33:54 +0000
3200@@ -0,0 +1,40 @@
3201+# -*- coding: utf-8 -*-
3202+##############################################################################
3203+#
3204+# OpenERP, Open Source Management Solution
3205+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
3206+# Copyright (C) 2010-2012 Camptocamp Austria (<http://www.camptocamp.at>)
3207+#
3208+# This program is free software: you can redistribute it and/or modify
3209+# it under the terms of the GNU Affero General Public License as
3210+# published by the Free Software Foundation, either version 3 of the
3211+# License, or (at your option) any later version.
3212+#
3213+# This program is distributed in the hope that it will be useful,
3214+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3215+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3216+# GNU Affero General Public License for more details.
3217+#
3218+# You should have received a copy of the GNU Affero General Public License
3219+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3220+#
3221+##############################################################################
3222+{ 'name' : 'VAT check enhanced'
3223+, 'version' : '1.0'
3224+, 'category' : 'Base'
3225+, 'description' : """
3226+This module enhances the VAT check to comply to accounting standards
3227+
3228+* save date and the method (vies/checksum) used for checking
3229+* automatically save the company name associated with the VAT-ID
3230+** at least some German VAT numbers return '---' as company name !!!
3231+
3232+"""
3233+, 'author' : 'Camptocamp Austria'
3234+, 'depends' : [ 'base_vat' ]
3235+, 'update_xml' : ['base_vat_view.xml', 'installer_view.xml']
3236+, 'demo_xml' : []
3237+, 'installable' : True
3238+, 'active' : False
3239+}
3240+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3241
3242=== added file 'base_vat_check/base_vat.py'
3243--- base_vat_check/base_vat.py 1970-01-01 00:00:00 +0000
3244+++ base_vat_check/base_vat.py 2014-12-05 03:33:54 +0000
3245@@ -0,0 +1,107 @@
3246+# -*- coding: utf-8 -*-
3247+##############################################################################
3248+#
3249+# OpenERP, Open Source Management Solution
3250+# Copyright (C) 2004-2012 OpenERP SA (<http://openerp.com>)
3251+#
3252+# This program is free software: you can redistribute it and/or modify
3253+# it under the terms of the GNU General Public License as published by
3254+# the Free Software Foundation, either version 3 of the License, or
3255+# (at your option) any later version.
3256+#
3257+# This program is distributed in the hope that it will be useful,
3258+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3259+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3260+# GNU General Public License for more details.
3261+#
3262+# You should have received a copy of the GNU General Public License
3263+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3264+#
3265+##############################################################################
3266+from osv import osv, fields
3267+from tools.translate import _
3268+import time
3269+from urllib import getproxies
3270+
3271+class res_partner(osv.osv):
3272+ _inherit = 'res.partner'
3273+ _sel = [('vies','VIES'),('simple','Simple'),('none','Not Checked')]
3274+ _columns = \
3275+ { 'vat_subjected' : fields.boolean('VAT Legal Statement', help="Check this box if the partner is subjected to the VAT. It will be used for the VAT legal statement.")
3276+ , 'vat_method' : fields.selection(_sel, 'VAT Method', readonly=True, help="""'VIES' checks using http://ec.europa.eu/taxation_customs/vies, 'Simple' calculates checksum for specific countries""")
3277+ , 'vat_check_date' : fields.datetime('VAT Check Date', readonly=True)
3278+ , 'vat_check_name' : fields.char('VAT Check Name', size=256, readonly=True)
3279+ , 'vat_check_address' : fields.text('VAT Check Address', readonly=True)
3280+ }
3281+
3282+ def check_vat(self, cr, uid, ids, context=None):
3283+ res = super(res_partner, self).check_vat(cr, uid, ids, context=None)
3284+ self.check_vat_ext(cr, uid, ids, context=None)
3285+ return res
3286+
3287+ def check_vat_ext(self, cr, uid, ids, context):
3288+ if not context:
3289+ context = {}
3290+ vat = ''
3291+ if context.get('vat'):
3292+ if context['vat'] != 'none':
3293+ vat = context['vat'].replace(" ","")
3294+ else:
3295+ for partner in self.browse(cr, uid, ids, context):
3296+ if partner.vat:
3297+ vat = partner.vat.replace(" ","")
3298+ method = 'none'
3299+ date_now = time.strftime('%Y-%m-%d %H:%M:%S')
3300+ name = ""
3301+ address = ""
3302+ if vat:
3303+ vat = vat.replace(' ','')
3304+ vat_mod = False
3305+ user_company = self.pool.get('res.users').browse(cr, uid, uid).company_id
3306+ if user_company.vat_check_vies:
3307+ try:
3308+ from suds.client import Client
3309+ vat_mod = True
3310+ except:
3311+ raise osv.except_osv(_('Error'), _('import module "suds" failed - check VIES needs this module'))
3312+
3313+ check = False
3314+ if vat_mod:
3315+ try:
3316+ client = Client("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl", proxy=getproxies())
3317+ res = client.service.checkVat(countryCode=vat[:2], vatNumber=vat[2:])
3318+
3319+ check = bool(res["valid"])
3320+ if check :
3321+ #date_now = res["requestDate"]
3322+ name = res["name"]
3323+ address = res["address"]
3324+ method = 'vies'
3325+ else:
3326+ raise osv.except_osv(_('VIES Error'), _('VIES check failed "%s"') % vat)
3327+ except:
3328+ raise osv.except_osv(_('VIES Error'), _('General Error: connection timeout for "%s"') % vat)
3329+
3330+ else:
3331+ vat_country, vat_number = self._split_vat(vat)
3332+ if self.simple_vat_check(cr, uid, vat_country, vat_number, context=context):
3333+ method = 'simple'
3334+ else:
3335+ raise osv.except_osv(_('Error'), _('simple VAT check digit failed'))
3336+ vals = {'vat_method': method, 'vat_check_date': date_now, 'vat_check_name' : name, 'vat_check_address' : address, 'vat' : vat}
3337+ self.write(cr, uid, ids, vals)
3338+ return vals
3339+
3340+ def vat_change(self, cr, uid, ids, value, context=None):
3341+ res = super(res_partner, self).vat_change(cr, uid, ids, value, context=None)
3342+
3343+ if not context:
3344+ context = {}
3345+ context['vat'] = value or 'none'
3346+ vals = self.check_vat_ext(cr, uid, ids, context)
3347+ res['value'].update(vals)
3348+ return res
3349+
3350+res_partner()
3351+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3352+
3353
3354=== added file 'base_vat_check/base_vat_view.xml'
3355--- base_vat_check/base_vat_view.xml 1970-01-01 00:00:00 +0000
3356+++ base_vat_check/base_vat_view.xml 2014-12-05 03:33:54 +0000
3357@@ -0,0 +1,21 @@
3358+<?xml version="1.0" encoding="utf-8"?>
3359+<openerp>
3360+ <data>
3361+ <record id="view_partner_vat_check_form" model="ir.ui.view">
3362+ <field name="name">res.partner.vat.check.inherit</field>
3363+ <field name="model">res.partner</field>
3364+ <field name="inherit_id" ref="base_vat.view_partner_form"/>
3365+ <field name="arch" type="xml">
3366+ <field name="vat_subjected" position="after">
3367+ <field name="vat_method"/>
3368+ <field name="vat_check_date"/>
3369+ <newline/>
3370+ <field name="vat_check_name" colspan="4"/>
3371+ <newline/>
3372+ <field name="vat_check_address" colspan="4"/>
3373+ </field>
3374+ </field>
3375+ </record>
3376+ </data>
3377+</openerp>
3378+
3379
3380=== added directory 'base_vat_check/i18n'
3381=== added file 'base_vat_check/i18n/base_vat_check.pot'
3382--- base_vat_check/i18n/base_vat_check.pot 1970-01-01 00:00:00 +0000
3383+++ base_vat_check/i18n/base_vat_check.pot 2014-12-05 03:33:54 +0000
3384@@ -0,0 +1,48 @@
3385+# Translation of OpenERP Server.
3386+# This file contains the translation of the following modules:
3387+# * base_vat_check
3388+#
3389+msgid ""
3390+msgstr ""
3391+"Project-Id-Version: OpenERP Server 6.1\n"
3392+"Report-Msgid-Bugs-To: \n"
3393+"POT-Creation-Date: 2012-11-16 21:45+0000\n"
3394+"PO-Revision-Date: 2012-11-16 21:45+0000\n"
3395+"Last-Translator: <>\n"
3396+"Language-Team: \n"
3397+"MIME-Version: 1.0\n"
3398+"Content-Type: text/plain; charset=UTF-8\n"
3399+"Content-Transfer-Encoding: \n"
3400+"Plural-Forms: \n"
3401+
3402+#. module: base_vat_check
3403+#: selection:res.partner,vat_method:0
3404+msgid "Simple"
3405+msgstr ""
3406+
3407+#. module: base_vat_check
3408+#: field:res.partner,vat_method:0
3409+msgid "VAT Method"
3410+msgstr ""
3411+
3412+#. module: base_vat_check
3413+#: field:res.partner,vat_check_date:0
3414+msgid "VAT Check Date"
3415+msgstr ""
3416+
3417+#. module: base_vat_check
3418+#: help:res.partner,vat_method:0
3419+msgid ""
3420+"'VIES' checks using http://ec.europa.eu/taxation_customs/vies, 'Simple' "
3421+"calculates checksum for specific countries"
3422+msgstr ""
3423+
3424+#. module: base_vat_check
3425+#: model:ir.model,name:base_vat_check.model_res_partner
3426+msgid "Partner"
3427+msgstr ""
3428+
3429+#. module: base_vat_check
3430+#: selection:res.partner,vat_method:0
3431+msgid "VIES"
3432+msgstr ""
3433
3434=== added file 'base_vat_check/i18n/de.po'
3435--- base_vat_check/i18n/de.po 1970-01-01 00:00:00 +0000
3436+++ base_vat_check/i18n/de.po 2014-12-05 03:33:54 +0000
3437@@ -0,0 +1,47 @@
3438+# Translation of OpenERP Server.
3439+# This file contains the translation of the following modules:
3440+# * base_vat_check
3441+#
3442+msgid ""
3443+msgstr ""
3444+"Project-Id-Version: OpenERP Server 6.1\n"
3445+"Report-Msgid-Bugs-To: \n"
3446+"POT-Creation-Date: 2012-11-16 21:45+0000\n"
3447+"PO-Revision-Date: 2012-11-16 21:45+0000\n"
3448+"Last-Translator: <>\n"
3449+"Language-Team: \n"
3450+"MIME-Version: 1.0\n"
3451+"Content-Type: text/plain; charset=UTF-8\n"
3452+"Content-Transfer-Encoding: \n"
3453+"Plural-Forms: \n"
3454+
3455+#. module: base_vat_check
3456+#: selection:res.partner,vat_method:0
3457+msgid "Simple"
3458+msgstr "Simple"
3459+
3460+#. module: base_vat_check
3461+#: field:res.partner,vat_method:0
3462+msgid "VAT Method"
3463+msgstr "UID Methode"
3464+
3465+#. module: base_vat_check
3466+#: field:res.partner,vat_check_date:0
3467+msgid "VAT Check Date"
3468+msgstr "UID Prüfdatum"
3469+
3470+#. module: base_vat_check
3471+#: help:res.partner,vat_method:0
3472+msgid "'VIES' checks using http://ec.europa.eu/taxation_customs/vies, 'Simple' calculates checksum for specific countries"
3473+msgstr "'VIES' prüft mit http://ec.europa.eu/taxation_customs/vies, 'Simple' berechnet die Prüfziffer für einige Länder"
3474+
3475+#. module: base_vat_check
3476+#: model:ir.model,name:base_vat_check.model_res_partner
3477+msgid "Partner"
3478+msgstr "Partner"
3479+
3480+#. module: base_vat_check
3481+#: selection:res.partner,vat_method:0
3482+msgid "VIES"
3483+msgstr "VIES"
3484+
3485
3486=== added file 'base_vat_check/installer.py'
3487--- base_vat_check/installer.py 1970-01-01 00:00:00 +0000
3488+++ base_vat_check/installer.py 2014-12-05 03:33:54 +0000
3489@@ -0,0 +1,50 @@
3490+# -*- coding: utf-8 -*-
3491+##############################################
3492+#
3493+# Swing Entwicklung betrieblicher Informationssysteme GmbH
3494+# (<http://www.swing-system.com>)
3495+# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
3496+# all rights reserved
3497+# 22-JUN-2013 (GK) created
3498+#
3499+# WARNING: This program as such is intended to be used by professional
3500+# programmers who take the whole responsibility of assessing all potential
3501+# consequences resulting from its eventual inadequacies and bugs.
3502+# End users who are looking for a ready-to-use solution with commercial
3503+# guarantees and support are strongly advised to contract a Free Software
3504+# Service Company.
3505+#
3506+# This program is Free Software; you can redistribute it and/or
3507+# modify it under the terms of the GNU General Public License
3508+# as published by the Free Software Foundation; either version 3
3509+# of the License, or (at your option) any later version.
3510+#
3511+# This program is distributed in the hope that it will be useful,
3512+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3513+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3514+# GNU General Public License for more details.
3515+#
3516+# You should have received a copy of the GNU General Public License
3517+# along with this program; if not, see <http://www.gnu.org/licenses/> or
3518+# write to the Free Software Foundation, Inc.,
3519+# 59 Temple Place - Suite 330, Boston, MA 02111-1.17, USA.
3520+#
3521+###############################################
3522+from osv import fields, osv
3523+
3524+class base_vat_installer(osv.osv_memory):
3525+ _name = 'res.partner.base_vat.installer'
3526+ _inherit = 'res.config.installer'
3527+
3528+ def execute(self, cr, uid, ids, context=None):
3529+ self.execute_simple(cr, uid, ids, context)
3530+ super(base_vat_installer, self).execute(cr, uid, ids, context=context)
3531+ # end def execute
3532+
3533+ def execute_simple(self, cr, uid, ids, context=None) :
3534+ partner_obj = self.pool.get('res.partner')
3535+ for partner in partner_obj.browse(cr, uid, partner_obj.search(cr, uid, [("vat", "!=", None)])) :
3536+ partner_obj.check_vat_ext(cr, uid, [partner.id], context)
3537+ # end def execute_simple
3538+base_vat_installer()
3539+
3540
3541=== added file 'base_vat_check/installer_view.xml'
3542--- base_vat_check/installer_view.xml 1970-01-01 00:00:00 +0000
3543+++ base_vat_check/installer_view.xml 2014-12-05 03:33:54 +0000
3544@@ -0,0 +1,34 @@
3545+<openerp>
3546+ <data>
3547+ <record id="base_vat_installer_form" model="ir.ui.view">
3548+ <field name="name">res.partner.base_vat.installer.form</field>
3549+ <field name="model">res.partner.base_vat.installer</field>
3550+ <field name="type">form</field>
3551+ <field name="inherit_id" ref="base.res_config_installer"/>
3552+ <field name="arch" type="xml">
3553+ <data>
3554+ <form position="attributes">
3555+ <attribute name="string">Checking all VATs with VIES</attribute>
3556+ </form>
3557+ <separator string="title" position="attributes">
3558+ <attribute name="string">Checking all VATs with VIES (please be patient)</attribute>
3559+ </separator>
3560+ </data>
3561+ </field>
3562+ </record>
3563+ <record id="action_base_vat_installer" model="ir.actions.act_window">
3564+ <field name="name">Checking all VATs with VIES</field>
3565+ <field name="type">ir.actions.act_window</field>
3566+ <field name="res_model">res.partner.base_vat.installer</field>
3567+ <field name="view_id" ref="base_vat_installer_form"/>
3568+ <field name="view_type">form</field>
3569+ <field name="view_mode">form</field>
3570+ <field name="target">new</field>
3571+ </record>
3572+ <record id="base_vat_installer_todo" model="ir.actions.todo">
3573+ <field name="action_id" ref="action_base_vat_installer"/>
3574+ <field name="type">automatic</field>
3575+ </record>
3576+ </data>
3577+</openerp>
3578+
3579
3580=== modified file 'c2c_account_payment_extension/__init__.py'
3581--- c2c_account_payment_extension/__init__.py 2012-06-09 14:31:08 +0000
3582+++ c2c_account_payment_extension/__init__.py 2014-12-05 03:33:54 +0000
3583@@ -30,7 +30,9 @@
3584 # 59 Temple Place - Suite 330, Boston, MA 02111-1.17, USA.
3585 #
3586 ###############################################
3587+import payment_type
3588 import payment_mode
3589+import payment_order
3590 import res_partner
3591 import account_invoice
3592 import account_move_line
3593
3594=== modified file 'c2c_account_payment_extension/__openerp__.py'
3595--- c2c_account_payment_extension/__openerp__.py 2012-06-09 14:42:52 +0000
3596+++ c2c_account_payment_extension/__openerp__.py 2014-12-05 03:33:54 +0000
3597@@ -1,11 +1,13 @@
3598 # -*- coding: utf-8 -*-
3599 ##############################################
3600-#
3601+# based on work of
3602+# Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
3603+# Jordi Esteve <jesteve@zikzakmedia.com>
3604 # Swing Entwicklung betrieblicher Informationssysteme GmbH
3605 # (<http://www.swing-system.com>)
3606 # Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
3607 # all rights reserved
3608-# 08-JUN-2012 (GK) created
3609+# 05-May-2013 created
3610 #
3611 # WARNING: This program as such is intended to be used by professional
3612 # programmers who take the whole responsibility of assessing all potential
3613@@ -41,10 +43,13 @@
3614 , "init_xml" : []
3615 , "demo_xml" : []
3616 , "update_xml" :
3617- [ "payment_mode_view.xml"
3618+ [ "payment_type_view.xml"
3619+ , "payment_mode_view.xml"
3620+ , "payment_order_view.xml"
3621 , "res_partner_view.xml"
3622 , "account_invoice_view.xml"
3623 , "wizard/account_payment_order_view.xml"
3624+ , "security/ir.model.access.csv"
3625 ]
3626 , "test" : []
3627 , "auto_install" : False
3628
3629=== modified file 'c2c_account_payment_extension/payment_mode.py'
3630--- c2c_account_payment_extension/payment_mode.py 2012-06-09 14:31:42 +0000
3631+++ c2c_account_payment_extension/payment_mode.py 2014-12-05 03:33:54 +0000
3632@@ -34,7 +34,7 @@
3633
3634 class payment_mode(osv.osv):
3635 _inherit = 'payment.mode'
3636- _description = 'Payment types'
3637+ _description = 'Payment Modes'
3638 _columns = \
3639 { 'amount_partner_min' : fields.float
3640 ('Minimum Payment', digits=(16, 2), help="Minimum payment per partner")
3641@@ -42,7 +42,7 @@
3642 ( 'Require Bank Account'
3643 , help='Ensure all lines in the payment order have a bank account when proposing lines to be added in the payment order.'
3644 )
3645-
3646+ ,'type': fields.many2one('payment.type', 'Payment type', required=True, help='Select the Payment Type for the Payment Mode.'),
3647 }
3648 _defaults = \
3649 { 'amount_partner_min' : lambda *a : 100.0
3650
3651=== added file 'c2c_account_payment_extension/payment_order.py'
3652--- c2c_account_payment_extension/payment_order.py 1970-01-01 00:00:00 +0000
3653+++ c2c_account_payment_extension/payment_order.py 2014-12-05 03:33:54 +0000
3654@@ -0,0 +1,317 @@
3655+# -*- coding: utf-8 -*-
3656+##############################################
3657+#
3658+# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
3659+# all rights reserved
3660+# this work is based on
3661+# Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
3662+# Jordi Esteve <jesteve@zikzakmedia.com>
3663+#
3664+# WARNING: This program as such is intended to be used by professional
3665+# programmers who take the whole responsibility of assessing all potential
3666+# consequences resulting from its eventual inadequacies and bugs.
3667+# End users who are looking for a ready-to-use solution with commercial
3668+# guarantees and support are strongly advised to contract a Free Software
3669+# Service Company.
3670+#
3671+# This program is Free Software; you can redistribute it and/or
3672+# modify it under the terms of the GNU General Public License
3673+# as published by the Free Software Foundation; either version 3
3674+# of the License, or (at your option) any later version.
3675+#
3676+# This program is distributed in the hope that it will be useful,
3677+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3678+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3679+# GNU General Public License for more details.
3680+#
3681+# You should have received a copy of the GNU General Public License
3682+# along with this program; if not, see <http://www.gnu.org/licenses/> or
3683+# write to the Free Software Foundation, Inc.,
3684+# 59 Temple Place - Suite 330, Boston, MA 02111-1.17, USA.
3685+#
3686+###############################################
3687+from osv import osv, fields
3688+from tools.translate import _
3689+import one2many_sorted
3690+
3691+class payment_order(osv.osv):
3692+ _name = 'payment.order'
3693+ _inherit = 'payment.order'
3694+
3695+# def _get_type(self, cr, uid, context=None):
3696+# if context is None:
3697+# context = {}
3698+# return context.get('type', 'payable')
3699+
3700+ def _get_reference(self, cr, uid, context=None):
3701+ if context is None:
3702+ context = {}
3703+ #type = context.get('type', 'payable')
3704+ type = 'payable'
3705+ #model = type == 'payable' and 'payment.order' or 'rec.payment.order'
3706+ model = 'payment.order'
3707+ return self.pool.get('ir.sequence').get(cr, uid, model)
3708+
3709+ def _get_period(self, cr, uid, context=None):
3710+ try:
3711+ # find() function will throw an exception if no period can be found for
3712+ # current date. That should not be a problem because user would be notified
3713+ # but as this model inherits an existing one, once installed it will create
3714+ # the new field and try to update existing records (even if there are no records yet)
3715+ # So we must ensure no exception is thrown, otherwise the module can only be installed
3716+ # once periods are created.
3717+ periods = self.pool.get('account.period').find(cr, uid)
3718+ return periods[0]
3719+ except Exception, e:
3720+ return False
3721+
3722+# def _payment_type_name_get(self, cr, uid, ids, field_name, arg, context=None):
3723+# result = {}
3724+# for rec in self.browse(cr, uid, ids, context):
3725+# result[rec.id] = rec.mode and rec.mode.type.name or ""
3726+# return result
3727+
3728+ def _name_get(self, cr, uid, ids, field_name, arg, context=None):
3729+ result = {}
3730+ for rec in self.browse(cr, uid, ids, context):
3731+ result[rec.id] = rec.reference
3732+ return result
3733+
3734+ _columns = {
3735+ 'type': fields.selection([
3736+ ('payable','Payable'),
3737+ ('receivable','Receivable'),
3738+ ],'Type', readonly=True, select=True),
3739+ # invisible field to filter payment order lines by payment type
3740+ #'payment_type_name': fields.function(_payment_type_name_get, method=True, type="char", size=64, string="Payment type name"),
3741+ # The field name is necessary to add attachement documents to payment orders
3742+# 'name': fields.function(_name_get, method=True, type="char", size=64, string="Name"),
3743+ 'create_account_moves': fields.selection([('bank-statement','Bank Statement'),('direct-payment','Direct Payment')],
3744+ 'Create Account Moves',
3745+ required=True,
3746+ states={'done':[('readonly',True)]},
3747+ help='Indicates when account moves should be created for order payment lines. "Bank Statement" '\
3748+ 'will wait until user introduces those payments in bank a bank statement. "Direct Payment" '\
3749+ 'will mark all payment lines as payied once the order is done.'),
3750+ 'period_id': fields.many2one('account.period', 'Period', states={'done':[('readonly',True)]}),
3751+ 'line_ids': one2many_sorted.one2many_sorted('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}, \
3752+ order = ' partner_id.name, ml_inv_ref.number'),
3753+ }
3754+ _defaults = {
3755+# 'type': _get_type,
3756+ 'reference': _get_reference,
3757+ 'create_account_moves': lambda *a: 'bank-statement',
3758+ 'period_id': _get_period,
3759+ }
3760+
3761+ def cancel_from_done(self, cr, uid, ids, context=None):
3762+ if context is None:
3763+ context = {}
3764+
3765+ #Search for account_moves
3766+ remove = []
3767+ for move in self.browse(cr,uid,ids,context):
3768+ #Search for any line
3769+ for line in move.line_ids:
3770+ if line.payment_move_id:
3771+ remove += [ line.payment_move_id.id ]
3772+
3773+ self.pool.get('account.move').button_cancel( cr, uid, remove, context=context)
3774+ self.pool.get('account.move').unlink(cr, uid, remove, context)
3775+ self.write( cr, uid, ids, {
3776+ 'state':'cancel'
3777+ },context=context)
3778+ return True
3779+
3780+ def unlink(self, cr, uid, ids, context=None):
3781+ pay_orders = self.read(cr, uid, ids, ['state'], context=context)
3782+ unlink_ids = []
3783+ for t in pay_orders:
3784+ if t['state'] in ('draft', 'cancel'):
3785+ unlink_ids.append(t['id'])
3786+ else:
3787+ raise osv.except_osv(_('Invalid action!'), _('You cannot delete payment order(s) which are already confirmed or done!'))
3788+ result = super(payment_order, self).unlink(cr, uid, unlink_ids, context=context)
3789+ return result
3790+
3791+
3792+ def set_done(self, cr, uid, ids, context=None):
3793+ result = super(payment_order, self).set_done(cr, uid, ids, context)
3794+
3795+ company_currency_id = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.currency_id.id
3796+
3797+ for order in self.browse(cr, uid, ids, context):
3798+ if order.create_account_moves != 'direct-payment':
3799+ continue
3800+
3801+ # This process creates a simple account move with bank and line accounts and line's amount. At the end
3802+ # it will reconcile or partial reconcile both entries if that is possible.
3803+
3804+ move_id = self.pool.get('account.move').create(cr, uid, {
3805+ 'name': '/',
3806+ 'journal_id': order.mode.journal.id,
3807+ 'period_id': order.period_id.id,
3808+ }, context)
3809+
3810+ for line in order.line_ids:
3811+ if not line.amount:
3812+ continue
3813+
3814+ if not line.account_id:
3815+ raise osv.except_osv(_('Error!'), _('Payment order should create account moves but line with amount %.2f for partner "%s" has no account assigned.') % (line.amount, line.partner_id.name ) )
3816+
3817+ currency_id = order.mode.journal.currency and order.mode.journal.currency.id or company_currency_id
3818+
3819+# if line.type == 'payable':
3820+ line_amount = line.amount_currency or line.amount
3821+# else:
3822+# line_amount = -line.amount_currency or -line.amount
3823+
3824+ if line_amount >= 0:
3825+ account_id = order.mode.journal.default_credit_account_id.id
3826+ else:
3827+ account_id = order.mode.journal.default_debit_account_id.id
3828+ acc_cur = ((line_amount<=0) and order.mode.journal.default_debit_account_id) or line.account_id
3829+
3830+ ctx = context.copy()
3831+ ctx['res.currency.compute.account'] = acc_cur
3832+ amount = self.pool.get('res.currency').compute(cr, uid, currency_id, company_currency_id, line_amount, context=ctx)
3833+
3834+ val = {
3835+ 'name': line.move_line_id and line.move_line_id.name or '/',
3836+ 'move_id': move_id,
3837+ 'date': order.date_done,
3838+ 'ref': line.move_line_id and line.move_line_id.ref or False,
3839+ 'partner_id': line.partner_id and line.partner_id.id or False,
3840+ 'account_id': line.account_id.id,
3841+ 'debit': ((amount>0) and amount) or 0.0,
3842+ 'credit': ((amount<0) and -amount) or 0.0,
3843+ 'journal_id': order.mode.journal.id,
3844+ 'period_id': order.period_id.id,
3845+ 'currency_id': currency_id,
3846+ }
3847+
3848+ amount = self.pool.get('res.currency').compute(cr, uid, currency_id, company_currency_id, line_amount, context=ctx)
3849+ if currency_id != company_currency_id:
3850+ amount_cur = self.pool.get('res.currency').compute(cr, uid, company_currency_id, currency_id, amount, context=ctx)
3851+ val['amount_currency'] = -amount_cur
3852+
3853+ if line.account_id and line.account_id.currency_id and line.account_id.currency_id.id != company_currency_id:
3854+ val['currency_id'] = line.account_id.currency_id.id
3855+ if company_currency_id == line.account_id.currency_id.id:
3856+ amount_cur = line_amount
3857+ else:
3858+ amount_cur = self.pool.get('res.currency').compute(cr, uid, company_currency_id, line.account_id.currency_id.id, amount, context=ctx)
3859+ val['amount_currency'] = amount_cur
3860+
3861+ partner_line_id = self.pool.get('account.move.line').create(cr, uid, val, context, check=False)
3862+
3863+ # Fill the secondary amount/currency
3864+ # if currency is not the same than the company
3865+ if currency_id != company_currency_id:
3866+ amount_currency = line_amount
3867+ move_currency_id = currency_id
3868+ else:
3869+ amount_currency = False
3870+ move_currency_id = False
3871+
3872+ self.pool.get('account.move.line').create(cr, uid, {
3873+ 'name': line.move_line_id and line.move_line_id.name or '/',
3874+ 'move_id': move_id,
3875+ 'date': order.date_done,
3876+ 'ref': line.move_line_id and line.move_line_id.ref or False,
3877+ 'partner_id': line.partner_id and line.partner_id.id or False,
3878+ 'account_id': account_id,
3879+ 'debit': ((amount < 0) and -amount) or 0.0,
3880+ 'credit': ((amount > 0) and amount) or 0.0,
3881+ 'journal_id': order.mode.journal.id,
3882+ 'period_id': order.period_id.id,
3883+ 'amount_currency': amount_currency,
3884+ 'currency_id': move_currency_id,
3885+ }, context)
3886+
3887+ aml_ids = [x.id for x in self.pool.get('account.move').browse(cr, uid, move_id, context).line_id]
3888+ for x in self.pool.get('account.move.line').browse(cr, uid, aml_ids, context):
3889+ if x.state != 'valid':
3890+ raise osv.except_osv(_('Error !'), _('Account move line "%s" is not valid') % x.name)
3891+
3892+ if line.move_line_id and not line.move_line_id.reconcile_id:
3893+ # If payment line has a related move line, we try to reconcile it with the move we just created.
3894+ lines_to_reconcile = [
3895+ partner_line_id,
3896+ ]
3897+
3898+ # Check if payment line move is already partially reconciled and use those moves in that case.
3899+ if line.move_line_id.reconcile_partial_id:
3900+ for rline in line.move_line_id.reconcile_partial_id.line_partial_ids:
3901+ lines_to_reconcile.append( rline.id )
3902+ else:
3903+ lines_to_reconcile.append( line.move_line_id.id )
3904+
3905+ amount = 0.0
3906+ for rline in self.pool.get('account.move.line').browse(cr, uid, lines_to_reconcile, context):
3907+ amount += rline.debit - rline.credit
3908+
3909+ currency = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.currency_id
3910+
3911+ if self.pool.get('res.currency').is_zero(cr, uid, currency, amount):
3912+ self.pool.get('account.move.line').reconcile(cr, uid, lines_to_reconcile, 'payment', context=context)
3913+ else:
3914+ self.pool.get('account.move.line').reconcile_partial(cr, uid, lines_to_reconcile, 'payment', context)
3915+
3916+ if order.mode.journal.entry_posted:
3917+ self.pool.get('account.move').write(cr, uid, [move_id], {
3918+ 'state':'posted',
3919+ }, context)
3920+
3921+ self.pool.get('payment.line').write(cr, uid, [line.id], {
3922+ 'payment_move_id': move_id,
3923+ }, context)
3924+
3925+ return result
3926+
3927+payment_order()
3928+
3929+
3930+class payment_line(osv.osv):
3931+ _name = 'payment.line'
3932+ _inherit = 'payment.line'
3933+
3934+ def _auto_init(self, cr, context=None):
3935+ cr.execute("SELECT column_name FROM information_schema.columns WHERE table_name = 'payment_line' and column_name='type'")
3936+ if cr.fetchone():
3937+ update_sign = False
3938+ else:
3939+ update_sign = True
3940+ result = super(payment_line, self)._auto_init(cr, context=context)
3941+
3942+ if update_sign:
3943+ # Ensure related store value of field 'type' is updated in the database.
3944+ # Note that by forcing the update here we also ensure everything is done in the same transaction.
3945+ # Because addons/__init__.py will execute a commit just after creating table fields.
3946+ result.sort()
3947+ for item in result:
3948+ item[1](cr, *item[2])
3949+ # Change sign of 'receivable' payment lines
3950+ cr.execute("UPDATE payment_line SET amount_currency = -amount_currency WHERE type='receivable'")
3951+ return result
3952+
3953+ _columns = {
3954+ 'move_line_id': fields.many2one('account.move.line', 'Entry line', domain="[('reconcile_id','=', False), ('amount_to_pay','!=',0), ('account_id.type','=',parent.type),('payment_type','ilike',parent.payment_type_name or '%')]", help='This Entry Line will be referred for the information of the ordering customer.'),
3955+ 'payment_move_id': fields.many2one('account.move', 'Payment Move', readonly=True, help='Account move that pays this debt.'),
3956+ 'account_id': fields.many2one('account.account', 'Account'),
3957+ 'type': fields.related('order_id','type', type='selection', selection=[('payable','Payable'),('receivable','Receivable')], readonly=True, store=True, string='Type'),
3958+ }
3959+
3960+ def onchange_move_line(self, cr, uid, ids, move_line_id, payment_type, date_prefered, date_scheduled, currency=False, company_currency=False, context=None):
3961+ # Adds account.move.line name to the payment line communication
3962+ res = super(payment_line, self).onchange_move_line(cr, uid, ids, move_line_id, payment_type, date_prefered, date_scheduled, currency, company_currency, context)
3963+ if move_line_id:
3964+ line = self.pool.get('account.move.line').browse(cr, uid, move_line_id)
3965+ if line.name != '/':
3966+ res['value']['communication'] = res['value']['communication'] + '. ' + line.name
3967+ res['value']['account_id'] = line.account_id.id
3968+ return res
3969+
3970+payment_line()
3971+
3972
3973=== added file 'c2c_account_payment_extension/payment_order_view.xml'
3974--- c2c_account_payment_extension/payment_order_view.xml 1970-01-01 00:00:00 +0000
3975+++ c2c_account_payment_extension/payment_order_view.xml 2014-12-05 03:33:54 +0000
3976@@ -0,0 +1,20 @@
3977+<?xml version="1.0" encoding="utf-8"?>
3978+<openerp>
3979+<data>
3980+
3981+ <record id="view_payment_order_form_ext1" model="ir.ui.view">
3982+ <field name="name">payment.order.form.ext1</field>
3983+ <field name="model">payment.order</field>
3984+ <field name="type">form</field>
3985+ <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
3986+ <field name="arch" type="xml">
3987+ <field name="mode" position="after">
3988+ <field name="create_account_moves" />
3989+ <group colspan="2" col="1" attrs="{'invisible': [('create_account_moves', '=', 'bank-statement')]}">
3990+ <field name="period_id" attrs="{'required': [('create_account_moves', '!=', 'bank-statement')]}"/>
3991+ </group>
3992+ </field>
3993+ </field>
3994+ </record>
3995+</data>
3996+</openerp>
3997
3998=== added file 'c2c_account_payment_extension/payment_type.py'
3999--- c2c_account_payment_extension/payment_type.py 1970-01-01 00:00:00 +0000
4000+++ c2c_account_payment_extension/payment_type.py 2014-12-05 03:33:54 +0000
4001@@ -0,0 +1,56 @@
4002+# -*- coding: utf-8 -*-
4003+##############################################
4004+#
4005+# Swing Entwicklung betrieblicher Informationssysteme GmbH
4006+# (<http://www.swing-system.com>)
4007+# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
4008+# all rights reserved
4009+# 08-JUN-2012 (GK) created
4010+#
4011+# WARNING: This program as such is intended to be used by professional
4012+# programmers who take the whole responsibility of assessing all potential
4013+# consequences resulting from its eventual inadequacies and bugs.
4014+# End users who are looking for a ready-to-use solution with commercial
4015+# guarantees and support are strongly advised to contract a Free Software
4016+# Service Company.
4017+#
4018+# This program is Free Software; you can redistribute it and/or
4019+# modify it under the terms of the GNU General Public License
4020+# as published by the Free Software Foundation; either version 3
4021+# of the License, or (at your option) any later version.
4022+#
4023+# This program is distributed in the hope that it will be useful,
4024+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4025+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4026+# GNU General Public License for more details.
4027+#
4028+# You should have received a copy of the GNU General Public License
4029+# along with this program; if not, see <http://www.gnu.org/licenses/> or
4030+# write to the Free Software Foundation, Inc.,
4031+# 59 Temple Place - Suite 330, Boston, MA 02111-1.17, USA.
4032+#
4033+###############################################
4034+from osv import osv, fields
4035+
4036+
4037+class payment_type(osv.osv):
4038+ _name= 'payment.type'
4039+ _description= 'Payment type'
4040+ _columns= {
4041+ 'name': fields.char('Name', size=64, required=True, help='Payment Type', translate=True),
4042+ 'code': fields.char('Code', size=64, required=True, help='Specify the Code for Payment Type'),
4043+ 'suitable_bank_types': fields.many2many('res.partner.bank.type',
4044+ 'bank_type_payment_type_rel',
4045+ 'pay_type_id','bank_type_id',
4046+ 'Suitable bank types'),
4047+ 'active': fields.boolean('Active', select=True),
4048+ 'note': fields.text('Description', translate=True, help="Description of the payment type that will be shown in the invoices"),
4049+ 'company_id': fields.many2one('res.company', 'Company', required=True),
4050+ }
4051+ _defaults = {
4052+ 'active': lambda *a: 1,
4053+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id
4054+ }
4055+
4056+payment_type()
4057+
4058
4059=== added file 'c2c_account_payment_extension/payment_type_view.xml'
4060--- c2c_account_payment_extension/payment_type_view.xml 1970-01-01 00:00:00 +0000
4061+++ c2c_account_payment_extension/payment_type_view.xml 2014-12-05 03:33:54 +0000
4062@@ -0,0 +1,92 @@
4063+<?xml version="1.0" encoding="utf-8"?>
4064+<openerp>
4065+<data>
4066+
4067+
4068+
4069+<!--************************** PARTNERS - payment type **************************-->
4070+<!--
4071+<record model="ir.ui.view" id="view_payment_type_res_partner_form1">
4072+<field name="name">res.partner.form.payment_type1</field>
4073+<field name="model">res.partner</field>
4074+<field name="type">form</field>
4075+<field name="inherit_id" ref="account.view_partner_property_form"/>
4076+<field name="priority" eval="20"/>
4077+<field name="arch" type="xml">
4078+ <field name="property_account_receivable" position="after">
4079+ <field name="payment_type_customer" widget="selection"/>
4080+ </field>
4081+</field>
4082+</record>
4083+
4084+<record model="ir.ui.view" id="view_payment_type_res_partner_form2">
4085+<field name="name">res.partner.form.payment_type2</field>
4086+<field name="model">res.partner</field>
4087+<field name="type">form</field>
4088+<field name="inherit_id" ref="account.view_partner_property_form"/>
4089+<field name="priority" eval="20"/>
4090+<field name="arch" type="xml">
4091+ <field name="property_account_payable" position="after">
4092+ <field name="payment_type_supplier" widget="selection"/>
4093+ </field>
4094+</field>
4095+</record>
4096+-->
4097+<!--****************************** PAYMENT TYPE ******************************-->
4098+<record model="ir.ui.view" id="view_payment_type_tree">
4099+<field name="name">payment.type.tree</field>
4100+<field name="model">payment.type</field>
4101+<field name="type">tree</field>
4102+<field name="arch" type="xml">
4103+ <tree string="Payment Type">
4104+ <field name="name"/>
4105+ <field name="code"/>
4106+ <field name="active"/>
4107+ <field name="company_id" groups="base.group_multi_company"/>
4108+ </tree>
4109+</field>
4110+</record>
4111+
4112+<record model="ir.ui.view" id="view_payment_type_form">
4113+<field name="name">payment.type.form</field>
4114+<field name="model">payment.type</field>
4115+<field name="type">form</field>
4116+<field name="arch" type="xml">
4117+ <form string="Payment Type">
4118+ <field name="name" select="1"/>
4119+ <field name="code" select="1"/>
4120+ <field name="active" select="1"/>
4121+ <field name="company_id" select="1" widget='selection' groups="base.group_multi_company"/>
4122+ <separator string="Description" colspan="4"/>
4123+ <field name="note" nolabel="1" colspan="4"/>
4124+ <separator string="Suitable Bank Types" colspan="4"/>
4125+ <field name="suitable_bank_types" nolabel="1" colspan="4"/>
4126+ </form>
4127+</field>
4128+</record>
4129+
4130+<record model="ir.actions.act_window" id="action_payment_type">
4131+<field name="name">Payment Type</field>
4132+<field name="res_model">payment.type</field>
4133+<field name="view_mode">tree,form</field>
4134+</record>
4135+
4136+<menuitem action="action_payment_type" id="menu_action_payment_type" parent="account.menu_configuration_misc"/>
4137+
4138+
4139+<!--****************************** PAYMENT MODE ******************************-->
4140+<record id="view_payment_mode_form_require_bank_account" model="ir.ui.view">
4141+<field name="name">payment.mode.form.require_bank_account</field>
4142+<field name="model">payment.mode</field>
4143+<field name="type">form</field>
4144+<field name="inherit_id" ref="account_payment.view_payment_mode_form"/>
4145+<field name="arch" type="xml">
4146+ <field name="bank_id" position="before">
4147+ <field name="type"/>
4148+ </field>
4149+</field>
4150+</record>
4151+
4152+</data>
4153+</openerp>
4154+
4155
4156=== added file 'c2c_account_payment_extension/payment_view.xml'
4157--- c2c_account_payment_extension/payment_view.xml 1970-01-01 00:00:00 +0000
4158+++ c2c_account_payment_extension/payment_view.xml 2014-12-05 03:33:54 +0000
4159@@ -0,0 +1,391 @@
4160+<?xml version="1.0" encoding="utf-8"?>
4161+<openerp>
4162+<data>
4163+
4164+ <!--************************** PARTNERS - default bank **************************-->
4165+<!-- defekt FIXME
4166+ <record model="ir.ui.view" id="view_partner_form1">
4167+ <field name="name">view.partner.form1</field>
4168+ <field name="model">res.partner</field>
4169+ <field name="inherit_id" ref="account.view_partner_property_form"/>
4170+ <field name="arch" type="xml">
4171+ <field name="name" position="after">
4172+ <field name="default_bank"/>
4173+ </field>
4174+ </field>
4175+ </record>
4176+
4177+ <record model="ir.ui.view" id="view_partner_form2">
4178+ <field name="name">view.partner.form2</field>
4179+ <field name="model">res.partner</field>
4180+ <field name="inherit_id" ref="account.view_partner_property_form"/>
4181+ <field name="arch" type="xml">
4182+ <tree string="Bank Details" position="inside">
4183+ <field name="default_bank"/>
4184+ </tree>
4185+ </field>
4186+ </record>
4187+-->
4188+ <record model="ir.ui.view" id="view_partner_form3">
4189+ <field name="name">view.partner.form3 </field>
4190+ <field name="model">res.partner.bank</field>
4191+ <field name="inherit_id" ref="base.view_partner_bank_form"/>
4192+ <field name="arch" type="xml">
4193+ <field name="bank" position="after">
4194+ <field name="default_bank"/>
4195+ </field>
4196+ </field>
4197+ </record>
4198+
4199+ <record model="ir.ui.view" id="view_partner_bank_tree">
4200+ <field name="name">view.partner.bank.tree </field>
4201+ <field name="model">res.partner.bank</field>
4202+ <field name="inherit_id" ref="base.view_partner_bank_tree"/>
4203+ <field name="arch" type="xml">
4204+ <field name="sequence" position="after">
4205+ <field name="default_bank"/>
4206+ </field>
4207+ </field>
4208+ </record>
4209+
4210+
4211+ <!--************************** PARTNERS - payment type **************************-->
4212+<!--
4213+ <record model="ir.ui.view" id="view_payment_type_res_partner_form1">
4214+ <field name="name">res.partner.form.payment_type1</field>
4215+ <field name="model">res.partner</field>
4216+ <field name="type">form</field>
4217+ <field name="inherit_id" ref="account.view_partner_property_form"/>
4218+ <field name="priority" eval="20"/>
4219+ <field name="arch" type="xml">
4220+ <field name="property_account_receivable" position="after">
4221+ <field name="payment_type_customer" widget="selection"/>
4222+ </field>
4223+ </field>
4224+ </record>
4225+
4226+ <record model="ir.ui.view" id="view_payment_type_res_partner_form2">
4227+ <field name="name">res.partner.form.payment_type2</field>
4228+ <field name="model">res.partner</field>
4229+ <field name="type">form</field>
4230+ <field name="inherit_id" ref="account.view_partner_property_form"/>
4231+ <field name="priority" eval="20"/>
4232+ <field name="arch" type="xml">
4233+ <field name="property_account_payable" position="after">
4234+ <field name="payment_type_supplier" widget="selection"/>
4235+ </field>
4236+ </field>
4237+ </record>
4238+-->
4239+
4240+ <!--****************************** PAYMENT TYPE ******************************-->
4241+ <record model="ir.ui.view" id="view_payment_type_tree">
4242+ <field name="name">payment.type.tree</field>
4243+ <field name="model">payment.type</field>
4244+ <field name="type">tree</field>
4245+ <field name="arch" type="xml">
4246+ <tree string="Payment Type">
4247+ <field name="name"/>
4248+ <field name="code"/>
4249+ <field name="active"/>
4250+ <field name="company_id" groups="base.group_multi_company"/>
4251+ </tree>
4252+ </field>
4253+ </record>
4254+
4255+ <record model="ir.ui.view" id="view_payment_type_form">
4256+ <field name="name">payment.type.form</field>
4257+ <field name="model">payment.type</field>
4258+ <field name="type">form</field>
4259+ <field name="arch" type="xml">
4260+ <form string="Payment Type">
4261+ <field name="name" select="1"/>
4262+ <field name="code" select="1"/>
4263+ <field name="active" select="1"/>
4264+ <field name="company_id" select="1" widget='selection' groups="base.group_multi_company"/>
4265+ <separator string="Description" colspan="4"/>
4266+ <field name="note" nolabel="1" colspan="4"/>
4267+ <separator string="Suitable Bank Types" colspan="4"/>
4268+ <field name="suitable_bank_types" nolabel="1" colspan="4"/>
4269+ </form>
4270+ </field>
4271+ </record>
4272+<!--
4273+ <record model="ir.actions.act_window" id="action_payment_type">
4274+ <field name="name">Payment Type</field>
4275+ <field name="res_model">payment.type</field>
4276+ <field name="view_type">form</field>
4277+ <field name="view_mode">tree,form</field>
4278+ </record>
4279+
4280+ <menuitem action="action_payment_type" id="menu_action_payment_type" parent="account.menu_configuration_misc"/>
4281+ -->
4282+
4283+ <!--****************************** PAYMENT MODE ******************************-->
4284+ <record id="view_payment_mode_form_require_bank_account" model="ir.ui.view">
4285+ <field name="name">payment.mode.form.require_bank_account</field>
4286+ <field name="model">payment.mode</field>
4287+ <field name="type">form</field>
4288+ <field name="inherit_id" ref="account_payment.view_payment_mode_form"/>
4289+ <field name="arch" type="xml">
4290+ <field name="bank_id" position="before">
4291+ <field name="require_bank_account"/>
4292+ <field name="type"/>
4293+ </field>
4294+ </field>
4295+ </record>
4296+
4297+
4298+ <!--****************************** INVOICES ******************************-->
4299+ <!--Field partner_bank_id in client invoices has a strange domain: domain="[('partner_id.ref_companies', 'in', [company_id])]"-->
4300+ <record model="ir.ui.view" id="invoice_form3">
4301+ <field name="name">account.invoice.form3.payment_type</field>
4302+ <field name="model">account.invoice</field>
4303+ <field name="type">form</field>
4304+ <field name="inherit_id" ref="account.invoice_form"/>
4305+ <field name="arch" type="xml">
4306+ <field name="partner_bank_id" position="replace">
4307+ <field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>
4308+ </field>
4309+ </field>
4310+ </record>
4311+
4312+ <record model="ir.ui.view" id="invoice_form4">
4313+ <field name="name">account.invoice.form4.payment_type</field>
4314+ <field name="model">account.invoice</field>
4315+ <field name="type">form</field>
4316+ <field name="inherit_id" ref="account.invoice_form"/>
4317+ <field name="arch" type="xml">
4318+ <field name="payment_term" position="after">
4319+ <field domain="[('company_id', '=', company_id)]" name="payment_type" on_change="onchange_payment_type(payment_type, partner_id)" />
4320+ </field>
4321+ </field>
4322+ </record>
4323+
4324+ <record model="ir.ui.view" id="invoice_supplier_form2">
4325+ <field name="name">account.invoice.supplier.form2</field>
4326+ <field name="model">account.invoice</field>
4327+ <field name="type">form</field>
4328+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
4329+ <field name="arch" type="xml">
4330+ <field name="payment_term" position="after">
4331+ <field domain="[('company_id', '=', company_id)]" name="payment_type" on_change="onchange_payment_type(payment_type, partner_id)" />
4332+ </field>
4333+ </field>
4334+ </record>
4335+
4336+
4337+ <!--************ account.move.line extension to show additional fields **********-->
4338+ <record model="ir.ui.view" id="payments_move_line_tree">
4339+ <field name="name">account.payments.move.line.tree</field>
4340+ <field name="model">account.move.line</field>
4341+ <field name="type">tree</field>
4342+ <field name="inherit_id" ref="account_payment.view_move_line_tree_wiz"/>
4343+ <field name="arch" type="xml">
4344+ <field name="currency_id" position="replace">
4345+ <field name="currency_id" groups="base.group_extended"/>
4346+ <field name="reconcile_id"/>
4347+ <field name="reconcile_partial_id" groups="base.group_extended"/>
4348+ <field name="state"/>
4349+ <field name="payment_type"/>
4350+ </field>
4351+ </field>
4352+ </record>
4353+
4354+ <record model="ir.ui.view" id="payments_move_line_form">
4355+ <field name="name">account.payments.move.line.form</field>
4356+ <field name="model">account.move.line</field>
4357+ <field name="type">form</field>
4358+ <field name="inherit_id" ref="account.view_move_line_form"/>
4359+ <field name="arch" type="xml">
4360+ <separator string="Reconciliation" position="before">
4361+ <group col="2" colspan="2">
4362+ <separator colspan="2" string="Payment"/>
4363+ <field name="payment_type" select="1" widget="selection"/>
4364+ <field name="partner_bank_id" domain="[('partner_id','=',partner_id)]"/>
4365+ <field name="received_check"/>
4366+ </group>
4367+ </separator>
4368+ </field>
4369+ </record>
4370+
4371+
4372+ <!--***************************** BANK STATEMENT *********************************-->
4373+<!--
4374+ <record id="view_bank_statement_form_ext" model="ir.ui.view">
4375+ <field name="name">account.bank.statement.form.ext</field>
4376+ <field name="model">account.bank.statement</field>
4377+ <field name="type">form</field>
4378+ <field name="inherit_id" ref="account_payment.view_bank_statement_form"/>
4379+ <field name="arch" type="xml">
4380+ <button name="%(account_payment.action_account_populate_statement_confirm)d" position="replace">
4381+ <button name="%(wizard_populate_statement_ext)d" string="Import payment lines" type="action" attrs="{'invisible':[('state','=','confirm')]}" icon="gtk-execute"/>
4382+ </button>
4383+ </field>
4384+ </record>
4385+-->
4386+
4387+ <!--***************************** PAYMENT ORDER *********************************-->
4388+ <!-- Filter invoices by payment type. Allow negative payment amounts -->
4389+ <record id="view_payment_order_form_ext1" model="ir.ui.view">
4390+ <field name="name">payment.order.form.ext1</field>
4391+ <field name="model">payment.order</field>
4392+ <field name="type">form</field>
4393+ <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
4394+ <field name="arch" type="xml">
4395+ <button name="%(account_payment.action_create_payment_order)d" position="replace">
4396+ <field name="payment_type_name" invisible="1"/>
4397+ <field name="type"/>
4398+ <field name="create_account_moves"/>
4399+ <group colspan="2" col="1" attrs="{'invisible': [('create_account_moves', '=', 'bank-statement')]}">
4400+ <field name="period_id" attrs="{'required': [('create_account_moves', '!=', 'bank-statement')]}"/>
4401+ </group>
4402+ <button colspan="2" name="%(wizard_populate_payment_ext)d" string="Select invoices to pay/receive payment" type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
4403+ </button>
4404+ </field>
4405+ </record>
4406+
4407+ <record id="view_payment_order_form_ext2" model="ir.ui.view">
4408+ <field name="name">payment.order.form.ext2</field>
4409+ <field name="model">payment.order</field>
4410+ <field name="type">form</field>
4411+ <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
4412+ <field name="arch" type="xml">
4413+ <field name="move_line_id" position="replace">
4414+ <group col="6" colspan="4">
4415+ <field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode,parent.date_prefered,parent.date_scheduled,currency,company_currency,context)" select="1"/>
4416+ <field name="account_id"/>
4417+ <field name="payment_move_id"/>
4418+ </group>
4419+ </field>
4420+ </field>
4421+ </record>
4422+
4423+ <record id="view_payment_order_form_cancel" model="ir.ui.view">
4424+ <field name="name">payment.order.form.cancel</field>
4425+ <field name="model">payment.order</field>
4426+ <field name="type">form</field>
4427+ <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
4428+ <field name="arch" type="xml">
4429+ <button name="cancel" position="after">
4430+ <button name="cancel_from_done" states="done" type="object" string="Cancel" icon="gtk-cancel"/>
4431+ </button>
4432+ </field>
4433+ </record>
4434+
4435+ <record id="view_payment_line_form_ext1" model="ir.ui.view">
4436+ <field name="name">payment.line.ext1</field>
4437+ <field name="model">payment.line</field>
4438+ <field name="type">form</field>
4439+ <field name="inherit_id" ref="account_payment.view_payment_line_form"/>
4440+ <field name="arch" type="xml">
4441+ <field name="move_line_id" position="replace">
4442+ <!--<field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode,parent.date_prefered,parent.date_scheduled,currency,company_currency,context)" select="1"/>-->
4443+ <group col="6" colspan="4">
4444+ <field name="move_line_id" on_change="onchange_move_line(move_line_id, False, currency, company_currency)" select="1"/>
4445+ <field name="account_id"/>
4446+ <field name="payment_move_id"/>
4447+ </group>
4448+ </field>
4449+ </field>
4450+ </record>
4451+
4452+
4453+ <!--**************************** PAYABLE PAYMENT ORDER ********************************-->
4454+ <record id="account_payment.action_payment_order_tree" model="ir.actions.act_window">
4455+ <field name="name">Pay. payment order</field>
4456+ <field name="res_model">payment.order</field>
4457+ <field name="view_type">form</field>
4458+ <field name="view_mode">tree,form</field>
4459+ <field name="domain">[('type','=','payable')]</field>
4460+ <field name="context">{'type':'payable'}</field>
4461+ </record>
4462+
4463+ <!--**************************** RECEIVABLE PAYMENT ORDER ********************************-->
4464+ <record id="action_rec_payment_order_tree" model="ir.actions.act_window">
4465+ <field name="name">Rec. payment order</field>
4466+ <field name="res_model">payment.order</field>
4467+ <field name="view_type">form</field>
4468+ <field name="view_mode">tree,form</field>
4469+ <field name="domain">[('type','=','receivable')]</field>
4470+ <field name="context">{'type':'receivable'}</field>
4471+ </record>
4472+ <menuitem action="action_rec_payment_order_tree" id="menu_action_rec_payment_order_form" parent="account_payment.menu_main_payment" sequence="2"/>
4473+
4474+ <!--****************************** PAYMENTS ***********************************-->
4475+ <record id="view_payments_tree" model="ir.ui.view">
4476+ <field name="name">Payments</field>
4477+ <field name="model">account.move.line</field>
4478+ <field name="field_parent">partner_id</field>
4479+ <field name="type">tree</field>
4480+ <field name="priority" eval="20"/>
4481+ <field name="arch" type="xml">
4482+ <tree string="Payments" editable="top"
4483+ colors="grey:reconcile_id!=0;blue:amount_to_pay==0;red:date_maturity&lt;time.strftime('%%Y-%%m-%%d')">
4484+ <field name="invoice" readonly="1"/>
4485+ <field name="partner_id" readonly="1"/>
4486+ <field name="account_id" readonly="1"/>
4487+ <field name="debit" readonly="1" sum="Total Debit"/>
4488+ <field name="credit" readonly="1" sum="Total Credit"/>
4489+ <field name="amount_to_pay" readonly="1" sum="Total Amount to Pay"/>
4490+ <field name="payment_type" readonly="1"/>
4491+ <field name="partner_bank_id" domain="[('partner_id','=',partner_id)]"/>
4492+ <field name="received_check"/>
4493+ <field name="date_maturity"/>
4494+ <field name="move_id" readonly="1"/>
4495+ <field name="reconcile_id" readonly="1"/>
4496+ <field name="reconcile_partial_id" readonly="1"/>
4497+ </tree>
4498+ </field>
4499+ </record>
4500+
4501+ <record id="view_payments_filter" model="ir.ui.view">
4502+ <field name="name">Invoice Payments Select</field>
4503+ <field name="model">account.move.line</field>
4504+ <field name="type">search</field>
4505+ <field name="priority" eval="20"/>
4506+ <field name="arch" type="xml">
4507+ <search string="Search Invoice Payments">
4508+ <group col='10' colspan='4'>
4509+ <filter icon="terp-sale" string="Receive" domain="[('account_id.type','=','receivable')]" help="Receivable payments"/>
4510+ <filter icon="terp-purchase" string="Pay" domain="[('account_id.type','=','payable')]" help="Payable payments"/>
4511+ <separator orientation="vertical"/>
4512+ <filter icon="terp-dolar_ok!" string="Unreconciled" domain="[('reconcile_id','=',False)]" help="Unreconciled payments"/>
4513+ <field name="account_id"/>
4514+ <field name="partner_id"/>
4515+ <field name="invoice"/>
4516+ <field name="date_maturity"/>
4517+ <newline/>
4518+ <field name="amount_to_pay"/>
4519+ <field name="payment_type" widget="selection"/>
4520+ <field name="partner_bank_id"/>
4521+ <field name="received_check"/>
4522+ </group>
4523+ </search>
4524+ </field>
4525+ </record>
4526+
4527+ <!-- Invoice Payments -->
4528+ <record model="ir.actions.act_window" id="action_invoice_payments">
4529+ <field name="name">Invoice payments</field>
4530+ <field name="res_model">account.move.line</field>
4531+ <field name="view_type">form</field>
4532+ <field name="view_id" ref="view_payments_tree"/>
4533+ <field name="search_view_id" ref="view_payments_filter"/>
4534+ <field name="domain">[('account_id.type','in',['receivable','payable']),('invoice','&lt;&gt;',False)]</field>
4535+ </record>
4536+ <menuitem name="Invoice payments" parent="account_payment.menu_main_payment" action="action_invoice_payments" id="menu_action_invoice_payments" sequence="4"/>
4537+
4538+ <!-- Done Payments -->
4539+ <record model="ir.actions.act_window" id="action_done_payments">
4540+ <field name="name">Done payments</field>
4541+ <field name="res_model">account.move.line</field>
4542+ <field name="view_type">form</field>
4543+ <field name="view_id" ref="view_payments_tree"/>
4544+ <field name="search_view_id" ref="view_payments_filter"/>
4545+ <field name="domain">[('account_id.type','in',['receivable','payable']),('invoice','=',False)]</field>
4546+ </record>
4547+ <menuitem name="Done payments" parent="account_payment.menu_main_payment" action="action_done_payments" id="menu_action_done_payments" sequence="5"/>
4548+
4549+</data>
4550+</openerp>
4551
4552=== added directory 'c2c_account_payment_extension/security'
4553=== added file 'c2c_account_payment_extension/security/ir.model.access.csv'
4554--- c2c_account_payment_extension/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
4555+++ c2c_account_payment_extension/security/ir.model.access.csv 2014-12-05 03:33:54 +0000
4556@@ -0,0 +1,4 @@
4557+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
4558+"access_payment_type","payment.type","model_payment_type","account_payment.group_account_payment",1,1,1,1
4559+"access_payment_type_user","payment.type.user","model_payment_type","base.group_user",1,0,0,0
4560+
4561
4562=== added file 'c2c_account_payment_extension/wizard/.directory'
4563--- c2c_account_payment_extension/wizard/.directory 1970-01-01 00:00:00 +0000
4564+++ c2c_account_payment_extension/wizard/.directory 2014-12-05 03:33:54 +0000
4565@@ -0,0 +1,5 @@
4566+[Dolphin]
4567+SortRole=date
4568+Timestamp=2013,3,17,18,17,17
4569+Version=3
4570+ViewMode=1
4571
4572=== modified file 'c2c_account_payment_extension/wizard/account_payment_order.py'
4573--- c2c_account_payment_extension/wizard/account_payment_order.py 2012-10-13 00:35:19 +0000
4574+++ c2c_account_payment_extension/wizard/account_payment_order.py 2014-12-05 03:33:54 +0000
4575@@ -51,11 +51,12 @@
4576
4577 def _get_min_balance_default(self, cr, uid, context=None):
4578 _logger = logging.getLogger(__name__)
4579- _logger.info('FGF pay min_balance context %s' % (context))
4580+ _logger.debug('FGF pay min_balance context %s' % (context))
4581 min_balance = 0
4582 order_obj = self.pool.get('payment.order')
4583- for order in order_obj.browse(cr, uid, [ context['active_id'] ]):
4584- min_balance = order.mode.amount_partner_min
4585+ if context.get('active_id') and context['active_id']:
4586+ for order in order_obj.browse(cr, uid, [ context['active_id'] ]):
4587+ min_balance = order.mode.amount_partner_min
4588 return min_balance
4589
4590
4591@@ -70,6 +71,7 @@
4592 order_obj = self.pool.get('payment.order')
4593 line_obj = self.pool.get('account.move.line')
4594 invoice_obj = self.pool.get('account.invoice')
4595+ payment_obj = self.pool.get('payment.line')
4596 mod_obj = self.pool.get('ir.model.data')
4597 obj = self.browse(cr, uid, ids, context=context)[0]
4598 payment = order_obj.browse(cr, uid, context['active_id'], context=context)
4599@@ -87,8 +89,8 @@
4600 , ('date_maturity', '<=', obj.duedate)
4601 , ('date_maturity', '=', False)
4602 ]
4603- _logger.info('FGF pay line domain %s' % (domain))
4604- _logger.info('FGF pay line context %s' % (context))
4605+ _logger.debug('FGF pay line domain %s' % (domain))
4606+ _logger.debug('FGF pay line context %s' % (context))
4607 ids = line_obj.search(cr, uid, domain, context=context)
4608 ids2 = ','.join(map(str,ids))
4609 sql = """select partner_id, round(sum(debit-credit),2) as balance
4610@@ -98,15 +100,15 @@
4611 cr.execute(sql)
4612 partner_balances = dict(cr.fetchall())
4613 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
4614- _logger.info('FGF partner_balance %s' % (partner_balances))
4615+ _logger.debug('FGF partner_balance %s' % (partner_balances))
4616
4617- _logger.info('FGF pay line ids %s' % (ids))
4618+ _logger.debug('FGF pay line ids %s' % (ids))
4619 line_ids = []
4620 for line in line_obj.browse(cr, uid, ids) :
4621- _logger.info('FGF line %s %s ' % (line.id, line.partner_id.name))
4622- _logger.info('FGF pay block %s' % (line.invoice.payment_block))
4623+ _logger.debug('FGF line %s %s ' % (line.id, line.partner_id.name))
4624+ _logger.debug('FGF pay block %s' % (line.invoice.payment_block))
4625 if line.invoice.payment_block : continue
4626- _logger.info('FGF pay partner block %s' % (line.partner_id.payment_block))
4627+ _logger.debug('FGF pay partner block %s' % (line.partner_id.payment_block))
4628 if line.partner_id.payment_block : continue
4629 # FGF its crazy :
4630 # partner_id.credit always returns 0
4631@@ -126,14 +128,14 @@
4632 #balance_to_pay = res and -res[0] or 0
4633 balance_to_pay = -round(partner_balances[line.partner_id.id],precision)
4634
4635- _logger.info('FGF pay partner balance %s amount to pay %s balance_to_pay %s Obey %s' % (partner_balance, line.amount_to_pay, balance_to_pay, line.partner_id.payment_obey_balance ))
4636+ _logger.debug('FGF pay partner balance %s amount to pay %s balance_to_pay %s Obey %s' % (partner_balance, line.amount_to_pay, balance_to_pay, line.partner_id.payment_obey_balance ))
4637 if (line.partner_id.payment_obey_balance
4638 and obj.balance_filter
4639 and (-partner_balance < obj.min_balance
4640 or balance_to_pay < obj.min_balance) ) : continue
4641 elif not line.amount_to_pay > 0: continue
4642
4643- _logger.info('FGF pay bank invoice %s, partner %s' % (line.invoice.partner_bank_id, line.invoice and line.invoice.partner_id.bank_ids ))
4644+ _logger.debug('FGF pay bank invoice %s, partner %s' % (line.invoice.partner_bank_id, line.invoice and line.invoice.partner_id.bank_ids ))
4645 if (line.invoice and not line.invoice.partner_bank_id):
4646 if not line.invoice.partner_id.bank_ids and payment.mode.require_bank_account :
4647 continue
4648@@ -146,24 +148,49 @@
4649 ( _('Data model error ! !')
4650 , _('Partner %s has no bank account information') % line.invoice.partner_id.name
4651 )
4652- _logger.info('FGF ACCEPTED %s' % (line.id))
4653+ _logger.debug('FGF ACCEPTED %s' % (line.id))
4654 line_ids.append(line.id)
4655- _logger.info('FGF line_ids %s' % (line_ids))
4656+ _logger.debug('FGF line_ids %s' % (line_ids))
4657 # End search modification
4658+ t = None
4659+ line2bank = line_obj.line2bank(cr, uid, line_ids, t, context)
4660+## Finally populate the current payment with new lines:
4661+ for line in line_obj.browse(cr, uid, line_ids, context=context):
4662+ if payment.date_prefered == "now":
4663+ #no payment date => immediate payment
4664+ date_to_pay = False
4665+ elif payment.date_prefered == 'due':
4666+ date_to_pay = line.date_maturity
4667+ elif payment.date_prefered == 'fixed':
4668+ date_to_pay = payment.date_scheduled
4669+
4670+ payment_obj.create(cr, uid,{
4671+ 'move_line_id': line.id,
4672+ 'amount_currency': line.amount_to_pay,
4673+ 'bank_id': line2bank.get(line.id),
4674+ 'order_id': payment.id,
4675+ 'partner_id': line.partner_id and line.partner_id.id or False,
4676+ 'communication': line.ref or '/',
4677+ 'date': date_to_pay,
4678+ 'currency': line.invoice and line.invoice.currency_id.id or False,
4679+ 'account_id': line.account_id.id,
4680+
4681+ }, context=context)
4682
4683 #
4684
4685 context.update({'line_ids': line_ids})
4686 model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'view_create_payment_order_lines')], context=context)
4687 resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
4688- return {'name': ('Entry Lines'),
4689- 'context': context,
4690- 'view_type': 'form',
4691- 'view_mode': 'form',
4692- 'res_model': 'payment.order.create',
4693- 'views': [(resource_id,'form')],
4694- 'type': 'ir.actions.act_window',
4695- 'target': 'new',
4696- }
4697+# return {'name': ('Entry Lines'),
4698+# 'context': context,
4699+# 'view_type': 'form',
4700+# 'view_mode': 'form',
4701+# 'res_model': 'payment.order.create',
4702+# 'views': [(resource_id,'form')],
4703+# 'type': 'ir.actions.act_window',
4704+# 'target': 'new',
4705+# }
4706+ return {}
4707
4708 payment_order_create()
4709
4710=== modified file 'c2c_account_tax_rounding/account.py'
4711--- c2c_account_tax_rounding/account.py 2012-12-20 15:30:00 +0000
4712+++ c2c_account_tax_rounding/account.py 2014-12-05 03:33:54 +0000
4713@@ -52,7 +52,7 @@
4714 #----------------------------------------------------------
4715 class account_tax(osv.osv):
4716 _inherit = 'account.tax'
4717- def _compute(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None):
4718+ def _compute(self, cr, uid, taxes, price_unit, quantity, address_id=None, product=None, partner=None, precision=None):
4719 """
4720 Compute tax values for given PRICE_UNIT, QUANTITY and a buyer/seller ADDRESS_ID.
4721
4722
4723=== modified file 'c2c_austria_extension/__openerp__.py'
4724--- c2c_austria_extension/__openerp__.py 2012-12-20 15:30:00 +0000
4725+++ c2c_austria_extension/__openerp__.py 2014-12-05 03:33:54 +0000
4726@@ -38,11 +38,11 @@
4727 ,"c2c_account_line_change"
4728 ,"c2c_account_interest"
4729 ,"c2c_account_tax_rounding"
4730-,"c2c_budget"
4731+,"c2c_budget_chricar"
4732 ,"c2c_managment_board"
4733 ,"c2c_period_yyyymm"
4734 ,"c2c_product_price_unit"
4735-,"c2c_reporting_tools"
4736+,"c2c_reporting_tools_chricar"
4737 ,"c2c_stock_accounting"
4738 ,"c2c_stock_negative"
4739 ,"c2c_stock_track_internal"
4740@@ -53,8 +53,8 @@
4741 #,"account_simulation"
4742 ,"analytic_journal_billing_rate"
4743 ,"analytic_user_function"
4744-,"account_financial_report"
4745-#,"account_payment_extension"
4746+,"account_financial_report_chricar"
4747+#,"account_payment_extension_chricar"
4748 #,"account_report"
4749 ,"audittrail"
4750 ,"base_contact"
4751
4752=== renamed directory 'c2c_budget' => 'c2c_budget_chricar'
4753=== modified file 'c2c_budget_chricar/__openerp__.py'
4754--- c2c_budget/__openerp__.py 2012-12-20 15:30:00 +0000
4755+++ c2c_budget_chricar/__openerp__.py 2014-12-05 03:33:54 +0000
4756@@ -4,7 +4,7 @@
4757 # Copyright (c) Camptocamp - http://www.camptocamp.com
4758 # Author: Arnaud WÃŒst ported by nbessi
4759 #
4760-# This file is part of the c2c_budget module
4761+# This file is part of the c2c_budget_chricar module
4762 #
4763 # WARNING: This program as such is intended to be used by professional
4764 # programmers who take the whole responsability of assessing all potential
4765@@ -41,7 +41,7 @@
4766 """
4767 , "depends" :
4768 [ "account"
4769- , "c2c_reporting_tools"
4770+ , "c2c_reporting_tools_chricar"
4771 , "chricar_account_period_sum"
4772 , "report_webkit_chapter_server"
4773 ]
4774
4775=== modified file 'c2c_budget_chricar/__terp__.py'
4776--- c2c_budget/__terp__.py 2012-12-20 15:30:00 +0000
4777+++ c2c_budget_chricar/__terp__.py 2014-12-05 03:33:54 +0000
4778@@ -43,7 +43,7 @@
4779 "depends" : [
4780 "base",
4781 "account",
4782- "c2c_reporting_tools"
4783+ "c2c_reporting_tools_chricar"
4784 ],
4785 "init_xml" : [],
4786 "update_xml" : [
4787
4788=== modified file 'c2c_budget_chricar/c2c_budget_item.py'
4789--- c2c_budget/c2c_budget_item.py 2012-12-20 15:30:00 +0000
4790+++ c2c_budget_chricar/c2c_budget_item.py 2014-12-05 03:33:54 +0000
4791@@ -39,7 +39,7 @@
4792 from tools.translate import _
4793
4794 from copy import copy
4795-from c2c_reporting_tools.c2c_helper import *
4796+from c2c_reporting_tools_chricar.c2c_helper import *
4797 import decimal_precision as dp
4798
4799
4800
4801=== modified file 'c2c_budget_chricar/c2c_budget_line.py'
4802--- c2c_budget/c2c_budget_line.py 2012-12-20 15:30:00 +0000
4803+++ c2c_budget_chricar/c2c_budget_line.py 2014-12-05 03:33:54 +0000
4804@@ -29,7 +29,7 @@
4805 #
4806 ##############################################################################
4807 from osv import fields, osv
4808-from c2c_reporting_tools.c2c_helper import *
4809+from c2c_reporting_tools_chricar.c2c_helper import *
4810 from datetime import datetime
4811 from time import mktime
4812 import time
4813
4814=== modified file 'c2c_budget_chricar/c2c_budget_view.xml'
4815--- c2c_budget/c2c_budget_view.xml 2012-12-20 15:30:00 +0000
4816+++ c2c_budget_chricar/c2c_budget_view.xml 2014-12-05 03:33:54 +0000
4817@@ -443,11 +443,11 @@
4818
4819
4820 <menuitem id="menu_budget_c2c" name="Budget c2c" parent="account.menu_finance"/>
4821- <menuitem id="menu_budget_list" name="Budgets" action="c2c_budget.open_budget_list" parent="c2c_budget.menu_budget_c2c"/>
4822- <menuitem id="menu_budget_version_list" name="Budget Versions" action="c2c_budget.open_budget_version_list" parent="c2c_budget.menu_budget_c2c"/>
4823- <menuitem id="menu_budget_line_list" name="Budget Lines" action="c2c_budget.open_budget_lines_list" parent="c2c_budget.menu_budget_c2c"/>
4824- <menuitem id="menu_budget_item_list" name="Budget Items" action="c2c_budget.open_budget_items_list" parent="c2c_budget.menu_budget_c2c"/>
4825- <menuitem id="menu_budget_item_tree" name="Budget Items Structures" action="c2c_budget.open_budget_items_tree" parent="c2c_budget.menu_budget_c2c"/>
4826+ <menuitem id="menu_budget_list" name="Budgets" action="c2c_budget_chricar.open_budget_list" parent="c2c_budget_chricar.menu_budget_c2c"/>
4827+ <menuitem id="menu_budget_version_list" name="Budget Versions" action="c2c_budget_chricar.open_budget_version_list" parent="c2c_budget_chricar.menu_budget_c2c"/>
4828+ <menuitem id="menu_budget_line_list" name="Budget Lines" action="c2c_budget_chricar.open_budget_lines_list" parent="c2c_budget_chricar.menu_budget_c2c"/>
4829+ <menuitem id="menu_budget_item_list" name="Budget Items" action="c2c_budget_chricar.open_budget_items_list" parent="c2c_budget_chricar.menu_budget_c2c"/>
4830+ <menuitem id="menu_budget_item_tree" name="Budget Items Structures" action="c2c_budget_chricar.open_budget_items_tree" parent="c2c_budget_chricar.menu_budget_c2c"/>
4831
4832
4833 </data>
4834
4835=== modified file 'c2c_budget_chricar/c2c_budget_wizard.xml'
4836--- c2c_budget/c2c_budget_wizard.xml 2012-12-20 15:30:00 +0000
4837+++ c2c_budget_chricar/c2c_budget_wizard.xml 2014-12-05 03:33:54 +0000
4838@@ -46,7 +46,7 @@
4839
4840 <!-- add a print item in budgets objects to print budget -->
4841 <wizard string="Budget By Periods"
4842- model="c2c_budget"
4843+ model="c2c_budget_chricar"
4844 name="budget.by.periods"
4845 id="wizard_budget_by_period"
4846 keyword="client_print_multi"/>
4847@@ -72,7 +72,7 @@
4848 menu="False"
4849 id="wizard_search_budget_lines" />
4850 <menuitem
4851- parent = "c2c_budget.menu_budget_c2c"
4852+ parent = "c2c_budget_chricar.menu_budget_c2c"
4853 id="menu_wizard_search_budget_lines"
4854 action="wizard_search_budget_lines"
4855 type="wizard" />
4856@@ -80,7 +80,7 @@
4857
4858 <!-- add a print item in budgets objects to compare versions -->
4859 <wizard string="Versions Comparing"
4860- model="c2c_budget"
4861+ model="c2c_budget_chricar"
4862 name="compare.budget.versions"
4863 id="wizard_compare_versions"
4864 keyword="client_print_multi"/>
4865@@ -95,7 +95,7 @@
4866
4867 <!-- add a print item in budgets objects to consolidate a budget -->
4868 <wizard string="Budget Consolidation"
4869- model="c2c_budget"
4870+ model="c2c_budget_chricar"
4871 name="budget.consolidation"
4872 id="wizard_budget_consolidation"
4873 keyword="client_print_multi"/>
4874@@ -110,7 +110,7 @@
4875
4876 <!-- add a print item in budgets objects to compare it with reality -->
4877 <wizard string="Budget vs. Actual"
4878- model="c2c_budget"
4879+ model="c2c_budget_chricar"
4880 name="budget.vs.reality"
4881 id="wizard_budget_vs_reality"
4882 keyword="client_print_multi"/>
4883
4884=== modified file 'c2c_budget_chricar/report/budget_by_period.py'
4885--- c2c_budget/report/budget_by_period.py 2012-12-20 15:30:00 +0000
4886+++ c2c_budget_chricar/report/budget_by_period.py 2014-12-05 03:33:54 +0000
4887@@ -28,10 +28,10 @@
4888 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4889 #
4890 ##############################################################################
4891-from c2c_reporting_tools.reports.standard_report import *
4892-from c2c_reporting_tools.flowables.simple_row_table import *
4893-from c2c_reporting_tools.c2c_helper import *
4894-from c2c_reporting_tools.translation import _
4895+from c2c_reporting_tools_chricar.reports.standard_report import *
4896+from c2c_reporting_tools_chricar.flowables.simple_row_table import *
4897+from c2c_reporting_tools_chricar.c2c_helper import *
4898+from c2c_reporting_tools_chricar.translation import _
4899 from reportlab.platypus import *
4900 from c2c_budget.report.helper import *
4901
4902
4903=== modified file 'c2c_budget_chricar/report/budget_consolidation.py'
4904--- c2c_budget/report/budget_consolidation.py 2012-12-20 15:30:00 +0000
4905+++ c2c_budget_chricar/report/budget_consolidation.py 2014-12-05 03:33:54 +0000
4906@@ -28,10 +28,10 @@
4907 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4908 #
4909 ##############################################################################
4910-from c2c_reporting_tools.reports.standard_report import *
4911-from c2c_reporting_tools.flowables.simple_row_table import *
4912-from c2c_reporting_tools.c2c_helper import *
4913-from c2c_reporting_tools.translation import _
4914+from c2c_reporting_tools_chricar.reports.standard_report import *
4915+from c2c_reporting_tools_chricar.flowables.simple_row_table import *
4916+from c2c_reporting_tools_chricar.c2c_helper import *
4917+from c2c_reporting_tools_chricar.translation import _
4918 from reportlab.platypus import *
4919 from c2c_budget.report.helper import *
4920
4921
4922=== modified file 'c2c_budget_chricar/report/budget_vs_reality.py'
4923--- c2c_budget/report/budget_vs_reality.py 2012-12-20 15:30:00 +0000
4924+++ c2c_budget_chricar/report/budget_vs_reality.py 2014-12-05 03:33:54 +0000
4925@@ -29,10 +29,10 @@
4926 #
4927 ##############################################################################
4928
4929-from c2c_reporting_tools.reports.standard_report import *
4930-from c2c_reporting_tools.flowables.simple_row_table import *
4931-from c2c_reporting_tools.c2c_helper import *
4932-from c2c_reporting_tools.translation import _
4933+from c2c_reporting_tools_chricar.reports.standard_report import *
4934+from c2c_reporting_tools_chricar.flowables.simple_row_table import *
4935+from c2c_reporting_tools_chricar.c2c_helper import *
4936+from c2c_reporting_tools_chricar.translation import _
4937 from reportlab.platypus import *
4938 from c2c_budget.report.helper import *
4939
4940
4941=== modified file 'c2c_budget_chricar/report/compare_versions.py'
4942--- c2c_budget/report/compare_versions.py 2012-12-20 15:30:00 +0000
4943+++ c2c_budget_chricar/report/compare_versions.py 2014-12-05 03:33:54 +0000
4944@@ -28,10 +28,10 @@
4945 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4946 #
4947 ##############################################################################
4948-from c2c_reporting_tools.reports.standard_report import *
4949-from c2c_reporting_tools.flowables.simple_row_table import *
4950-from c2c_reporting_tools.c2c_helper import *
4951-from c2c_reporting_tools.translation import _
4952+from c2c_reporting_tools_chricar.reports.standard_report import *
4953+from c2c_reporting_tools_chricar.flowables.simple_row_table import *
4954+from c2c_reporting_tools_chricar.c2c_helper import *
4955+from c2c_reporting_tools_chricar.translation import _
4956 from reportlab.platypus import *
4957 from c2c_budget.report.helper import *
4958
4959
4960=== modified file 'c2c_budget_chricar/report/helper.py'
4961--- c2c_budget/report/helper.py 2012-12-20 15:30:00 +0000
4962+++ c2c_budget_chricar/report/helper.py 2014-12-05 03:33:54 +0000
4963@@ -28,7 +28,7 @@
4964 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4965 #
4966 ##############################################################################
4967-from c2c_reporting_tools.core.table_elements import *
4968+from c2c_reporting_tools_chricar.core.table_elements import *
4969
4970
4971 class ItemCell(TextCellData):
4972
4973=== modified file 'c2c_budget_chricar/report/report_c2c_budget_item.mako'
4974--- c2c_budget/report/report_c2c_budget_item.mako 2012-01-27 16:02:12 +0000
4975+++ c2c_budget_chricar/report/report_c2c_budget_item.mako 2014-12-05 03:33:54 +0000
4976@@ -1,3 +1,4 @@
4977+## -*- coding: utf-8 -*-
4978 <html>
4979 %if context['data'] and context['data'].get('form'):
4980 <%form = True%>
4981
4982=== modified file 'c2c_budget_report/__openerp__.py'
4983--- c2c_budget_report/__openerp__.py 2012-12-20 15:30:00 +0000
4984+++ c2c_budget_report/__openerp__.py 2014-12-05 03:33:54 +0000
4985@@ -4,7 +4,7 @@
4986 # Copyright (c) Camptocamp - http://www.camptocamp.com
4987 # Author: Arnaud WÃŒst ported by nbessi
4988 #
4989-# This file is part of the c2c_budget module
4990+# This file is part of the c2c_budget_chricar module
4991 #
4992 # WARNING: This program as such is intended to be used by professional
4993 # programmers who take the whole responsability of assessing all potential
4994@@ -37,7 +37,7 @@
4995
4996 """
4997 , "depends" :
4998- [ "c2c_budget","chricar_account_period_sum",
4999+ [ "c2c_budget_chricar","chricar_account_period_sum",
5000 ]
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches