changeset 4f1e54af985d in modules/sale:default
details: https://hg.tryton.org/modules/sale?cmd=changeset;node=4f1e54af985d
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:
sale.fodt | 4 ++--
sale.py | 8 ++++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 67d2df3bfe43 -r 4f1e54af985d sale.fodt
--- a/sale.fodt Wed Jun 05 09:57:19 2019 +0200
+++ b/sale.fodt Wed Jun 26 16:39:40 2019 +0200
@@ -523,10 +523,10 @@
<text:p text:style-name="P22">Draft Sale 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="sale.state ==
'quotation'"></text:placeholder></text:p>
- <text:p text:style-name="P22">Quotation N°: <text:placeholder
text:placeholder-type="text"><sale.number></text:placeholder></text:p>
+ <text:p text:style-name="P22">Quotation N°: <text:placeholder
text:placeholder-type="text"><sale.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="P22">Sale Order N°: <text:placeholder
text:placeholder-type="text"><sale.number></text:placeholder></text:p>
+ <text:p text:style-name="P22">Sale Order N°: <text:placeholder
text:placeholder-type="text"><sale.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:p text:style-name="Text_20_body">Description: <text:placeholder
text:placeholder-type="text"><sale.description or
''></text:placeholder></text:p>
diff -r 67d2df3bfe43 -r 4f1e54af985d sale.py
--- a/sale.py Wed Jun 05 09:57:19 2019 +0200
+++ b/sale.py Wed Jun 26 16:39:40 2019 +0200
@@ -605,10 +605,14 @@
shipment_method=self.shipment_method_string,
sale=self.rec_name))
+ @property
+ def full_number(self):
+ return self.number
+
def get_rec_name(self, name):
items = []
- if self.number:
- items.append(self.number)
+ if self.full_number:
+ items.append(self.full_number)
if self.reference:
items.append('[%s]' % self.reference)
if not items: