Skip to content
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
87 changes: 87 additions & 0 deletions account_fiscal_position_allowed_journal_sale_purchase/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

================================================
Account Fiscal Position Allowed Journal Purchase
================================================

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

.. |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/license-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%2Fpurchase--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/purchase-workflow/tree/19.0/account_fiscal_position_allowed_journal_sale_purchase
:alt: OCA/purchase-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/purchase-workflow-19-0/purchase-workflow-19-0-account_fiscal_position_allowed_journal_sale_purchase
: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/purchase-workflow&target_branch=19.0
:alt: Try me on Runboat

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

Making the original module
account_fiscal_position_allowed_journal_purchase working when sale and
purchase are both installed.

**Table of contents**

.. contents::
:local:

Configuration
=============

See configuration of Account Fiscal Position Allowed Journal.

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

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

* ACSONE SA/NV

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

- François Honoré <francois.honore@acsone.eu> (https://www.acsone.eu/)

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/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/19.0/account_fiscal_position_allowed_journal_sale_purchase>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Fiscal Position Allowed Journal Purchase",
"summary": """Glue module between Sale + purchase +
account fiscal position allowed journal purchase""",
"version": "19.0.1.0.0",
"development_status": "Beta",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/purchase-workflow",
"depends": ["sale_purchase", "account_fiscal_position_allowed_journal_purchase"],
"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_fiscal_position_allowed_journal_sale_purchase
#
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: account_fiscal_position_allowed_journal_sale_purchase
#: model:ir.model,name:account_fiscal_position_allowed_journal_sale_purchase.model_account_move
msgid "Journal Entries"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import account_move
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, models


class AccountMove(models.Model):
_inherit = "account.move"

@api.depends("line_ids.purchase_line_id.order_id.fiscal_position_id")
def _compute_fiscal_position_id(self): # pylint: disable=missing-return
"""When both sale and purchase are installed, the fiscal position is
recomputed from the partner whenever a related field changes, which
would override the one set on the originating purchase order. Keep the
purchase order's fiscal position on the related vendor bill.
"""
super()._compute_fiscal_position_id()
for move in self:
purchase_order = move.line_ids.purchase_line_id.order_id[:1]
if purchase_order.fiscal_position_id:
move.fiscal_position_id = purchase_order.fiscal_position_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See configuration of Account Fiscal Position Allowed Journal.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- François Honoré \<francois.honore@acsone.eu\>
(<https://www.acsone.eu/>)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Making the original module
account_fiscal_position_allowed_journal_purchase working when sale and
purchase are both installed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading