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

[16.0][mig] l10n_br_portal #2215

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
2cd982e
[NEW] l10n_br_portal base
mileo Dec 27, 2019
86d8edf
[NEW] Portal tests
mileo Dec 27, 2019
0cf8e3d
[NEW] Readme screenshot
mileo Dec 27, 2019
107a868
[NEW] Consultar CEP através do portal
mileo Jan 3, 2020
34e734b
[FIX] lint errors
mileo Jan 4, 2020
53fea6d
[NEW] Tests in l10n_br_portal
mileo Jan 4, 2020
266313c
[NEW] CNPJ / CPF / ZIP mask
mileo Jan 4, 2020
8878bea
[IMP] Test coverage of l10n_br_portal
mileo Jan 4, 2020
9af61ee
[FIX] Readme and manifest
mileo Jan 27, 2020
3a84b9a
[UPD] Update l10n_br_portal.pot
oca-travis Jan 27, 2020
5de13eb
[FIX] Remove tour user data
DiegoParadeda Apr 29, 2020
2b9a143
[REF] Demo portal test
mileo Apr 30, 2020
58c7ecb
[REF] Clear tests
mileo May 4, 2020
8a1cad8
[FIX] l10n_br_portal tests
mileo Sep 15, 2020
1f07efc
[REF] Portal tests
mileo Sep 15, 2020
df7033c
[IMP] Padronização README e INDEX l10n_br_portal
marcelsavegnago Jun 14, 2020
bcb8cc5
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Dec 17, 2020
c55abb9
Translated using Weblate (Portuguese (Brazil))
marcelsavegnago Dec 17, 2020
418d536
[REF] Mock l10n_br_portal zip search
mileo Apr 17, 2021
828af2f
[UPD] Update l10n_br_portal.pot
oca-travis Apr 17, 2021
1849f56
l10n_br_portal 12.0.1.1.0
OCA-git-bot Apr 18, 2021
34e90ae
[REF] l10n_br_portal: adapt ibge_code
renatonlima May 19, 2021
29a7457
l10n_br_portal 12.0.1.2.0
OCA-git-bot May 21, 2021
4106da9
[REF] Standard OCA website l10n_br_portal
mileo May 30, 2021
002808d
disable eslint checks problematic with Cleave.js
rvalyi Jun 12, 2021
3333fa5
[IMP] l10n_br_portal: black, isort, prettier
rvalyi Jun 12, 2021
f142e2d
[UPD] README.rst
OCA-git-bot Jun 16, 2021
67b5e7d
[IMP] l10n_br_portal: black, isort, prettier
marcelsavegnago Jan 8, 2022
b1b5970
[IMP] l10n_br_portal: rename street to street_name
marcelsavegnago Jan 8, 2022
4c4e147
[IMP] l10n_br_portal: change .size() to .length
marcelsavegnago Jan 8, 2022
f70b8cb
[IMP] l10n_br_portal: move the country field to before the zip field
marcelsavegnago Jan 8, 2022
bf8c92e
[MIG] l10n_br_portal: Migration to 14.0
marcelsavegnago Jan 8, 2022
01c0b1b
MIG fix js test
rvalyi Jan 8, 2022
ee4e1ba
[FIX] l10n_br_portal: fix start tour
marcelsavegnago Jan 8, 2022
470c269
[FIX] l10n_br_portal: remove mandatory field street
marcelsavegnago Feb 14, 2022
e836215
[IMP] l10n_br_portal: add mandatory field street_name
marcelsavegnago Feb 14, 2022
e575d45
[FIX] l10n_br_portal: pre-commit
marcelsavegnago Feb 14, 2022
9b917e9
[FIX] l10n_br_portal: fix final trigger
marcelsavegnago Feb 14, 2022
8dc9f5b
[UPD] Update l10n_br_portal.pot
oca-travis Feb 18, 2022
102e802
[UPD] README.rst
OCA-git-bot Feb 18, 2022
17ace1c
[UPD] Update l10n_br_portal.pot
oca-travis Jun 10, 2022
4488e4c
Update translation files
oca-transbot Jun 10, 2022
8e4f903
Translated using Weblate (Portuguese (Brazil))
marcelsavegnago Jul 28, 2022
66be6db
[REF] deprecade data xml node l10n_br_portal
mileo Oct 21, 2022
bc46389
l10n_br_portal 14.0.1.0.1
OCA-git-bot Oct 22, 2022
07077b3
[REF] dangerous-qweb-replace-wo-priority l10n_br_portal
mileo Oct 22, 2022
4cd223b
l10n_br_portal 14.0.1.0.2
OCA-git-bot Oct 22, 2022
14601f1
[IMP] l10n_br_portal: black, isort, prettier
Oct 28, 2022
f329f76
[MIG] [l10n_br_portal] Bump module version to 16.0.1.0.0
Oct 28, 2022
8fe4fea
[MIG] [l10n_br_portal] Importando assets atraves do manifest
Oct 28, 2022
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
92 changes: 92 additions & 0 deletions l10n_br_portal/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
==============
L10n Br Portal
==============

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fl10n--brazil-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_portal
: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-14-0/l10n-brazil-14-0-l10n_br_portal
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/124/14.0
:alt: Try me on Runbot

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

Localização do módulo portal

**Table of contents**

.. contents::
:local:

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

To install this module, you need to do nothing

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

To configure this module, you need to do nothing

Usage
=====

To use this module, you need go to portal and edit your contact info:

.. figure:: https://raw.githubusercontent.com/OCA/l10n-brazil/14.0/l10n_br_portal/static/description/screenshot1.png
:alt: campos
:width: 800 px

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-brazil/issues/new?body=module:%20l10n_br_portal%0Aversion:%2014.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
~~~~~~~

* KMEE

Contributors
~~~~~~~~~~~~

* Luis Felipe Mileo <mileo@kmee.com.br> (https://www.kmee.com.br)

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/l10n-brazil <https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_portal>`_ 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 l10n_br_portal/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2016 KMEE - Luis Felipe Miléo <mileo@kmee.com.br>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl
from . import controllers
30 changes: 30 additions & 0 deletions l10n_br_portal/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2019 KMEE
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "L10n Br Portal",
"summary": """
Campos Brasileiros no Portal""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "KMEE,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-brazil",
"depends": [
"portal",
"l10n_br_zip",
],
"demo": [
"demo/res_users_demo.xml",
],
"data": [
"views/portal_templates.xml",
],
"assets": {
"web.assets_backend": [
"/l10n_br_portal/static/src/js/l10n_br_portal.js",
"/l10n_br_portal/static/src/js/l10n_br_portal_tour.js",
"/l10n_br_portal/static/lib/cleave/cleave.min.js",
],
},
"auto_install": True,
}
3 changes: 3 additions & 0 deletions l10n_br_portal/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2016 KMEE - Luis Felipe Miléo <mileo@kmee.com.br>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl
from . import portal
55 changes: 55 additions & 0 deletions l10n_br_portal/controllers/portal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright 2016 KMEE - Luis Felipe Miléo <mileo@kmee.com.br>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import http
from odoo.http import request

from odoo.addons.portal.controllers.portal import CustomerPortal


class L10nBrPortal(CustomerPortal):
MANDATORY_BILLING_FIELDS = list(
set(CustomerPortal.MANDATORY_BILLING_FIELDS) - {"street"}
) + [
"state_id",
"city_id",
"district",
"street_number",
"legal_name",
"cnpj_cpf",
"zipcode",
"inscr_est",
"street_name",
]
OPTIONAL_BILLING_FIELDS = list(
set(CustomerPortal.OPTIONAL_BILLING_FIELDS) - {"state_id"}
) + ["inscr_mun", "street2", "mobile"]

def _prepare_portal_layout_values(self):
values = super(L10nBrPortal, self)._prepare_portal_layout_values()
cities = request.env["res.city"].sudo().search([])
values.update(
{
"cities": cities,
}
)
return values

@http.route(["/my/account"], type="http", auth="user", website=True)
def account(self, redirect=None, **post):
if post and post.get("city_id"):
city_id = request.env["res.city"].sudo().browse(int(post.get("city_id")))
if city_id:
post["city"] = city_id.name
res = super(L10nBrPortal, self).account(redirect, **post)
return res

@http.route("/l10n_br/zip_search", type="json", auth="user", website=True)
def zip_search(self, zipcode):
try:
return request.env["l10n_br.zip"].sudo()._consultar_cep(zipcode)
except Exception as e:
return {
"error": "zip",
"error_message": e,
}
29 changes: 29 additions & 0 deletions l10n_br_portal/demo/res_users_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">

<!-- Portal : partner and user -->
<record
id="demo_user_kmee"
model="res.users"
context="{'no_reset_password': True}"
>
<field name="partner_id" ref="l10n_br_base.res_partner_kmee" />
<field name="login">kmee</field>
<field name="password">kmee</field>
<field
name="signature"
><![CDATA[<span>-- <br/>KMEE Demo Portal</span>]]></field>
<field
name="groups_id"
eval="[(5,)]"
/><!-- Avoid auto-including this user in any default group -->
</record>

<record
id="base.group_portal"
model="res.groups"
><!-- Add the demo user to the portal (and therefore to the portal member group) -->
<field name="users" eval="[(4,ref('demo_user_kmee'))]" />
</record>

</odoo>
126 changes: 126 additions & 0 deletions l10n_br_portal/i18n/l10n_br_portal.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_br_portal
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.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: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Bairro"
msgstr ""

#. module: l10n_br_portal
#: model:res.users,nfe40_xPais:l10n_br_portal.demo_user_kmee
msgid "Brazil"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "CNPJ/CPF"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid ""
"Changing company name is not allowed once document(s) have been issued for "
"your account. Please contact us directly for this operation."
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Cidade"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Complemento"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Confirm<span class=\"fa fa-long-arrow-right\"/>"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Country"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Country..."
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Email"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "IE/RG"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Inscrição Municipal"
msgstr ""

#. module: l10n_br_portal
#: model:res.users,nfe40_xMun:l10n_br_portal.demo_user_kmee
msgid "Itajubá"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Mobile"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Nº"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Phone"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Razão Social / Nome Completo"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "State / Province"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Street"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Your Name"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "Zip / Postal Code"
msgstr ""

#. module: l10n_br_portal
#: model_terms:ir.ui.view,arch_db:l10n_br_portal.portal_my_details
msgid "select..."
msgstr ""
Loading