Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][MIG] stock_picking_batch_extended_account_sale_type: Migration to version 15.0 #1157

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions setup/stock_picking_batch_extended_account_sale_type/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
85 changes: 85 additions & 0 deletions stock_picking_batch_extended_account_sale_type/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
==============================================
Stock batch picking extended account sale type
==============================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fstock--logistics--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-workflow/tree/15.0/stock_picking_batch_extended_account_sale_type
:alt: OCA/stock-logistics-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_batch_extended_account_sale_type
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/154/15.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends stock_picking_batch_extended_account module to allow to set
auto invoice from batch picking in sale order type.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-workflow/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/stock-logistics-workflow/issues/new?body=module:%20stock_picking_batch_extended_account_sale_type%0Aversion:%2015.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>`_:

* Carlos Dauden
* Sergio Teruel

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.

.. |maintainer-ernestotejeda| image:: https://github.com/ernestotejeda.png?size=40px
:target: https://github.com/ernestotejeda
:alt: ernestotejeda

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ernestotejeda|

This module is part of the `OCA/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/15.0/stock_picking_batch_extended_account_sale_type>`_ 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 stock_picking_batch_extended_account_sale_type/__init__.py
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
17 changes: 17 additions & 0 deletions stock_picking_batch_extended_account_sale_type/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2022 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Stock batch picking extended account sale type",
"summary": "Generates invoices when batch is set to Done state",
"version": "15.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["ernestotejeda"],
"development_status": "Beta",
"category": "Warehouse Management",
"depends": ["stock_picking_batch_extended_account", "sale_order_type"],
"website": "https://github.com/OCA/stock-logistics-workflow",
"data": ["views/sale_order_type_views.xml"],
"installable": True,
"license": "AGPL-3",
}
54 changes: 54 additions & 0 deletions stock_picking_batch_extended_account_sale_type/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_batch_extended_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-31 17:29+0000\n"
"PO-Revision-Date: 2022-07-31 19:31+0200\n"
"Last-Translator: Sergio Teruel <sergio.teruel@tecnativa.com>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Poedit 2.3\n"

#. module: stock_picking_batch_extended_account_sale_type
#: model:ir.model.fields,field_description:stock_picking_batch_extended_account_sale_type.field_res_partner__batch_picking_auto_invoice
#: model:ir.model.fields,field_description:stock_picking_batch_extended_account_sale_type.field_res_users__batch_picking_auto_invoice
#: model:ir.model.fields,field_description:stock_picking_batch_extended_account_sale_type.field_sale_order_type__batch_picking_auto_invoice
msgid "Batch Picking Auto Invoice"
msgstr "Facturación automática en agrupación de albaranes"

#. module: stock_picking_batch_extended_account_sale_type
#: model:ir.model,name:stock_picking_batch_extended_account_sale_type.model_stock_picking_batch
msgid "Batch Transfer"
msgstr "Agrupación de albaranes"

#. module: stock_picking_batch_extended_account_sale_type
#: model:ir.model.fields.selection,name:stock_picking_batch_extended_account_sale_type.selection__res_partner__batch_picking_auto_invoice__sale_type
msgid "By sale type"
msgstr "Por tipo de venta"

#. module: stock_picking_batch_extended_account_sale_type
#: model:ir.model,name:stock_picking_batch_extended_account_sale_type.model_res_partner
msgid "Contact"
msgstr "Contacto"

#. module: stock_picking_batch_extended_account_sale_type
#: model:ir.model,name:stock_picking_batch_extended_account_sale_type.model_sale_order_type
msgid "Type of sale order"
msgstr "Tipo de pedido de venta"

#~ msgid "Nothing to print."
#~ msgstr "Nada para imprimir."

#~ msgid "Print Invoices"
#~ msgstr "Imprimir facturas"

#~ msgid "Transfer"
#~ msgstr "Albarán"
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:
# * stock_picking_batch_extended_account_sale_type
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.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: stock_picking_batch_extended_account_sale_type
#: model:ir.model.fields,field_description:stock_picking_batch_extended_account_sale_type.field_res_partner__batch_picking_auto_invoice
#: model:ir.model.fields,field_description:stock_picking_batch_extended_account_sale_type.field_res_users__batch_picking_auto_invoice
#: model:ir.model.fields,field_description:stock_picking_batch_extended_account_sale_type.field_sale_order_type__batch_picking_auto_invoice
msgid "Batch Picking Auto Invoice"
msgstr ""

#. module: stock_picking_batch_extended_account_sale_type
#: model:ir.model,name:stock_picking_batch_extended_account_sale_type.model_stock_picking_batch
msgid "Batch Transfer"
msgstr ""

#. module: stock_picking_batch_extended_account_sale_type
#: model:ir.model.fields.selection,name:stock_picking_batch_extended_account_sale_type.selection__res_partner__batch_picking_auto_invoice__sale_type
msgid "By sale type"
msgstr ""

#. module: stock_picking_batch_extended_account_sale_type
#: model:ir.model,name:stock_picking_batch_extended_account_sale_type.model_res_partner
msgid "Contact"
msgstr ""

#. module: stock_picking_batch_extended_account_sale_type
#: model:ir.model,name:stock_picking_batch_extended_account_sale_type.model_sale_order_type
msgid "Type of sale order"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import res_partner
from . import sale_order_type
from . import stock_batch_picking
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class ResPartner(models.Model):
_inherit = "res.partner"

batch_picking_auto_invoice = fields.Selection(
selection_add=[("sale_type", "By sale type")]
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2022 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class SaleOrderType(models.Model):
_inherit = "sale.order.type"

batch_picking_auto_invoice = fields.Boolean()
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2022 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models


class StockBatchPicking(models.Model):
_inherit = "stock.picking.batch"

def _get_domain_picking_to_invoice(self):
domain = super()._get_domain_picking_to_invoice()
return [
"|",
"&",
("partner_id.batch_picking_auto_invoice", "=", "sale_type"),
("sale_id.type_id.batch_picking_auto_invoice", "=", True),
] + domain
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* `Tecnativa <https://www.tecnativa.com>`_:

* Carlos Dauden
* Sergio Teruel
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module extends stock_picking_batch_extended_account module to allow to set
auto invoice from batch picking in sale order type.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading