diff --git a/README.rst b/README.rst index 67304c5..6377485 100644 --- a/README.rst +++ b/README.rst @@ -14,6 +14,10 @@ Requires Changes ======= +*7.0.8 - 05.11.2024* + +- updt: optimize book-now button + *7.0.7 - 28.09.2024* - add: recurrence rule 'last day of month' diff --git a/locale/de.po b/locale/de.po index 9d2a64b..d725a91 100644 --- a/locale/de.po +++ b/locale/de.po @@ -50,14 +50,18 @@ msgstr "geplante Buchungen" ################### # ir.model.button # ################### -msgctxt "model:ir.model.button,string:book_now_button" +msgctxt "model:ir.model.button,string:book_now_button2" msgid "Execute Booking Now" msgstr "Buchung jetzt ausführen" -msgctxt "model:ir.model.button,help:book_now_button" +msgctxt "model:ir.model.button,help:book_now_button2" msgid "The planned booking is brought forward and executed now. The next posting is then scheduled regularly for the following execution." msgstr "Die geplante Buchung wird vorgezogen und jetzt ausgeführt. Die nächste Buchung wird dann regulär für die nachfolgende Ausführung geplant." +msgctxt "model:ir.model.button,confirm:book_now_button2" +msgid "The booking is now being made. Continue?" +msgstr "Die Buchung wird nun durchgeführt. Fortsetzen?" + ################# # ir.rule.group # diff --git a/locale/en.po b/locale/en.po index 2a86165..175b30c 100644 --- a/locale/en.po +++ b/locale/en.po @@ -26,14 +26,18 @@ msgctxt "model:ir.action,name:act_planner_view" msgid "Scheduled Bookings" msgstr "Scheduled Bookings" -msgctxt "model:ir.model.button,string:book_now_button" +msgctxt "model:ir.model.button,string:book_now_button2" msgid "Execute Booking Now" msgstr "Execute Booking Now" -msgctxt "model:ir.model.button,help:book_now_button" +msgctxt "model:ir.model.button,help:book_now_button2" msgid "The planned booking is brought forward and executed now. The next posting is then scheduled regularly for the following execution." msgstr "The planned booking is brought forward and executed now. The next posting is then scheduled regularly for the following execution." +msgctxt "model:ir.model.button,confirm:book_now_button2" +msgid "The booking is now being made. Continue?" +msgstr "The booking is now being made. Continue?" + msgctxt "model:ir.rule.group,name:rg_planner_admin" msgid "Administrators: scheduled bookings read/write" msgstr "Administrators: scheduled bookings read/write" @@ -354,6 +358,22 @@ msgctxt "help:cashbook.planner,move_event:" msgid "If the date of execution falls on a weekend or holiday, it can be moved to a business day." msgstr "If the date of execution falls on a weekend or holiday, it can be moved to a business day." +msgctxt "field:cashbook.planner,last_day_of_month:" +msgid "Last day of the month" +msgstr "Last day of the month" + +msgctxt "help:cashbook.planner,last_day_of_month:" +msgid "The booking is made on the last day of the month." +msgstr "The booking is made on the last day of the month." + +msgctxt "field:cashbook.planner,notify_bycron:" +msgid "Notify" +msgstr "Notify" + +msgctxt "help:cashbook.planner,notify_bycron:" +msgid "A notification will appear in the web browser when the booking has been created." +msgstr "A notification will appear in the web browser when the booking has been created." + msgctxt "model:cashbook.planner.nextrun,name:" msgid "Next Execution Date" msgstr "Next Execution Date" @@ -390,18 +410,7 @@ msgctxt "view:cashbook.line:" msgid "Scheduled Bookings" msgstr "Scheduled Bookings" -msgctxt "field:cashbook.planner,last_day_of_month:" -msgid "Last day of the month" -msgstr "Last day of the month" +msgctxt "field:cashbook.line,planners:" +msgid "Scheduled Bookings" +msgstr "Scheduled Bookings" -msgctxt "help:cashbook.planner,last_day_of_month:" -msgid "The booking is made on the last day of the month." -msgstr "The booking is made on the last day of the month." - -msgctxt "field:cashbook.planner,notify_bycron:" -msgid "Notify" -msgstr "Notify" - -msgctxt "help:cashbook.planner,notify_bycron:" -msgid "A notification will appear in the web browser when the booking has been created." -msgstr "A notification will appear in the web browser when the booking has been created." diff --git a/planner.py b/planner.py index 2435007..00074e3 100644 --- a/planner.py +++ b/planner.py @@ -193,7 +193,7 @@ class ScheduledBooking(DeactivableMixin, ModelSQL, ModelView): (t.end_date, Index.Range(order='ASC')), where=t.end_date != DEF_NONE)}) cls._buttons.update({ - 'booknow': {'readonly': ~Eval('active', False)}, + 'book_now': {'readonly': ~Eval('active', False)}, }) def get_rec_name(self, name=None): @@ -747,7 +747,7 @@ class ScheduledBooking(DeactivableMixin, ModelSQL, ModelView): @classmethod @ModelView.button - def booknow(cls, records): + def book_now(cls, records): """ run planned booking now """ to_work = [x for x in records if x.active and x.nextrun_date] diff --git a/planner.xml b/planner.xml index df428fc..f57fa54 100644 --- a/planner.xml +++ b/planner.xml @@ -158,14 +158,15 @@ full copyright notices and license terms. --> - - booknow + + book_now Execute Booking Now + The booking is now being made. Continue? The planned booking is brought forward and executed now. The next posting is then scheduled regularly for the following execution. - - + + diff --git a/tests/planner.py b/tests/planner.py index 29271f5..1d49b98 100644 --- a/tests/planner.py +++ b/tests/planner.py @@ -401,7 +401,7 @@ class PlannerTestCase(object): job._compute_dates_by_rrule( count=1, query_date=date(2022, 5, 1)), [ date(2022, 5, 1)]) - Planner.booknow([job]) + Planner.book_now([job]) self.assertEqual( job.rec_name, "Job 1|Book 1|Exp|Cat1|06/01/2022|usd0.00") diff --git a/tryton.cfg b/tryton.cfg index f3bb2f5..bacc875 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=7.0.7 +version=7.0.8 depends: cashbook extras_depend: diff --git a/view/planner_form.xml b/view/planner_form.xml index d7b8fbb..cee3298 100644 --- a/view/planner_form.xml +++ b/view/planner_form.xml @@ -12,9 +12,9 @@ full copyright notices and license terms. -->