Skip to content

Commit

Permalink
Add stock_picking_invoice_product_group module
Browse files Browse the repository at this point in the history
  • Loading branch information
tafaRU committed Oct 3, 2016
1 parent 733fcf5 commit bf1933d
Show file tree
Hide file tree
Showing 11 changed files with 636 additions and 0 deletions.
102 changes: 102 additions & 0 deletions stock_picking_invoice_product_group/README.rst
@@ -0,0 +1,102 @@
.. 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

================================================
Invoices created from picking grouped by product
================================================

This module allows you to group invoices generated from pickings by product
or by product category.

Usage
=====

This is possible by selecting the related option in the wizard used
for creating draft invoices.

Example
--------

Created the following pickings:

1. picking_1 - partner_1
1. product_A - category_1
2. product_B - category_2
2. picking_2 - partner_2
1. product_C - category_2
2. product_D - category_3
3. picking_3 - partner_1
1. product_C - category_2
2. product_D - category_3
3. product_A - category_1

Selecting option 'Group by product category' I get the following invoices:

1. invoice_1 - partner_1
1. product_A - category_1 --> picking_1
2. product_A - category_1 --> picking_3
2. invoice_2 - partner_1
1. product_B - category_2 --> picking_1
2. product_C - category_2 --> picking_3
3. invoice_3 - partner_1
1. product_D - category_3 --> picking_3
4. invoice_4 - partner_2
1. product_C - category_2 --> picking_2
5. invoice_5 - partner_2
1. product_D - category_3 --> picking_2

On the contrary if I select option 'Group by product' I get the following
invoices:

1. invoice_1 - partner_1
1. product_A - category_1 --> picking_1
2. product_A - category_1 --> picking_3
2. invoice_2 - partner_1
1. product_B - category_2 --> picking_1
3. invoice_3 - partner_1
1. product_C - category_2 --> picking_3
4. invoice_4 - partner_1
1. product_D - category_3 --> picking_3
5. invoice_5 - partner_2
1. product_C - category_2 --> picking_2
6. invoice_6 - partner_2
1. product_D - category_3 --> picking_2

Usage
=====

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/95/8.0

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/account_invoicing/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.

Credits
=======

Contributors
------------

* Alex Comba <alex.comba@agilebg.com>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://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.
5 changes: 5 additions & 0 deletions stock_picking_invoice_product_group/__init__.py
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Alex Comba - Agile Business Group
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import wizard
24 changes: 24 additions & 0 deletions stock_picking_invoice_product_group/__openerp__.py
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Alex Comba - Agile Business Group
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
'name': 'Stock invoices grouped by product',
'summary':
'Invoices created from picking grouped by product or by product category',
'version': '8.0.1.0.0',
'category': 'Generic Modules/Accounting',
'author': "Agile Business Group, Odoo Community Association (OCA)",
'website': 'http://www.agilebg.com',
'license': 'AGPL-3',
'depends': [
'stock_picking_invoice_link',
],
'data': [
'wizards/stock_invoice_onshipping_view.xml',
],
'demo': [
'demo/product.xml',
],
'installable': True,
}
49 changes: 49 additions & 0 deletions stock_picking_invoice_product_group/demo/product.xml
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2016 Alex Comba - Agile Business Group
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->

<openerp>
<data noupdate="1">

<!-- Resource: res.partner -->

<record id="partner_1" model="res.partner">
<field name="name">Partner 1</field>
</record>
<record id="partner_2" model="res.partner">
<field name="name">Partner 2</field>
</record>

<!-- Resource: product.category -->

<record id="category_1" model="product.category">
<field name="name">Category 1</field>
</record>
<record id="category_2" model="product.category">
<field name="name">Category 2</field>
</record>
<record id="category_3" model="product.category">
<field name="name">Category 3</field>
</record>

<!-- Resource: product.product -->

<record id="product_A" model="product.product">
<field name="name">Product A</field>
<field name="categ_id" ref="category_1"/>
</record>
<record id="product_B" model="product.product">
<field name="name">Product B</field>
<field name="categ_id" ref="category_2"/>
</record>
<record id="product_C" model="product.product">
<field name="name">Product C</field>
<field name="categ_id" ref="category_2"/>
</record>
<record id="product_D" model="product.product">
<field name="name">Product D</field>
<field name="categ_id" ref="category_3"/>
</record>

</data>
</openerp>
72 changes: 72 additions & 0 deletions stock_picking_invoice_product_group/i18n/it.po
@@ -0,0 +1,72 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_invoice_product_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-03 10:19+0000\n"
"PO-Revision-Date: 2016-10-03 10:19+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: stock_picking_invoice_product_group
#: model:product.category,name:stock_picking_invoice_product_group.category_1
msgid "Category 1"
msgstr "Category 1"

#. module: stock_picking_invoice_product_group
#: model:product.category,name:stock_picking_invoice_product_group.category_2
msgid "Category 2"
msgstr "Category 2"

#. module: stock_picking_invoice_product_group
#: model:product.category,name:stock_picking_invoice_product_group.category_3
msgid "Category 3"
msgstr "Category 3"

#. module: stock_picking_invoice_product_group
#: field:stock.invoice.onshipping,group_type:0
msgid "Group Type"
msgstr "Tipo Raggruppo"

#. module: stock_picking_invoice_product_group
#: selection:stock.invoice.onshipping,group_type:0
msgid "Group by product"
msgstr "Raggruppo per Prodotto"

#. module: stock_picking_invoice_product_group
#: selection:stock.invoice.onshipping,group_type:0
msgid "Group by product category"
msgstr "Raggruppo per Categoria"

#. module: stock_picking_invoice_product_group
#: model:product.template,name:stock_picking_invoice_product_group.product_A_product_template
msgid "Product A"
msgstr "Product A"

#. module: stock_picking_invoice_product_group
#: model:product.template,name:stock_picking_invoice_product_group.product_B_product_template
msgid "Product B"
msgstr "Product B"

#. module: stock_picking_invoice_product_group
#: model:product.template,name:stock_picking_invoice_product_group.product_C_product_template
msgid "Product C"
msgstr "Product C"

#. module: stock_picking_invoice_product_group
#: model:product.template,name:stock_picking_invoice_product_group.product_D_product_template
msgid "Product D"
msgstr "Product D"

#. module: stock_picking_invoice_product_group
#: model:ir.model,name:stock_picking_invoice_product_group.model_stock_invoice_onshipping
msgid "Stock Invoice Onshipping"
msgstr "Fattura su spedizioni"

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions stock_picking_invoice_product_group/tests/__init__.py
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# (c) 2015 Alex Comba - Agile Business Group
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import test_invoice_product_group

0 comments on commit bf1933d

Please sign in to comment.