update due_date
parent
a2de551f12
commit
2e60a170f9
|
@ -164,9 +164,13 @@ class ClinicSetting(Model):
|
||||||
if user_id !=1:
|
if user_id !=1:
|
||||||
print("Only admin!!")
|
print("Only admin!!")
|
||||||
return
|
return
|
||||||
obj=self.browse(ids)[0]
|
sql=''
|
||||||
obj.merge_staff()
|
for hdcase in get_model("clinic.hd.case").search_browse([]):
|
||||||
print("Done!")
|
for invoice in hdcase.invoices:
|
||||||
|
print(hdcase.date,' ---> ', invoice.due_date)
|
||||||
|
sql+="update account_invoice set due_date='%s' where id=%s;"%(hdcase.date,invoice.id)
|
||||||
|
db=get_connection()
|
||||||
|
db.execute(sql)
|
||||||
|
|
||||||
def merge_staff(self,ids,context={}):
|
def merge_staff(self,ids,context={}):
|
||||||
user_id=get_active_user()
|
user_id=get_active_user()
|
||||||
|
|
Loading…
Reference in New Issue