changeset 222999400a4d in modules/purchase:default
details: https://hg.tryton.org/modules/purchase?cmd=changeset;node=222999400a4d
description:
        Add history to sale and purchase

        Each time the order is reset to draft, we increase the revision number.
        The order, lines and tax lines are also historized to browse past 
version.

        issue8366
        review279381002
diffstat:

 purchase.fodt |  4 ++--
 purchase.py   |  6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 75556470974c -r 222999400a4d purchase.fodt
--- a/purchase.fodt     Wed Jun 05 09:57:35 2019 +0200
+++ b/purchase.fodt     Wed Jun 26 16:39:40 2019 +0200
@@ -553,10 +553,10 @@
    <text:p text:style-name="P23">Draft Purchase Order</text:p>
    <text:p text:style-name="P16"><text:placeholder 
text:placeholder-type="text">&lt;/when&gt;</text:placeholder></text:p>
    <text:p text:style-name="P16"><text:placeholder 
text:placeholder-type="text">&lt;when test=&quot;purchase.state == 
&apos;quotation&apos;&quot;&gt;</text:placeholder></text:p>
-   <text:p text:style-name="P23">Request for Quotation N°: <text:placeholder 
text:placeholder-type="text">&lt;purchase.number&gt;</text:placeholder></text:p>
+   <text:p text:style-name="P23">Request for Quotation N°: <text:placeholder 
text:placeholder-type="text">&lt;purchase.full_number&gt;</text:placeholder></text:p>
    <text:p text:style-name="P16"><text:placeholder 
text:placeholder-type="text">&lt;/when&gt;</text:placeholder></text:p>
    <text:p text:style-name="P16"><text:placeholder 
text:placeholder-type="text">&lt;otherwise 
test=&quot;&quot;&gt;</text:placeholder></text:p>
-   <text:p text:style-name="P23">Purchase Order N°: <text:placeholder 
text:placeholder-type="text">&lt;purchase.number&gt;</text:placeholder></text:p>
+   <text:p text:style-name="P23">Purchase Order N°: <text:placeholder 
text:placeholder-type="text">&lt;purchase.full_number&gt;</text:placeholder></text:p>
    <text:p text:style-name="P16"><text:placeholder 
text:placeholder-type="text">&lt;/otherwise&gt;</text:placeholder></text:p>
    <text:p text:style-name="P16"><text:placeholder 
text:placeholder-type="text">&lt;/choose&gt;</text:placeholder></text:p>
    <text:section text:style-name="Sect1" text:name="Section1">
diff -r 75556470974c -r 222999400a4d purchase.py
--- a/purchase.py       Wed Jun 05 09:57:35 2019 +0200
+++ b/purchase.py       Wed Jun 26 16:39:40 2019 +0200
@@ -591,10 +591,14 @@
             return self.warehouse.address.full_address
         return ''
 
+    @property
+    def full_number(self):
+        return self.number
+
     def get_rec_name(self, name):
         items = []
         if self.number:
-            items.append(self.number)
+            items.append(self.full_number)
         if self.reference:
             items.append('[%s]' % self.reference)
         if not items:

Reply via email to