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

PR de prueba de mas mejora 2 #883

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
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
7 changes: 4 additions & 3 deletions l10n_ar_purchase/models/purchase_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
class PurchaseOrder(models.Model):
_inherit = "purchase.order"

def _get_name_purchase_report(self, report_xml_id):
def _get_name_purchase_report(self, report_xml2_id):
""" Method similar to the '_get_name_invoice_report' of l10n_latam_invoice_document
Basically it allows different localizations to define it's own report
This method should actually go in a sale_ux module that later can be extended by different localizations
Another option would be to use report_substitute module and setup a subsitution with a domain
"""
self.ensure_one()
if self.company_id.country_id.code == 'AR':
if report_xml_id == 'purchase.report_purchasequotation_document':
if report_xml2_id == 'purchase.report_purchasequotation_document':
return 'l10n_ar_purchase.report_purchasequotation_document'
else:
return 'l10n_ar_purchase.report_purchaseorder_document'
return report_xml_id
return report_xml2_id
#prueba modif inducción