-
-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by pedrobaeza
- Loading branch information
Showing
16 changed files
with
783 additions
and
0 deletions.
There are no files selected for viewing
96 changes: 96 additions & 0 deletions
96
account_invoice_report_grouped_by_picking_sale_mrp/README.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
============================================= | ||
Account Invoice Grouped by Picking - Sale MRP | ||
============================================= | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoice--reporting-lightgray.png?logo=github | ||
:target: https://github.com/OCA/account-invoice-reporting/tree/14.0/account_invoice_report_grouped_by_picking_sale_mrp | ||
:alt: OCA/account-invoice-reporting | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/account-invoice-reporting-14-0/account-invoice-reporting-14-0-account_invoice_report_grouped_by_picking_sale_mrp | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/94/14.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module extends the functionality of 'Account Invoice Grouped by Picking' | ||
module to allow you to to print correctly invoices with picking info | ||
when there are mrp kits in them. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
#. Go to *Manufacturing -> Master Data -> Bills of Materials* and create a | ||
new BoM selecting the product, 'Kit' in 'BoM Type' field and filling | ||
the components list. | ||
#. Go to *Sales -> Orders -> Quotations* and create a new quotation | ||
with the 'Kit' previously created and qty 1. | ||
#. Confirm the sale order and you will see one delivery (accessible | ||
via smart-button) with the components of the kit. | ||
#. Validate the delivery. | ||
#. Go back to the sale order and create an invoice by clicking on | ||
Create Invoice button in the status bar. | ||
#. Print the invoice and the generated report will have 1 group with | ||
the name of the sales order and the name of the delivery. Inside | ||
there will be a line with the name of the product and quantity 1, | ||
despite the delivery operation has the components of the kit. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoice-reporting/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 <https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_invoice_report_grouped_by_picking_sale_mrp%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Tecnativa | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
* Ernesto Tejeda | ||
* David Vidal | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
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. | ||
|
||
This module is part of the `OCA/account-invoice-reporting <https://github.com/OCA/account-invoice-reporting/tree/14.0/account_invoice_report_grouped_by_picking_sale_mrp>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
3 changes: 3 additions & 0 deletions
3
account_invoice_report_grouped_by_picking_sale_mrp/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from . import models |
13 changes: 13 additions & 0 deletions
13
account_invoice_report_grouped_by_picking_sale_mrp/__manifest__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright 2020 Tecnativa - Ernesto Tejeda | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Account Invoice Grouped by Picking - Sale MRP", | ||
"summary": "Take into account BoM kits in invoice report " "grouped by picking", | ||
"version": "15.0.1.0.0", | ||
"category": "Accounting & Finance", | ||
"website": "https://github.com/OCA/account-invoice-reporting", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"depends": ["sale_mrp", "account_invoice_report_grouped_by_picking"], | ||
} |
34 changes: 34 additions & 0 deletions
34
...t_grouped_by_picking_sale_mrp/i18n/account_invoice_report_grouped_by_picking_sale_mrp.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * account_invoice_report_grouped_by_picking_sale_mrp | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \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: account_invoice_report_grouped_by_picking_sale_mrp | ||
#: model:ir.model.fields,field_description:account_invoice_report_grouped_by_picking_sale_mrp.field_account_move__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: account_invoice_report_grouped_by_picking_sale_mrp | ||
#: model:ir.model.fields,field_description:account_invoice_report_grouped_by_picking_sale_mrp.field_account_move__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: account_invoice_report_grouped_by_picking_sale_mrp | ||
#: model:ir.model,name:account_invoice_report_grouped_by_picking_sale_mrp.model_account_move | ||
msgid "Journal Entry" | ||
msgstr "" | ||
|
||
#. module: account_invoice_report_grouped_by_picking_sale_mrp | ||
#: model:ir.model.fields,field_description:account_invoice_report_grouped_by_picking_sale_mrp.field_account_move____last_update | ||
msgid "Last Modified on" | ||
msgstr "" |
41 changes: 41 additions & 0 deletions
41
account_invoice_report_grouped_by_picking_sale_mrp/i18n/es.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * account_invoice_report_grouped_by_picking_sale_mrp | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2020-07-24 19:31+0000\n" | ||
"PO-Revision-Date: 2020-07-24 15:34-0400\n" | ||
"Last-Translator: <>\n" | ||
"Language-Team: \n" | ||
"Language: es\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: \n" | ||
"X-Generator: Poedit 2.0.6\n" | ||
|
||
#. module: account_invoice_report_grouped_by_picking_sale_mrp | ||
#: model:ir.model.fields,field_description:account_invoice_report_grouped_by_picking_sale_mrp.field_account_move__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: account_invoice_report_grouped_by_picking_sale_mrp | ||
#: model:ir.model.fields,field_description:account_invoice_report_grouped_by_picking_sale_mrp.field_account_move__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: account_invoice_report_grouped_by_picking_sale_mrp | ||
#: model:ir.model,name:account_invoice_report_grouped_by_picking_sale_mrp.model_account_move | ||
msgid "Journal Entry" | ||
msgstr "" | ||
|
||
#. module: account_invoice_report_grouped_by_picking_sale_mrp | ||
#: model:ir.model.fields,field_description:account_invoice_report_grouped_by_picking_sale_mrp.field_account_move____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#~ msgid "Invoice" | ||
#~ msgstr "Factura" |
3 changes: 3 additions & 0 deletions
3
account_invoice_report_grouped_by_picking_sale_mrp/models/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from . import account_move |
18 changes: 18 additions & 0 deletions
18
account_invoice_report_grouped_by_picking_sale_mrp/models/account_move.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2020 Tecnativa - Ernesto Tejeda | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import models | ||
|
||
|
||
class AccountInvoice(models.Model): | ||
_inherit = "account.move" | ||
|
||
def _get_signed_quantity_done(self, invoice_line, move, sign): | ||
res = super()._get_signed_quantity_done(invoice_line, move, sign) | ||
bom = self.env["mrp.bom"]._bom_find( | ||
products=invoice_line.product_id, company_id=self.company_id.id | ||
)[invoice_line.product_id] | ||
if bom and bom.type == "phantom": | ||
bom_line_data = bom.explode(invoice_line.product_id, 1)[1] | ||
res /= sum(map(lambda r: r[1]["qty"], bom_line_data)) | ||
return res |
4 changes: 4 additions & 0 deletions
4
account_invoice_report_grouped_by_picking_sale_mrp/readme/CONTRIBUTORS.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
* Ernesto Tejeda | ||
* David Vidal |
3 changes: 3 additions & 0 deletions
3
account_invoice_report_grouped_by_picking_sale_mrp/readme/DESCRIPTION.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This module extends the functionality of 'Account Invoice Grouped by Picking' | ||
module to allow you to to print correctly invoices with picking info | ||
when there are mrp kits in them. |
14 changes: 14 additions & 0 deletions
14
account_invoice_report_grouped_by_picking_sale_mrp/readme/USAGE.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#. Go to *Manufacturing -> Master Data -> Bills of Materials* and create a | ||
new BoM selecting the product, 'Kit' in 'BoM Type' field and filling | ||
the components list. | ||
#. Go to *Sales -> Orders -> Quotations* and create a new quotation | ||
with the 'Kit' previously created and qty 1. | ||
#. Confirm the sale order and you will see one delivery (accessible | ||
via smart-button) with the components of the kit. | ||
#. Validate the delivery. | ||
#. Go back to the sale order and create an invoice by clicking on | ||
Create Invoice button in the status bar. | ||
#. Print the invoice and the generated report will have 1 group with | ||
the name of the sales order and the name of the delivery. Inside | ||
there will be a line with the name of the product and quantity 1, | ||
despite the delivery operation has the components of the kit. |
Binary file added
BIN
+9.23 KB
account_invoice_report_grouped_by_picking_sale_mrp/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.