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

[RFC] Avaliar a possibilidade buscar os dados fiscais através de partner_id.commercial_partner_id #2071

Open
marcelsavegnago opened this issue Aug 5, 2022 · 7 comments

Comments

@marcelsavegnago
Copy link
Member

Hoje todos os dados fiscais inclusive os calculos dos impostos dependem diretamente do partner_id.campox , y ou z

Acho que pode ser interessante mudar para partner_id.commercial_partner_id.campox, y ou z

Nativamente se o parceiro tem um parent_id o comercial_partner_id é o parent_id e se nao tem o parent_id o comercial_partner_id é ele mesmo
https://github.com/odoo/odoo/blob/a362257ef49a7e074ff2badd5f969777cb2d9585/odoo/addons/base/models/res_partner.py#L293

    @api.depends('is_company', 'parent_id.commercial_partner_id')
    def _compute_commercial_partner(self):
        for partner in self:
            if partner.is_company or not partner.parent_id:
                partner.commercial_partner_id = partner
            else:
                partner.commercial_partner_id = partner.parent_id.commercial_partner_id

Essa mudança vai além do fiscal e mexe tbm no nfe e outros


Referências enviadas pelo Raphael
https://www.slideshare.net/RaphalValyi/openerp-contact-id-solution-to-the-contacts-issue-in-v7
https://github.com/OCA/sale-workflow/tree/14.0/sale_commercial_partner
https://github.com/OCA/purchase-workflow/tree/14.0/purchase_commercial_partner

@marcelsavegnago marcelsavegnago changed the title [14.0][RFC] Avaliar a possibilidade buscar os dados fiscais através de partner_id.commercial_partner_id [RFC] Avaliar a possibilidade buscar os dados fiscais através de partner_id.commercial_partner_id Aug 5, 2022
@rvalyi
Copy link
Member

rvalyi commented Aug 9, 2022

Realmente @marcelsavegnago , para quem não usa o l10n_br_sale_stock ou o l10n_br_purchase_stock, esse problema pode ser serio. Eu fiz um PR para resolver isso #2075

@github-actions
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 15, 2023
@mileo
Copy link
Member

mileo commented Oct 15, 2023

Resolvido no #2520

@mileo mileo removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 15, 2023
@antoniospneto
Copy link
Contributor

@marcelsavegnago conseguiu validar se o #2520 resolve ?

@marcelsavegnago
Copy link
Member Author

@antoniospneto não testei mas é isso ai

Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 16, 2024
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 23, 2024
@mileo
Copy link
Member

mileo commented Oct 11, 2024

Podemos fechar esse?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants