Преглед изворни кода

Secuencia de items de compra

sebas пре 4 година
комит
b52c1fcc69

+ 22 - 0
README.rst

@@ -0,0 +1,22 @@
+Purchase Order Line Sequence
+============================
+
+New functionality to visually identificate the purchase order lines and sort
+then asc.
+
+A new field "sequence" was added to the lines of the purchase order for
+automatic enumerate lines when they are created from the purchase order. The
+sequence field exploits the special field functionality allowing drag and drop
+the line to re-enumerate.
+
+Features
+--------
+
+This sequence is a incremental number. It
+increments one by one. You can also change the generate sequence number by
+hand to set the sequence number you want. After you save the purchase order
+lines will be re-ordered with the sequence value given.
+
+Also the sequence field is validate to be unique per purchase order so the
+sequence number to identificate lines can not be repeat into the lines of a
+purchase order.

+ 27 - 0
__init__.py

@@ -0,0 +1,27 @@
+# coding: utf-8
+###############################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#    Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
+#    All Rights Reserved
+###############################################################################
+#    Credits:
+#    Coded by: Katherine Zaoral <kathy@vauxoo.com>
+#    Planified by: Nhomar Hernandez <nhomar@vauxoo.com>
+#    Audited by: Nhomar Hernandez <nhomar@vauxoo.com>
+###############################################################################
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+###############################################################################
+
+from . import model
+from . import wizard

+ 46 - 0
__openerp__.py

@@ -0,0 +1,46 @@
+# coding: utf-8
+###############################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#    Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
+#    All Rights Reserved
+###############################################################################
+#    Credits:
+#    Coded by: Katherine Zaoral <kathy@vauxoo.com>
+#    Planified by: Nhomar Hernandez <nhomar@vauxoo.com>
+#    Audited by: Nhomar Hernandez <nhomar@vauxoo.com>
+###############################################################################
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+###############################################################################
+
+{
+    "name": "Purchase Order Line Sequence",
+    "summary": "Enumerate purchase order lines",
+    "version": "8.0.0.1.6",
+    "author": "Vauxoo",
+    "website": "http://www.vauxoo.com/",
+    "license": "AGPL-3",
+    "category": "purchase",
+    "depends": [
+        "purchase_requisition",
+    ],
+    "data": [
+        "view/purchase_view.xml",
+    ],
+    "demo": [],
+    "test": [],
+    "qweb": [],
+    "js": [],
+    "css": [],
+    "installable": True,
+}

+ 77 - 0
i18n/es.po

@@ -0,0 +1,77 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# 	* purchase_order_line_sequence
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-05-21 01:55+0000\n"
+"PO-Revision-Date: 2015-08-03 16:07+0200\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+"Language: es\n"
+"X-Generator: Poedit 1.8.2\n"
+
+#. module: purchase_order_line_sequence
+#: help:purchase.order.line,sequence:0
+msgid "Gives the sequence of this line when displaying the purchase order."
+msgstr "Representa la sencuenca de esta linea cuando se muestra la orden de compra."
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:69
+#, python-format
+msgid "Greater or equal than 1"
+msgstr "Mayor o igual a 1"
+
+#. module: purchase_order_line_sequence
+#: model:ir.model,name:purchase_order_line_sequence.model_purchase_order
+msgid "Purchase Order"
+msgstr "Pedido de compra"
+
+#. module: purchase_order_line_sequence
+#: model:ir.model,name:purchase_order_line_sequence.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr "Línea de pedido de compra"
+
+#. module: purchase_order_line_sequence
+#: field:purchase.order.line,sequence:0
+msgid "Sequence"
+msgstr "Secuencia"
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:46
+#, python-format
+msgid "The next sequence numbers are already used"
+msgstr "Las siguientes secuencias ya han sido usadas"
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:68
+#, python-format
+msgid "The sequence must be a positive number!"
+msgstr "La secuencia debe ser un numero positivo!"
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:45
+#, python-format
+msgid "The sequence must be unique per purchase order!"
+msgstr "La secuencia debe ser un numero unico por pedido de compra!"
+
+#. module: purchase_order_line_sequence
+#: field:purchase.order,website_message_ids:0
+msgid "Website Messages"
+msgstr "Mensajes del sitio web"
+
+#. module: purchase_order_line_sequence
+#: help:purchase.order,website_message_ids:0
+msgid "Website communication history"
+msgstr "Historial de comunicaciones del sitio web"
+
+#. module: purchase_order_line_sequence
+#: view:purchase.order:purchase_order_line_sequence.purchase_order_sequence_form
+msgid "{'order_line': order_line}"
+msgstr "{'order_line': order_line}"

+ 77 - 0
i18n/es_PA.po

@@ -0,0 +1,77 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# 	* purchase_order_line_sequence
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-05-21 01:55+0000\n"
+"PO-Revision-Date: 2015-08-03 16:07+0200\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+"Language: es_PA\n"
+"X-Generator: Poedit 1.8.2\n"
+
+#. module: purchase_order_line_sequence
+#: help:purchase.order.line,sequence:0
+msgid "Gives the sequence of this line when displaying the purchase order."
+msgstr "Representa la sencuenca de esta linea cuando se muestra la orden de compra."
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:69
+#, python-format
+msgid "Greater or equal than 1"
+msgstr "Mayor o igual a 1"
+
+#. module: purchase_order_line_sequence
+#: model:ir.model,name:purchase_order_line_sequence.model_purchase_order
+msgid "Purchase Order"
+msgstr "Pedido de compra"
+
+#. module: purchase_order_line_sequence
+#: model:ir.model,name:purchase_order_line_sequence.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr "Línea de pedido de compra"
+
+#. module: purchase_order_line_sequence
+#: field:purchase.order.line,sequence:0
+msgid "Sequence"
+msgstr "Secuencia"
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:46
+#, python-format
+msgid "The next sequence numbers are already used"
+msgstr "Las siguientes secuencias ya han sido usadas"
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:68
+#, python-format
+msgid "The sequence must be a positive number!"
+msgstr "La secuencia debe ser un numero positivo!"
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:45
+#, python-format
+msgid "The sequence must be unique per purchase order!"
+msgstr "La secuencia debe ser un numero unico por pedido de compra!"
+
+#. module: purchase_order_line_sequence
+#: field:purchase.order,website_message_ids:0
+msgid "Website Messages"
+msgstr "Mensajes del sitio web"
+
+#. module: purchase_order_line_sequence
+#: help:purchase.order,website_message_ids:0
+msgid "Website communication history"
+msgstr "Historial de comunicaciones del sitio web"
+
+#. module: purchase_order_line_sequence
+#: view:purchase.order:purchase_order_line_sequence.purchase_order_sequence_form
+msgid "{'order_line': order_line}"
+msgstr "{'order_line': order_line}"

+ 76 - 0
i18n/purchase_order_line_sequence.pot

@@ -0,0 +1,76 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+#	* purchase_order_line_sequence
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-05-21 01:53+0000\n"
+"PO-Revision-Date: 2015-05-21 01:53+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: purchase_order_line_sequence
+#: help:purchase.order.line,sequence:0
+msgid "Gives the sequence of this line when displaying the purchase order."
+msgstr ""
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:69
+#, python-format
+msgid "Greater or equal than 1"
+msgstr ""
+
+#. module: purchase_order_line_sequence
+#: model:ir.model,name:purchase_order_line_sequence.model_purchase_order
+msgid "Purchase Order"
+msgstr ""
+
+#. module: purchase_order_line_sequence
+#: model:ir.model,name:purchase_order_line_sequence.model_purchase_order_line
+msgid "Purchase Order Line"
+msgstr ""
+
+#. module: purchase_order_line_sequence
+#: field:purchase.order.line,sequence:0
+msgid "Sequence"
+msgstr ""
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:46
+#, python-format
+msgid "The next sequence numbers are already used"
+msgstr ""
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:68
+#, python-format
+msgid "The sequence must be a positive number!"
+msgstr ""
+
+#. module: purchase_order_line_sequence
+#: code:addons/purchase_order_line_sequence/model/purchase.py:45
+#, python-format
+msgid "The sequence must be unique per purchase order!"
+msgstr ""
+
+#. module: purchase_order_line_sequence
+#: field:purchase.order,website_message_ids:0
+msgid "Website Messages"
+msgstr ""
+
+#. module: purchase_order_line_sequence
+#: help:purchase.order,website_message_ids:0
+msgid "Website communication history"
+msgstr ""
+
+#. module: purchase_order_line_sequence
+#: view:purchase.order:purchase_order_line_sequence.purchase_order_sequence_form
+msgid "{'order_line': order_line}"
+msgstr ""
+

+ 26 - 0
model/__init__.py

@@ -0,0 +1,26 @@
+# coding: utf-8
+###############################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#    Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
+#    All Rights Reserved
+###############################################################################
+#    Credits:
+#    Coded by: Katherine Zaoral <kathy@vauxoo.com>
+#    Planified by: Nhomar Hernandez <nhomar@vauxoo.com>
+#    Audited by: Nhomar Hernandez <nhomar@vauxoo.com>
+###############################################################################
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+###############################################################################
+
+from . import purchase

+ 81 - 0
model/purchase.py

