Compare commits

..

15 commits

Author SHA1 Message Date
Frederik Jaeckel
34ef3a5bca rearrange book-now button, fix translation 2024-11-05 09:22:06 +01:00
Frederik Jaeckel
52cfda485a add confirm to book-now-button 2024-09-29 21:28:41 +02:00
=Frederik Jaeckel
7504c676e7 add notify 2024-09-28 20:42:32 +02:00
=Frederik Jaeckel
321aeb827d add button 'execute booking now' 2024-09-28 18:30:43 +02:00
=Frederik Jaeckel
181f7405d6 recurrence: add last-day-of-month 2024-09-27 23:24:48 +02:00
Frederik Jaeckel
18f194caa5 Use 'irrulecontext' to add 'user_id' to context of ir.rule 2024-07-19 16:22:53 +02:00
Frederik Jaeckel
c296db125f update gitignore 2024-07-19 16:22:45 +02:00
Frederik Jaeckel
a84b672250 Add option to rule to move date of occurence to working day 2024-06-03 23:37:26 +02:00
Frederik Jaeckel
e76ec5792c config: new field 'holidays_info' to show generated holidays in config-form 2024-06-02 10:27:15 +02:00
Frederik Jaeckel
b54a8d678f config: compute holidays + test 2024-06-01 23:37:06 +02:00
Frederik Jaeckel
3c65390284 config: allow setting of holidays for each user 2024-06-01 13:33:45 +02:00
Frederik Jaeckel
b5994996de New field 'move_event' for moving occurence-date if not a business day 2024-06-01 13:31:55 +02:00
Frederik Jaeckel
e7bd95ff31 field 'nextrun_link' --> 'nextrun_date', add default-order 2024-03-11 12:50:00 +01:00
Frederik Jaeckel
e1502cae53 add placeholder 'rate' 2024-03-10 22:21:00 +01:00
Frederik Jaeckel
08534047fb fix permissions 2024-03-10 07:45:24 +01:00
8 changed files with 43 additions and 55 deletions

View file

@ -14,32 +14,6 @@ Requires
Changes
=======
*7.0.7 - 28.09.2024*
*7.0.0 - 24.02.2024*
- add: recurrence rule 'last day of month'
- add: button 'execute booking now'
- add: notify
*7.0.6 - 19.07.2024*
- updt: optimize check of permissions
*7.0.5 - 08.06.2024*
- add: re-arrange date of occurence to working day
*7.0.4 - 11.03.2024*
- add: default-order for table
*7.0.3 - 10.03.2024*
- new placeholder 'rate' for description of booking
*7.0.2 - 10.03.2024*
- fix permissions
*7.0.1 - 09.03.2024*
- works
- init

View file

@ -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 #

View file

@ -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."

View file

@ -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]

View file

@ -158,14 +158,15 @@ full copyright notices and license terms. -->
</record>
<!-- button -->
<record model="ir.model.button" id="book_now_button">
<field name="name">booknow</field>
<record model="ir.model.button" id="book_now_button2">
<field name="name">book_now</field>
<field name="string">Execute Booking Now</field>
<field name="confirm">The booking is now being made. Continue?</field>
<field name="help">The planned booking is brought forward and executed now. The next posting is then scheduled regularly for the following execution.</field>
<field name="model" search="[('model', '=', 'cashbook.planner')]"/>
</record>
<record model="ir.model.button-res.group" id="book_now_button-group_planner">
<field name="button" ref="book_now_button"/>
<record model="ir.model.button-res.group" id="book_now_button2-group_planner">
<field name="button" ref="book_now_button2"/>
<field name="group" ref="group_planner"/>
</record>

View file

@ -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")

View file

@ -1,5 +1,5 @@
[tryton]
version=7.0.7
version=7.0.0
depends:
cashbook
extras_depend:

View file

@ -12,9 +12,9 @@ full copyright notices and license terms. -->
<label name="active"/>
<field name="active"/>
<button colspan="2" name="booknow"/>
<label name="nextrun_date" colspan="3"/>
<field name="nextrun_date"/>
<button colspan="2" name="book_now"/>
<notebook colspan="6">
<page id="rrule" col="6" string="Recurrence Rule">