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"></when></text:placeholder></text:p>
<text:p text:style-name="P16"><text:placeholder
text:placeholder-type="text"><when test="purchase.state ==
'quotation'"></text:placeholder></text:p>
- <text:p text:style-name="P23">Request for Quotation N°: <text:placeholder
text:placeholder-type="text"><purchase.number></text:placeholder></text:p>
+ <text:p text:style-name="P23">Request for Quotation N°: <text:placeholder
text:placeholder-type="text"><purchase.full_number></text:placeholder></text:p>
<text:p text:style-name="P16"><text:placeholder
text:placeholder-type="text"></when></text:placeholder></text:p>
<text:p text:style-name="P16"><text:placeholder
text:placeholder-type="text"><otherwise
test=""></text:placeholder></text:p>
- <text:p text:style-name="P23">Purchase Order N°: <text:placeholder
text:placeholder-type="text"><purchase.number></text:placeholder></text:p>
+ <text:p text:style-name="P23">Purchase Order N°: <text:placeholder
text:placeholder-type="text"><purchase.full_number></text:placeholder></text:p>
<text:p text:style-name="P16"><text:placeholder
text:placeholder-type="text"></otherwise></text:placeholder></text:p>
<text:p text:style-name="P16"><text:placeholder
text:placeholder-type="text"></choose></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: