Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
VoicuStefan2001 committed Mar 28, 2024
1 parent c26c24b commit e38556c
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 14 deletions.
2 changes: 1 addition & 1 deletion l10n_ro_partner_create_by_vat_button/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Romania - Partner Create by VAT Button
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:cf25a46a3c2cebef16bf7e461a1cb750d1ae3ee10696dbf67a4c51c0036812b0
!! source digest: sha256:b7ea1a713e84cf52c890e1bdf285d0637578a02033e543e334cf0d89a356a441
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ <h1 class="title">Romania - Partner Create by VAT Button</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8a7921c2d043498cadba44eff07315c32f37f3a4eb645a9dc47f0ee3ed20b968
!! source digest: sha256:b7ea1a713e84cf52c890e1bdf285d0637578a02033e543e334cf0d89a356a441
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/dhongu/l10n-romania/tree/16.0/l10n_ro_partner_create_by_vat_button"><img alt="dhongu/l10n-romania" src="https://img.shields.io/badge/github-dhongu%2Fl10n--romania-lightgray.png?logo=github" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/dhongu/l10n-romania/tree/15.0/l10n_ro_partner_create_by_vat_button"><img alt="dhongu/l10n-romania" src="https://img.shields.io/badge/github-dhongu%2Fl10n--romania-lightgray.png?logo=github" /></a></p>
<blockquote>
<ul class="simple">
<li>Adaugare buton in ecran pentru recitire date ANF</li>
Expand All @@ -393,7 +393,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/dhongu/l10n-romania/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/dhongu/l10n-romania/issues/new?body=module:%20l10n_ro_partner_create_by_vat_button%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/dhongu/l10n-romania/issues/new?body=module:%20l10n_ro_partner_create_by_vat_button%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -416,7 +416,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/dhongu/l10n-romania/tree/16.0/l10n_ro_partner_create_by_vat_button">dhongu/l10n-romania</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/dhongu/l10n-romania/tree/15.0/l10n_ro_partner_create_by_vat_button">dhongu/l10n-romania</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<form string="Get Partner Data">
<div>
<p>Select service for partner:
<field name="partner_id" readonly="True"/>
<field name="partner_id" readonly="True" />
</p>

<field name="service" widget="radio" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from odoo import fields, models,api
from odoo import fields, models


class GetPartnerData(models.TransientModel):
Expand All @@ -12,15 +12,15 @@ class GetPartnerData(models.TransientModel):
)

def default_get(self, fields):
res = super(GetPartnerData, self).default_get(fields)
res = super().default_get(fields)
active_ids = self.env.context.get("active_ids", [])
active_model = self.env.context.get("active_model", "res.partner")
partner = self.env[active_model].browse(active_ids)
if partner:
res['partner_id'] = partner.id
res["partner_id"] = partner.id
return res

partner_id = fields.Many2one('res.partner', string='Partner')
partner_id = fields.Many2one("res.partner", string="Partner")

def do_get_data(self):
if self.service == "anaf":
Expand Down
57 changes: 57 additions & 0 deletions l10n_ro_partner_create_by_vat_openapi/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
==================================
Partner Create by VAT from OpenAPI
==================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:21fc53e027bb60d3ec64db208c600725b5cb0affc1590d201807534968fe6142
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-dhongu%2Fl10n--romania-lightgray.png?logo=github
:target: https://github.com/dhongu/l10n-romania/tree/15.0/l10n_ro_partner_create_by_vat_openapi
:alt: dhongu/l10n-romania

|badge1| |badge2| |badge3|

This modules adds the "Get Partner Data OpenAPI" in the contact from, by adding the vat number
in the name field and pressing the button the modules starts a search using your OpenAPI key
and fills in the information in the empty fields.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/dhongu/l10n-romania/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/dhongu/l10n-romania/issues/new?body=module:%20l10n_ro_partner_create_by_vat_openapi%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
~~~~~~~

* Terrabit

Maintainers
~~~~~~~~~~~

This module is part of the `dhongu/l10n-romania <https://github.com/dhongu/l10n-romania/tree/15.0/l10n_ro_partner_create_by_vat_openapi>`_ project on GitHub.

You are welcome to contribute.
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ <h1 class="title">Partner Create by VAT from OpenAPI</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:310e6ed958bf79bbd883342ee58b9b2648358d8c6dceea96c4a7e1762a572b39
!! source digest: sha256:21fc53e027bb60d3ec64db208c600725b5cb0affc1590d201807534968fe6142
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/dhongu/l10n-romania/tree/16.0/l10n_ro_partner_create_by_vat_openapi"><img alt="dhongu/l10n-romania" src="https://img.shields.io/badge/github-dhongu%2Fl10n--romania-lightgray.png?logo=github" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/dhongu/l10n-romania/tree/15.0/l10n_ro_partner_create_by_vat_openapi"><img alt="dhongu/l10n-romania" src="https://img.shields.io/badge/github-dhongu%2Fl10n--romania-lightgray.png?logo=github" /></a></p>
<p>This modules adds the “Get Partner Data OpenAPI” in the contact from, by adding the vat number
in the name field and pressing the button the modules starts a search using your OpenAPI key
and fills in the information in the empty fields.</p>
Expand All @@ -389,7 +389,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/dhongu/l10n-romania/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/dhongu/l10n-romania/issues/new?body=module:%20l10n_ro_partner_create_by_vat_openapi%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/dhongu/l10n-romania/issues/new?body=module:%20l10n_ro_partner_create_by_vat_openapi%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -402,7 +402,7 @@ <h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-4">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/dhongu/l10n-romania/tree/16.0/l10n_ro_partner_create_by_vat_openapi">dhongu/l10n-romania</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/dhongu/l10n-romania/tree/15.0/l10n_ro_partner_create_by_vat_openapi">dhongu/l10n-romania</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
Expand Down

0 comments on commit e38556c

Please sign in to comment.