From 5a8218ded0ea9626d6dd2dc5a6c873cd7b0896d3 Mon Sep 17 00:00:00 2001 From: kiplangatdan Date: Thu, 1 Feb 2018 16:54:21 +0300 Subject: [PATCH] [8.0][ADD]account_debtor_card --- account_debtor_card/README.rst | 47 +++++ account_debtor_card/__init__.py | 5 + account_debtor_card/__openerp__.py | 23 +++ account_debtor_card/i18n/nl.po | 126 ++++++++++++ account_debtor_card/models/__init__.py | 5 + account_debtor_card/models/res_partner.py | 15 ++ .../report/report_debtor_card.xml | 191 ++++++++++++++++++ .../static/description/icon.png | Bin 0 -> 6109 bytes account_debtor_card/views/res_partner.xml | 32 +++ 9 files changed, 444 insertions(+) create mode 100644 account_debtor_card/README.rst create mode 100644 account_debtor_card/__init__.py create mode 100644 account_debtor_card/__openerp__.py create mode 100644 account_debtor_card/i18n/nl.po create mode 100644 account_debtor_card/models/__init__.py create mode 100644 account_debtor_card/models/res_partner.py create mode 100644 account_debtor_card/report/report_debtor_card.xml create mode 100644 account_debtor_card/static/description/icon.png create mode 100644 account_debtor_card/views/res_partner.xml diff --git a/account_debtor_card/README.rst b/account_debtor_card/README.rst new file mode 100644 index 00000000..6983bd14 --- /dev/null +++ b/account_debtor_card/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=================== +Account Debtor Card +=================== + +This module creates Debtor cards common in all accounting packages. +It prints all the customer's sale orders and the corresponding invoices. + +Usage +===== + +To use this module, you need to: + +* Go to *Customers* Tree/Form *Print Debtor Card*. +* In *Customers* Form View *Sales Order* tab. +* In Tree View you can select one or more and *Print* + + +Credits +======= + +Contributors +------------ + +* Dan Kiplangat +* Tom Blauwendraat + +Icon +---- +* Icon made by Freepik from http://flaticon.com. + +Maintainer +---------- +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/account_debtor_card/__init__.py b/account_debtor_card/__init__.py new file mode 100644 index 00000000..5f881b58 --- /dev/null +++ b/account_debtor_card/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# © 2018 Sunflower IT (http://sunflowerweb.nl) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/account_debtor_card/__openerp__.py b/account_debtor_card/__openerp__.py new file mode 100644 index 00000000..9430a93f --- /dev/null +++ b/account_debtor_card/__openerp__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# © 2018 Sunflower IT (http://sunflowerweb.nl) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Account Debtor Card", + "summary": "Adds an option to print sale orders and related invoices", + "version": "8.0.1.0.0", + "category": "Accounting", + "website": "https://sunflowerweb.nl", + "author": "Sunflower IT, Therp BV, Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": [ + "sale", + "account", + ], + "data": [ + "views/res_partner.xml", + "report/report_debtor_card.xml", + ], +} diff --git a/account_debtor_card/i18n/nl.po b/account_debtor_card/i18n/nl.po new file mode 100644 index 00000000..b44acace --- /dev/null +++ b/account_debtor_card/i18n/nl.po @@ -0,0 +1,126 @@ +# This file contains the translation of the following modules: +# * account_debtor_card +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-26 09:52+0000\n" +"PO-Revision-Date: 2017-08-18 16:51+0000\n" +"Last-Translator: Tom Blauwendraat \n" +"Language-Team: Dutch (http://www.transifex.com/odoo/odoo-8/language/nl/)\n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "---- Printed:" +msgstr "---- Afgedrukt:" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Customer:" +msgstr "Klant:" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Date" +msgstr "Datum" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Date Ordered:" +msgstr "Besteldatum:" + +#. module: account_debtor_card +#: model:ir.actions.report.xml,name:account_debtor_card.action_report_debtor_card +msgid "Debtor Card" +msgstr "Debiteurenkaart" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Description" +msgstr "Omschrijving" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "No Invoices for this order" +msgstr "Geen fakturen voor deze verkooporder" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Order N°:" +msgstr "Ordernr:" + +#. module: account_debtor_card +#: model:ir.model,name:account_debtor_card.model_res_partner +msgid "Partner" +msgstr "Relatie" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Payment Term:" +msgstr "Betaalconditie:" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Pending" +msgstr "In afwachting" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Price" +msgstr "Bedrag" + +#. module: account_debtor_card +#: view:res.partner:account_debtor_card.view_partner_form_inherit +msgid "Print Debtor Card" +msgstr "Debiteurenkaart" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Quantity" +msgstr "Hoeveelheid" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Related Invoices" +msgstr "Bijbehorende fakturen" + +#. module: account_debtor_card +#: view:res.partner:account_debtor_card.view_partner_form_inherit +msgid "Sale Orders" +msgstr "Verkooporders" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Salesperson:" +msgstr "Verkoper:" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Status" +msgstr "Status" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Status:" +msgstr "Status:" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Total" +msgstr "Totaal" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Unit Price" +msgstr "Prijs" + +#. module: account_debtor_card +#: view:website:account_debtor_card.report_debtor_card +msgid "Your Reference:" +msgstr "Uw referentie:" diff --git a/account_debtor_card/models/__init__.py b/account_debtor_card/models/__init__.py new file mode 100644 index 00000000..0aad6a49 --- /dev/null +++ b/account_debtor_card/models/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# © 2018 Sunflower IT (http://sunflowerweb.nl) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import res_partner diff --git a/account_debtor_card/models/res_partner.py b/account_debtor_card/models/res_partner.py new file mode 100644 index 00000000..c5fb2623 --- /dev/null +++ b/account_debtor_card/models/res_partner.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# © 2018 Sunflower IT (http://sunflowerweb.nl) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from openerp import models, api + + +class ResPartner(models.Model): + _inherit = "res.partner" + + @api.multi + def print_debtor_card(self): + """Button to print the sale orders and related invoices""" + return self.env['report'].get_action( + self, 'account_debtor_card.report_debtor_card') diff --git a/account_debtor_card/report/report_debtor_card.xml b/account_debtor_card/report/report_debtor_card.xml new file mode 100644 index 00000000..50eef4d6 --- /dev/null +++ b/account_debtor_card/report/report_debtor_card.xml @@ -0,0 +1,191 @@ + + + + + + diff --git a/account_debtor_card/static/description/icon.png b/account_debtor_card/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0b73f50729596013140f1e36da71b46a5097b55d GIT binary patch literal 6109 zcmcgwcT`i^*1riYNL5r2km9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