@@ -0,0 +1,81 @@
+# coding: utf-8
+###############################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#    Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
+#    All Rights Reserved
+###############################################################################
+#    Credits:
+#    Coded by: Katherine Zaoral <kathy@vauxoo.com>
+#    Planified by: Nhomar Hernandez <nhomar@vauxoo.com>
+#    Audited by: Nhomar Hernandez <nhomar@vauxoo.com>
+###############################################################################
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+###############################################################################
+
+from openerp import models, fields, api
+from openerp.exceptions import ValidationError
+from openerp.tools.translate import _
+
+
+class PurchaseRequisition(models.Model):
+
+    _inherit = 'purchase.requisition'
+
+    @api.model
+    def _prepare_purchase_order_line(
+            self, requisition, requisition_line, purchase_id, supplier):
+        res = super(PurchaseRequisition, self)._prepare_purchase_order_line(
+            requisition, requisition_line, purchase_id, supplier)
+        purchase = self.env['purchase.order'].browse(purchase_id)
+        next_sequence = len(purchase.order_line) + 1
+        res.update({'sequence': next_sequence})
+        return res
+
+
+class PurchaseOrder(models.Model):
+
+    _inherit = 'purchase.order'
+
+    @api.constrains('order_line')
+    def _check_order_lines_sequence(self):
+        """check that the sequence is unique per purchase order line.
+        """
+        all_sequences = self.order_line.mapped('sequence')
+        sequences = list(set(all_sequences))
+        if len(all_sequences) != len(sequences):
+            raise ValidationError(
+                _('The sequence must be unique per purchase order!') + ".\n" +
+                _('The next sequence numbers are already used') + ":\n" +
+                str(sequences))
+
+
+class PurchaseOrderLine(models.Model):
+
+    _inherit = 'purchase.order.line'
+    _order = "sequence"
+
+    sequence = fields.Integer(
+        string='Sequence',
+        help="Gives the sequence of this line when displaying the"
+             " purchase order.")
+
+    @api.model
+    def default_get(self, fields_list):
+        """Overwrite the default value of the sequence field taking into account
+        the current number of lines in the purchase order. If is not call from
+        the purchase order will use the default value.
+        """
+        res = super(PurchaseOrderLine, self).default_get(fields_list)
+        res.update({'sequence': len(self._context.get('order_line', [])) + 1})
+        return res

BIN
static/description/icon.png


+ 101 - 0
static/description/index.html

@@ -0,0 +1,101 @@
+<head>
+  <style>
+      .backgrounds{background-color:#fff;color:#a41d35}
+  </style>
+</head>
+
+
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <h2 class="oe_slogan">Purchase Order Line Sequence</h2>
+        <h3 class="oe_slogan">Enumerate purchase order lines</h3>
+        <div class="oe_span6">
+            <img class="oe_picture oe_screenshot" src="purchase.order.line.sequence.png">
+        </div>
+        <div class="oe_span6">
+            <p class='oe_mt32'>
+                New functionality to visually identificate the purchase
+                order lines and sort then asc.
+            </p>
+            <p class='oe_mt32'>
+                A new field "sequence" was added to the lines of the purchase
+                order for automatic enumerate lines when they are created from
+                the purchase order. The sequence field exploits the special
+                field functionality allowing drag and drop the line to
+                re-enumerate.
+            </p>
+            <p class='oe_mt32'>
+
+            </p>
+        </div>
+    </div>
+</section>
+
+<section class="oe_container oe_dark">
+    <h2 class="oe_slogan">Features</h2>
+
+    <div class="oe_row">
+        <div class="oe_span6">
+            <p class='oe_mt32'>
+                This sequence is a incremental number.
+                It increments one by one. You can also change the
+                generate sequence number by hand to set the sequence number
+                you want. After you save the purchase order lines will be
+                re-ordered with the sequence value given.
+            </p>
+        </div>
+        <div class="oe_span6">
+            <img class="oe_picture oe_screenshot" src="purchase.order.line.sequence.automatic.png">
+        </div>
+    </div>
+    <div class="oe_row">
+        <div class="oe_span6">
+            <img class="oe_picture oe_screenshot" src="purchase.order.line.sequence.unique.png">
+        </div>
+        <div class="oe_span6">
+            <p class='oe_mt32'>
+                Also the sequence field is validate to be unique per purchase
+                order so the sequence number to identificate lines
+                can not be repeat into the lines of a purchase order.
+            </p>
+        </div>
+    </div>
+</section>
+
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <div class="oe_span6">
+            <h2 class="oe_slogan">Do you need help?</h2>
+            <h3 class="oe_slogan">
+                Let's offer you the best services!
+            </h3>
+            <p class="oe_mt32 text-center">
+                Contact us by our official channels.
+            </p>
+            <div class="oe_spaced">
+                <ul class="text-center list-inline">
+                    <li>
+                        <a href="https://facebook.com/vauxoo" Target="_blank"><i class="fa fa-facebook-square fa-xs backgrounds"></i></a>
+                    </li>
+                    <li>
+                        <a href="https://twitter.com/vauxoo" Target="_blank" ><i class="fa fa-twitter-square fa-xs backgrounds"></i></a>
+                    </li>
+                    <li>
+                        <a href="https://www.linkedin.com/company/vauxoo" Target="_blank"><i class="fa fa-linkedin-square fa-xs backgrounds"></i></a>
+                    </li>
+                    <li>
+                        <a title="Contact us" data-toggle="tooltip" data-placement="left" Target="_blank" href="https://www.vauxoo.com/page/website.contactus"><i class="fa fa-envelope-square fa-xs backgrounds"></i></a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+        <div class="oe_span6">
+            <div class="oe_demo oe_picture oe_screenshot">
+                <a href="https://www.vauxoo.com"  target="_blank"r>
+                    <img src="https://s3.amazonaws.com/s3.vauxoo.com/description_logo.png" width="200" height="auto">
+                </a>
+                <div class="oe_demo_footer oe_centeralign">Meet Us</div>
+            </div>
+        </div>
+    </div>
+</section>

BIN
static/description/purchase.order.line.sequence.automatic.png


BIN
static/description/purchase.order.line.sequence.png


BIN
static/description/purchase.order.line.sequence.unique.png


+ 70 - 0
view/purchase_view.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <!-- purchase order line tree -->
+        <record id="purchase_order_line_sequence_tree" model="ir.ui.view">
+            <field name="name">purchase.order.line.sequence.tree</field>
+            <field name="model">purchase.order.line</field>
+            <field name="inherit_id" ref="purchase.purchase_order_line_tree"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='order_id']" position="after">
+                    <field name="sequence"/>
+                </xpath>
+            </field>
+        </record>
+
+        <!-- purchase order line tree showed in the purchase requisition form -->
+        <record id="purchase_order_line_sequence_tree_tender" model="ir.ui.view">
+            <field name="name">purchase.order.line.sequence.tree.tender</field>
+            <field name="model">purchase.order.line</field>
+            <field name="inherit_id" ref="purchase_requisition.purchase_order_line_tree_tender"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='name']" position="before">
+                    <field name="sequence"/>
+                </xpath>
+            </field>
+        </record>
+
+        <!-- purchase order line form -->
+        <record id="purchase_order_line_sequence_form" model="ir.ui.view">
+            <field name="name">purchase.order.line.sequence.form</field>
+            <field name="model">purchase.order.line</field>
+            <field name="inherit_id" ref="purchase.purchase_order_line_form"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='name']" position="after">
+                    <field name="sequence"/>
+                </xpath>
+            </field>
+        </record>
+
+
+        <!-- purchase order line form no create -->
+        <record id="purchase_order_line_sequence_form2" model="ir.ui.view">
+            <field name="name">purchase.order.line.sequence.form2</field>
+            <field name="model">purchase.order.line</field>
+            <field name="inherit_id" ref="purchase.purchase_order_line_form2"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='name']" position="after">
+                    <field name="sequence"/>
+                </xpath>
+            </field>
+        </record>
+
+        <!-- purchase order line tree embeded in the purchase order -->
+        <record id="purchase_order_sequence_form" model="ir.ui.view">
+            <field name="name">purchase.order.sequence.form</field>
+            <field name="model">purchase.order</field>
+            <field name="inherit_id" ref="purchase.purchase_order_form"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='order_line']/tree//field[@name='product_id']" position="before">
+                    <field name="sequence"/>
+                </xpath>
+                <xpath expr="//field[@name='order_line']" position="attributes">
+                    <attribute name="context">{'order_line': order_line}</attribute>
+                </xpath>
+            </field>
+        </record>
+
+    </data>
+</openerp>

+ 24 - 0
wizard/__init__.py

@@ -0,0 +1,24 @@
+# coding: utf-8
+###############################################################################
+#    Module Writen to OpenERP, Open Source Management Solution
+#    Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
+#    All Rights Reserved
+###############################################################################
+#    Credits:
+#    Coded by: Katherine Zaoral <kathy@vauxoo.com>
+#    Planified by: Nhomar Hernandez <nhomar@vauxoo.com>
+#    Audited by: Nhomar Hernandez <nhomar@vauxoo.com>
+###############################################################################
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published
+#    by the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+###############################################################################