From 9ded6aa827d3b667fd3f6f55a3f9815db8a712a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Fri, 3 Oct 2008 08:53:57 +0000 Subject: [PATCH] also use corporate name for source / destination git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23995 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_base/Delivery_getODTDataDict.xml | 13 +++++++++++-- bt5/erp5_base/bt/revision | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_getODTDataDict.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_getODTDataDict.xml index 87703ecc31..0739eab7de 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_getODTDataDict.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_getODTDataDict.xml @@ -208,6 +208,13 @@ class EmptyOrganisation:\n def getProperty(self, prop, d=\'\'):\n return d\n \n +source = context.getSourceValue()\n +if source is None:\n + source = EmptyOrganisation()\n +\n +destination = context.getDestinationSectionValue()\n +if destination is None:\n + destination = EmptyOrganisation()\n \n source_section = context.getSourceSectionValue()\n if source_section is None:\n @@ -275,7 +282,7 @@ data_dict = {\n \'source_administration_vatid\':\n getVatId(source_administration.getProperty(\'vat_code\', \'\')),\n \n - \'source_title\': context.getSourceTitle() or \'\',\n + \'source_title\': source.getProperty(\'corporate_name\') or source.getTitle(),\n \'source_address\': getOneLineAddress(\n context.getSource() and\n context.getSourceValue().getDefaultAddressText() or \'\',\n @@ -317,7 +324,7 @@ data_dict = {\n is not None and\\\n context.getSourceDecisionValue().getVatCode() or \'\'),\n \n - \'destination_title\': context.getDestinationTitle() or \'\',\n + \'destination_title\': destination.getProperty(\'corporate_name\') or destination.getTitle(),\n \'destination_address\': getOneLineAddress(\n context.getDestination() and \\\n context.getDestinationValue().getDefaultAddressText() or \'\',\n @@ -463,6 +470,8 @@ return unicodeDict(data_dict)\n <string>_inplacevar_</string> <string>inch_cm_ratio</string> <string>EmptyOrganisation</string> + <string>source</string> + <string>destination</string> <string>source_section</string> <string>destination_section</string> <string>source_administration</string> diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index 2738497468..ce163e7b6b 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -439 \ No newline at end of file +440 \ No newline at end of file -- 2.30.9