Compare commits
No commits in common. "6157328b80b01a506752e95d934bd3005670f3f7" and "77d626374f847b8e54b81cc06f76b545e4014b29" have entirely different histories.
6157328b80
...
77d626374f
18
sale.py
18
sale.py
@ -204,16 +204,9 @@ class Sale(metaclass=PoolMeta):
|
|||||||
"uom": line.unit.name if line.type != 'title' else None}
|
"uom": line.unit.name if line.type != 'title' else None}
|
||||||
for line in report.lines if not line.impreso]
|
for line in report.lines if not line.impreso]
|
||||||
data["deleted_lines"] = [{
|
data["deleted_lines"] = [{
|
||||||
<<<<<<< HEAD
|
|
||||||
"product": line.product.name,
|
|
||||||
"quantity": str(-1 * line.quantity),
|
|
||||||
"unit": line.unit.symbol,
|
|
||||||
} for line in report.delete_lines if not line.printed]
|
|
||||||
=======
|
|
||||||
"product": line.product.name if line.type != 'title' else None,
|
"product": line.product.name if line.type != 'title' else None,
|
||||||
"quantity": line.quantity if line.type != 'title' else None,
|
"quantity": line.quantity if line.type != 'title' else None,
|
||||||
} for line in report.delete_lines if not line.impreso]
|
} for line in report.delete_lines if not line.impreso]
|
||||||
>>>>>>> 77d626374f847b8e54b81cc06f76b545e4014b29
|
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@ -238,11 +231,7 @@ class Sale(metaclass=PoolMeta):
|
|||||||
line.save()
|
line.save()
|
||||||
|
|
||||||
for line in record.delete_lines:
|
for line in record.delete_lines:
|
||||||
<<<<<<< HEAD
|
|
||||||
line.printed = True
|
|
||||||
=======
|
|
||||||
line.impreso = True
|
line.impreso = True
|
||||||
>>>>>>> 77d626374f847b8e54b81cc06f76b545e4014b29
|
|
||||||
line.save()
|
line.save()
|
||||||
record.save()
|
record.save()
|
||||||
|
|
||||||
@ -288,7 +277,7 @@ class Sale(metaclass=PoolMeta):
|
|||||||
headers = {"accept": 'application/json',
|
headers = {"accept": 'application/json',
|
||||||
'Content-Type': 'application/json'}
|
'Content-Type': 'application/json'}
|
||||||
requests.post(
|
requests.post(
|
||||||
url, data=json.dumps(content), headers=headers, timeout=5)
|
url, data=json.dumps(content), headers=headers)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ModelView.button
|
@ModelView.button
|
||||||
@ -332,9 +321,8 @@ class Sale(metaclass=PoolMeta):
|
|||||||
'Content-Type': 'application/json'}
|
'Content-Type': 'application/json'}
|
||||||
cls.impreso([record])
|
cls.impreso([record])
|
||||||
|
|
||||||
requests.post(
|
requests.post(url, data=json.dumps(content),
|
||||||
url, data=json.dumps(content),
|
headers=headers)
|
||||||
headers=headers, timeout=5)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ModelView.button
|
@ModelView.button
|
||||||
|
Loading…
Reference in New Issue
Block a user