04.03.26
This commit is contained in:
@@ -2303,21 +2303,6 @@ class SaleReport(CompanyReport):
|
|||||||
with Transaction().set_context(address_with_party=True):
|
with Transaction().set_context(address_with_party=True):
|
||||||
return super().execute(ids, data)
|
return super().execute(ids, data)
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def _execute(cls, records, header, data, action):
|
|
||||||
company_id = Transaction().context.get('company')
|
|
||||||
logger.info("_EXECUTE:%s",company_id)
|
|
||||||
if company_id:
|
|
||||||
pool = Pool()
|
|
||||||
Company = pool.get('company.company')
|
|
||||||
company = Company(company_id)
|
|
||||||
if company.party.name == 'MELYA':
|
|
||||||
# Patch l'objet action en mémoire, pas en DB
|
|
||||||
action.report = 'sale/sale_melya.fodt'
|
|
||||||
action.report_content = None # force rechargement depuis fichier
|
|
||||||
|
|
||||||
return super()._execute(records, header, data, action)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_context(cls, records, header, data):
|
def get_context(cls, records, header, data):
|
||||||
pool = Pool()
|
pool = Pool()
|
||||||
|
|||||||
Reference in New Issue
Block a user