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
This commit is contained in:
1 parent
3ab9655039
commit
80bebece07
2 files changed
+8
-4
No files matched your search
@@ -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>
|
||||
|
||||
@@ -605,10 +605,14 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin):
|
||||
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:
|
||||
|
||||
Reference in new issue
Block a user