update due_date
parent
a2de551f12
commit
2e60a170f9
|
@ -164,9 +164,13 @@ class ClinicSetting(Model):
|
|||
if user_id !=1:
|
||||
print("Only admin!!")
|
||||
return
|
||||
obj=self.browse(ids)[0]
|
||||
obj.merge_staff()
|
||||
print("Done!")
|
||||
sql=''
|
||||
for hdcase in get_model("clinic.hd.case").search_browse([]):
|
||||
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={}):
|
||||
user_id=get_active_user()
|
||||
|
|
Loading…
Reference in New Issue