[ADD] New patch on HR Avancys
This commit is contained in:
parent
a188f31090
commit
bb0bab1887
@ -42,7 +42,16 @@ pt_vendor ()
|
||||
DEST=$DESTDIR/vendor/electronic_invoice_dian/
|
||||
OPTIONS="--directory=$DEST --strip=1"
|
||||
|
||||
patch $OPTIONS < patches/20210922_electronic-invoice-dian_changes-after-1-8.patch
|
||||
#patch $OPTIONS < patches/20210922_electronic-invoice-dian_changes-after-1-8.patch
|
||||
|
||||
SRC=$PWD
|
||||
DEST=$DESTDIR/vendor/
|
||||
OPTIONS="-p1 --verbose"
|
||||
|
||||
pushd $DEST
|
||||
git apply $OPTIONS $SRC/patches/20211209_hr-avancys_delete-without-sql-in-holiday-book.patch
|
||||
popd
|
||||
|
||||
}
|
||||
|
||||
pt_special ()
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
diff --git a/hr_avancys/models/hr_contract/hr_holiday_book.py b/hr_avancys/models/hr_contract/hr_holiday_book.py
|
||||
index d1b36c9..5e843d0 100644
|
||||
--- a/hr_avancys/models/hr_contract/hr_holiday_book.py
|
||||
+++ b/hr_avancys/models/hr_contract/hr_holiday_book.py
|
||||
@@ -79,7 +79,9 @@ class HrHolidayBook(models.Model):
|
||||
)
|
||||
|
||||
def delete_lines(self, contract_id):
|
||||
- self._cr.execute("DELETE FROM hr_holiday_book WHERE contract_id = {id} and (manual = 'f' or manual is null)".format(id=contract_id.id))
|
||||
+ holiday_book_ids = contract_id.holiday_book_ids
|
||||
+ holiday_book_ids = holiday_book_ids.filtered(lambda hb: hb.manual is not True)
|
||||
+ holiday_book_ids.unlink()
|
||||
|
||||
def check_date_for_work(self, contract_id, date):
|
||||
days_work = list(set([int(x.dayofweek) for x in contract_id.resource_calendar_id.attendance_ids]))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user