Skip to content

Commit

Permalink
Merge PR #2912 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by antoniospneto
  • Loading branch information
OCA-git-bot committed Sep 6, 2024
2 parents 6f7ed37 + 70298c9 commit 112d847
Show file tree
Hide file tree
Showing 40 changed files with 7,184 additions and 0 deletions.
160 changes: 160 additions & 0 deletions l10n_br_purchase/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
===============================
Brazilian Localization Purchase
===============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:777247e6d2e647c876756a11810ff026c3ada23c9a448d51f5904bcba655749a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fl10n--brazil-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-brazil/tree/16.0/l10n_br_purchase
:alt: OCA/l10n-brazil
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-brazil-16-0/l10n-brazil-16-0-l10n_br_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/l10n-brazil&target_branch=16.0
:alt: Try me on Runboat

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

Este módulo integra a parte fiscal do módulo ``l10n_br_fiscal`` com o
módulo de compra purchase do Odoo. O módulo permite o cálculo dos
impostos brasileiros já no pedido de compra e propaga a operação fiscal
até a nota fiscal de compra, deixando ela com a tributação mais correta
possível para seu financeiro (sendo que vocẽ poderia também importar o
XML da nota depois).

O relatório de compra também é estendido para apresentar os impostos
brasileiros.

Este módulo é indicado para a compra de itens com NFe's. Mas se você
quer gerenciar suas notas de entradas de acordo com o recebimento do
material, você pode também ter interesse no módulo
``l10n_br_purchase_stock`` que permite isso.

**Table of contents**

.. contents::
:local:

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

This module depends on:

- purchase
- l10n_br_account

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

No configuration required.

Usage
=====



Known issues / Roadmap
======================



Changelog
=========

14.0.1.0.0 (2022-06-02)
-----------------------

- Module migration.

13.0.1.0.0 (2021-01-14)
-----------------------

- Module migration.

12.0.1.0.0 (2021-01-30)
-----------------------

- Module migration.

10.0.1.0.0 (2019-09-20)
-----------------------

- Module migration.

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

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

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

- `Akretion <https://akretion.com/pt-BR>`__:

- Renato Lima <[email protected]>
- Raphaël Valyi <[email protected]>

- `KMEE <https://www.kmee.com.br>`__:

- Luis Felipe Mileo <[email protected]>

Other credits
-------------

The development of this module has been financially supported by:

- AKRETION LTDA - `www.akretion.com <http://www.akretion.com>`__

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-renatonlima| image:: https://github.com/renatonlima.png?size=40px
:target: https://github.com/renatonlima
:alt: renatonlima
.. |maintainer-rvalyi| image:: https://github.com/rvalyi.png?size=40px
:target: https://github.com/rvalyi
:alt: rvalyi

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

|maintainer-renatonlima| |maintainer-rvalyi|

This module is part of the `OCA/l10n-brazil <https://github.com/OCA/l10n-brazil/tree/16.0/l10n_br_purchase>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
7 changes: 7 additions & 0 deletions l10n_br_purchase/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from .hooks import post_init_hook

from . import models
from . import reports
33 changes: 33 additions & 0 deletions l10n_br_purchase/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (C) 2009 Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
"name": "Brazilian Localization Purchase",
"license": "AGPL-3",
"category": "Localisation",
"author": "Akretion, Odoo Community Association (OCA)",
"maintainers": ["renatonlima", "rvalyi"],
"website": "https://github.com/OCA/l10n-brazil",
"version": "16.0.1.0.0",
"depends": ["purchase", "l10n_br_account"],
"data": [
# Security
"security/ir.model.access.csv",
# Data
"data/company.xml",
# View
"views/purchase_view.xml",
"views/res_company_view.xml",
# Reports
"reports/purchase_report_views.xml",
# "reports/purchase_order_templates.xml",
],
"demo": [
"demo/company.xml",
"demo/product.xml",
"demo/l10n_br_purchase.xml",
],
"installable": True,
"post_init_hook": "post_init_hook",
"auto_install": False,
}
9 changes: 9 additions & 0 deletions l10n_br_purchase/data/company.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">

<!-- res.company -->
<record id="base.main_company" model="res.company">
<field name="purchase_fiscal_operation_id" ref="l10n_br_fiscal.fo_compras" />
</record>

</odoo>
13 changes: 13 additions & 0 deletions l10n_br_purchase/demo/company.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<!-- Demo Company -->
<record id="l10n_br_base.empresa_simples_nacional" model="res.company">
<field name="purchase_fiscal_operation_id" ref="l10n_br_fiscal.fo_compras" />
</record>

<record id="l10n_br_base.empresa_lucro_presumido" model="res.company">
<field name="purchase_fiscal_operation_id" ref="l10n_br_fiscal.fo_compras" />
</record>

</odoo>
71 changes: 71 additions & 0 deletions l10n_br_purchase/demo/fiscal_operation_generic.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- pylint:disable=file-not-used -->
<odoo>

<!-- Compras -->
<record
forcecreate="True"
id="property_fo_compras_journal_empresa_lp"
model="ir.property"
>
<field name="name">fiscal_operation_journal_id</field>
<field
name="fields_id"
search="[('model','=','l10n_br_fiscal.operation'),('name','=','journal_id')]"
/>
<field
eval="'l10n_br_fiscal.operation,'+str(ref('l10n_br_fiscal.fo_compras'))"
name="res_id"
/>
<field
eval="'account.journal,'+str(ref('l10n_br_coa_generic.purchase_journal_empresa_lp'))"
name="value"
/>
<field name="company_id" ref="l10n_br_base.empresa_lucro_presumido" />
</record>

<!-- Devolução de Compras -->
<record
forcecreate="True"
id="property_fo_devolucao_compras_journal_empresa_lp"
model="ir.property"
>
<field name="name">fiscal_operation_journal_id</field>
<field
name="fields_id"
search="[('model','=','l10n_br_fiscal.operation'),('name','=','journal_id')]"
/>
<field
eval="'l10n_br_fiscal.operation,'+str(ref('l10n_br_fiscal.fo_devolucao_compras'))"
name="res_id"
/>
<field
eval="'account.journal,'+str(ref('l10n_br_coa_generic.general_journal_empresa_lp'))"
name="value"
/>
<field name="company_id" ref="l10n_br_base.empresa_lucro_presumido" />
</record>

<!-- Outras Emtradas -->
<record
forcecreate="True"
id="property_fo_entrada_remessa_journal_empresa_lp"
model="ir.property"
>
<field name="name">fiscal_operation_journal_id</field>
<field
name="fields_id"
search="[('model','=','l10n_br_fiscal.operation'),('name','=','journal_id')]"
/>
<field
eval="'l10n_br_fiscal.operation,'+str(ref('l10n_br_fiscal.fo_entrada_remessa'))"
name="res_id"
/>
<field
eval="'account.journal,'+str(ref('l10n_br_coa_generic.general_journal_empresa_lp'))"
name="value"
/>
<field name="company_id" ref="l10n_br_base.empresa_lucro_presumido" />
</record>

</odoo>
Loading

0 comments on commit 112d847

Please sign in to comment.