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

[MIG] account_payment_purchase_stock: Migration to 18.0 #1373

Open
wants to merge 12 commits into
base: 18.0
Choose a base branch
from
Open
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
106 changes: 106 additions & 0 deletions account_payment_purchase_stock/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
==============================
Account Payment Purchase Stock
==============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b15b891b0bc8f4e16bbc3795eb9be106e590b320ec98df4f82f32d3139731ebc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fbank--payment-lightgray.png?logo=github
:target: https://github.com/OCA/bank-payment/tree/18.0/account_payment_purchase_stock
:alt: OCA/bank-payment
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/bank-payment-18-0/bank-payment-18-0-account_payment_purchase_stock
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/bank-payment&target_branch=18.0
:alt: Try me on Runboat

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

This module combines the *account_payment_purchase* module with
*purchase_stock*.

**Table of contents**

.. contents::
:local:

Installation
============

This module depends on :

- purchase_stock
- account_payment_purchase

This module is part of the OCA/bank-payment suite.

Usage
=====

This module doesn't add any feature, but it is used by several other
modules.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/bank-payment/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/bank-payment/issues/new?body=module:%20account_payment_purchase_stock%0Aversion:%2018.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
-------

* Akretion
* Tecnativa

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

- Alexis de Lattre
- Alexandre Fayolle
- Danimar Ribeiro
- Raphaël Valyi
- Abraham Anes <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza <[email protected]>
- Vicent Cubells <[email protected]>

- Nikul Chaudhary <[email protected]>
- Miquel Raïch <[email protected]>
- Andrea Stirpe <[email protected]>

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/bank-payment <https://github.com/OCA/bank-payment/tree/18.0/account_payment_purchase_stock>`_ 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 account_payment_purchase_stock/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import models
16 changes: 16 additions & 0 deletions account_payment_purchase_stock/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2016 Akretion (<http://www.akretion.com>).
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Account Payment Purchase Stock",
"version": "18.0.1.0.0",
"category": "Banking addons",
"license": "AGPL-3",
"summary": "Integrate Account Payment Purchase with Stock",
"author": "Akretion, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/bank-payment",
"depends": ["account_payment_purchase", "purchase_stock"],
"installable": True,
"auto_install": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.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_payment_purchase_stock
#: model:ir.model,name:account_payment_purchase_stock.model_stock_rule
msgid "Stock Rule"
msgstr ""
22 changes: 22 additions & 0 deletions account_payment_purchase_stock/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-05-29 20:37+0000\n"
"Last-Translator: Santiago Payà <[email protected]>\n"
"Language-Team: none\n"
"Language: ca\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"
"X-Generator: Weblate 4.17\n"

#. module: account_payment_purchase_stock
#: model:ir.model,name:account_payment_purchase_stock.model_stock_rule
msgid "Stock Rule"
msgstr "Regla d’estoc"
22 changes: 22 additions & 0 deletions account_payment_purchase_stock/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-07-21 09:11+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: none\n"
"Language: es\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"
"X-Generator: Weblate 4.17\n"

#. module: account_payment_purchase_stock
#: model:ir.model,name:account_payment_purchase_stock.model_stock_rule
msgid "Stock Rule"
msgstr "Regla de existencias"
31 changes: 31 additions & 0 deletions account_payment_purchase_stock/i18n/es_AR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-04-01 03:48+0000\n"
"Last-Translator: Ignacio Buioli <[email protected]>\n"
"Language-Team: none\n"
"Language: es_AR\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"
"X-Generator: Weblate 4.3.2\n"

#. module: account_payment_purchase_stock
#: model:ir.model,name:account_payment_purchase_stock.model_stock_rule
msgid "Stock Rule"
msgstr "Regla de Inventario"

#~ msgid "Display Name"
#~ msgstr "Mostrar Nombre"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Última modificación en"
22 changes: 22 additions & 0 deletions account_payment_purchase_stock/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-06-29 12:08+0000\n"
"Last-Translator: Rémi <[email protected]>\n"
"Language-Team: none\n"
"Language: fr\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"
"X-Generator: Weblate 4.17\n"

#. module: account_payment_purchase_stock
#: model:ir.model,name:account_payment_purchase_stock.model_stock_rule
msgid "Stock Rule"
msgstr "Règle de stock"
28 changes: 28 additions & 0 deletions account_payment_purchase_stock/i18n/fr_FR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-04-10 14:47+0000\n"
"Last-Translator: Yves Le Doeuff <[email protected]>\n"
"Language-Team: none\n"
"Language: fr_FR\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"
"X-Generator: Weblate 4.3.2\n"

#. module: account_payment_purchase_stock
#: model:ir.model,name:account_payment_purchase_stock.model_stock_rule
msgid "Stock Rule"
msgstr "Règle de stockage"

#~ msgid "Display Name"
#~ msgstr "Nom affiché"

#~ msgid "Last Modified on"
#~ msgstr "Dernière modification"
31 changes: 31 additions & 0 deletions account_payment_purchase_stock/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_purchase_stock
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-06-07 13:15+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\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"
"X-Generator: Weblate 4.17\n"

#. module: account_payment_purchase_stock
#: model:ir.model,name:account_payment_purchase_stock.model_stock_rule
msgid "Stock Rule"
msgstr "Regola di giacenza"

#~ msgid "Display Name"
#~ msgstr "Nome visualizzato"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Ultima modifica il"
3 changes: 3 additions & 0 deletions account_payment_purchase_stock/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import stock_rule
22 changes: 22 additions & 0 deletions account_payment_purchase_stock/models/stock_rule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2015 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import models


class StockRule(models.Model):
_inherit = "stock.rule"

def _prepare_purchase_order(self, company_id, origins, values):
"""Propagate payment mode on MTO/drop shipping."""
res = super()._prepare_purchase_order(company_id, origins, values)
values = values[0]
partner = values["supplier"].partner_id
if partner:
res["payment_mode_id"] = partner.with_company(
self.company_id.id
).supplier_payment_mode_id.id
res["supplier_partner_bank_id"] = self.env[
"purchase.order"
]._get_default_supplier_partner_bank(partner)
return res
3 changes: 3 additions & 0 deletions account_payment_purchase_stock/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
11 changes: 11 additions & 0 deletions account_payment_purchase_stock/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- Alexis de Lattre
- Alexandre Fayolle
- Danimar Ribeiro
- Raphaël Valyi
- Abraham Anes \<<[email protected]>\>
- [Tecnativa](https://www.tecnativa.com):
- Pedro M. Baeza \<<[email protected]>\>
- Vicent Cubells \<<[email protected]>\>
- Nikul Chaudhary \<<[email protected]>\>
- Miquel Raïch \<<[email protected]>\>
- Andrea Stirpe \<<[email protected]>\>
2 changes: 2 additions & 0 deletions account_payment_purchase_stock/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module combines the *account_payment_purchase* module with
*purchase_stock*.
6 changes: 6 additions & 0 deletions account_payment_purchase_stock/readme/INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This module depends on :

- purchase_stock
- account_payment_purchase

This module is part of the OCA/bank-payment suite.
2 changes: 2 additions & 0 deletions account_payment_purchase_stock/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module doesn't add any feature, but it is used by several other
modules.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading