Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activities Calendars #7

Open
1 of 9 tasks
support321 opened this issue May 13, 2019 · 15 comments
Open
1 of 9 tasks

Activities Calendars #7

support321 opened this issue May 13, 2019 · 15 comments
Assignees
Labels
product backlog A demanded product feature to implement

Comments

@support321
Copy link
Owner

support321 commented May 13, 2019

The Calendar of the Lessions and of other activities is the primary and most urgent feature to implement. These activities that are fundamentally calendars entry with a date, a start time and a end time, share unique the resources they use: Teachers, Recipients, Classrooms. The resource are unique, so that a Recipient or a Teacher or a Classroom CANNOT be assigned to another calendar entry that have the same date and time. This constraint is fundamental and mandatory.
The calendar management must have a smart import/input system for Lessions date so that:

  • importing existing lession dates (of the same Course) will update instead of add as new
  • inserting manually or importing with the import function will check if the resorces (Recipients, Teachers and Classrooms) are already occupied for that date and time.

Also the user can create and manage Classrooms where the activities are carried out.
Another functionality for the user is to generate valid course Lession dates, given the teacher and the total hours of that Course.
Furthermore an export function that exports in an excel file template the calendar of one given Course.

Current tasks (always on update, for history follow the comments)

Lesson

  • LESSON IMPORT FUNCTION: after refining all the lesson start_time and end_time issues we must plan to modify the import function for lessons. Most of the work will be the function to convert the time value from the CSV file that can be in different formats (like "20:50" or "20.50". Luckly it never will be like 10.50 PM)
  • start date and end date should accept time format 24h only and not float-like numbers like "15.70". This is on standby because of the float_time widget problem.
  • when adding recipients to a lession, the "add form view" should be already filtered by Persons (it's a default filter) and/or by Recipient [ task ].
  • when adding recipients: set default filter to Students.
  • duplicate function can't really duplicate a lesson because date/time/teacher are the same and it returns error: instead it should open a create lesson form with these fields already filled: date, teacher, place, recipients, course.

Course

  • Default auto generated repetition number is in the format "CR000n". It has to be a natural number like "1", "2", "3", etc.
  • Change "Name" to "Title".
  • One Course can have more that one topic, and one topic can be assigned to more than one Course. As it is now, only one topic can be assigned to one Course. The result has to be like res.partner.category tags: many2many and many2many_tags widget.
  • "Hours" and "Total Hours" must be displayed as an integer without the ".0".
@support321 support321 added the product backlog A demanded product feature to implement label May 13, 2019
@support321 support321 changed the title [PB] Activities Calendars Activities Calendars May 13, 2019
@support321 support321 pinned this issue May 13, 2019
@support321

This comment has been minimized.

@support321

This comment has been minimized.

@support321 support321 mentioned this issue May 16, 2019
@support321
Copy link
Owner Author

support321 commented May 16, 2019

review 1

Course:

  • every Course must have a "parent" project. There cannot be "orphan" Courses without a project

  • Repetition is an identificative human-readable number for identical courses within one project that have:

    • same title
    • same total hours
    • same topics
      BUT
    • different recipients/beneficiaries
    • different lessions dates

    This means that there cannot be two "twin" Course with the same repetition number.
    Repetition starts from 1.
    Also, Repetition numbers should be appended when course titles are displayed within a project form view (this is not top priority, you will tell me if its a task easy to do or not).

  • In form view, the list of lessions date should take the whole width. Also there should be a button that takes you to the lession action with a filter preset of that course (repetition) lessions only.

  • each course have recipients/beneficiaries (SEE HERE FOR THIS)

@support321
Copy link
Owner Author

support321 commented May 16, 2019

review 1

Lessions:

  • each lessions must have a Course, no orphan lessions
  • when adding recipients/beneficiaries to a lession the add list view should be already filtered by Persons (default filter) and/or by recipient/beneficiary (custom, to do).

Recipients problem

Now, here is a problem to solve with the recipient concept. A recipient can resign from an active project so, we can have for one course that, a number of lessions, have certain recipient (A, B, C, D, E) and the rest of the lessions have less or different recipients (B,C, E, F, G).
So, it is good to have beneficiaries for every single lessions but from a user point of view there should a comprehensive list of recipients at course level.
What's the best way to do this?

  1. Have a separate field list of recipients in the Course that have to be synchronized with the every lessions recipients list
    OR
  2. have a generated view of the unique recipients of all the lessions of that course?

Possible recipient workflow with course lessions:

When a Course is created the recipients are added to the recipient course list BUT the list can change until the end of the course, an example:

  1. a new course is created with the following recipients: Anna, Michael, Jack and Terry
  2. two Lessions are then created related to the course. The recipients of those lessions are Anna, Michael, Jack, Terry
  3. after that, Anna withdraw from the course so she will not be recipient for any other lession of that course. Still, the lession hours that she made before her withdrawal are valid
  4. to replace Anna, a new recipient is added to the course: Carl. From now on the recipients of the course lessions will be Michael, Jack, Terry and Carl
  5. after the replacement, new lessions are created. The lession recipients of these lessions are only Michael, Jack, Terry and Carl. (Other recipient replacements can be done in the same way throughout the duration of the course)
  6. at the end of the course the complete list of recipients are: Anna, Michael, Jack, Terry and Carl

recipient-workflow.pdf

@support321
Copy link
Owner Author

review for committ b31e37b

Course

  • in the view the Project column is needed, topic and lessions can be hid
  • Change "Name" to "Title"
  • Lessions better take 100% of the width and should be the last element
  • Missing the Teacher field
  • Topics are the argument of the course, so they should be selected like in a dropdown menu (example, like in Teacher or Course, in Lessions form view)

Lessions

  • remove the title field
  • add the Classroom (Place) field in the lession form creation view

Place

  • the address of a Place should be like this:
    2019-05-20_16-20-42

@support321
Copy link
Owner Author

support321 commented Jul 18, 2019

Review for commit 34436d1

Resolved the lessons date check that was very important, we have to plan to make the same functionality for CSV import.

  • when adding recipients: set default filter to Students
  • start date and end date form input should display and only accept time formatted number like "08:45" and not float-like numbers like "15.70"

@BoubakerAB

This comment has been minimized.

@support321

This comment has been minimized.

@BoubakerAB

This comment has been minimized.

@support321

This comment has been minimized.

@BoubakerAB

This comment has been minimized.

@support321

This comment has been minimized.

@support321
Copy link
Owner Author

support321 commented Jul 23, 2019

review for 1259ee6

Lesson

  • when adding recipients: set default filter to Students
  • start date and end date should accept time format 24h only and not float-like numbers like "15.70". This is on standby because of the float_time widget problem.
  • duplicate function can't really duplicate a lesson because date/time/teacher are the same and it returns error: instead it should open a create lesson form with these fields already filled: date, teacher, place, recipients, course.

Course

  • Default auto generated repetition number is in the format "CR000n". It has to be a natural number like "1", "2", "3", etc
  • One Course can have more that one topic, and one topic can be assigned to more than one Course. As it is now, only one topic can be assigned to one Course.
  • "Hours" and "Total Hours" must be displayed as an integer without the ".0"

@support321
Copy link
Owner Author

I tried to create a calendar view for the lessons like this

<record id="action_gestcal_calendar_view" model="ir.ui.view">
    <field name="name">gestcal.lesson.calendar</field>
    <field name="model">gestcal.lesson</field>
    <field name="priority" eval="2"/>
    <field name="arch" type="xml">
        <calendar string="Lessons" date_start="date" event_open_popup="true" event_limit="5" color="course_id">
            <field name="date"/>
            <field name="course_id"/>
        </calendar>
    </field>
</record>

but I think I'm totally missing something

@BoubakerAB
Copy link
Collaborator

It's good your code works but you forgot to add in the record ir.actions.act_window
check this line and add calendar
<field name="view_mode">calendar,tree,form</field>


        <!-- Actions Of Form & Tree Views Of lesson Information -->
        <record id="action_gestcal_lesson_view" model="ir.actions.act_window">
            <field name="name">Lesson</field>
            <field name="res_model">gestcal.lesson</field>
            <field name="view_type">form</field>
            <field name="view_mode">calendar,tree,form</field>
        </record>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product backlog A demanded product feature to implement
Projects
None yet
Development

No branches or pull requests

2 participants