twanda / vertical-agriculture

Verticalization of Odoo for farms and agroindustries
GNU Affero General Public License v3.0
0 stars 1 forks source link

Agriculture Modul: Creation of history records #70

Open dastcaboz opened 2 years ago

dastcaboz commented 2 years ago
220906_issue_07

History: See comments on screenshot. It is important, that we can change a dataset without automatically creating a new history of a given dataset. We should also be able to delete or change a history record.

siddharth7815 commented 1 year ago

@dastcaboz issue has been resolved. please have a look. We are not clear to show popup if valid from has not changed. Need more discussion on this.

dastcaboz commented 1 year ago

@siddharth7815 I did not manage to create a new history. We should discuss this in a call.

candidroot commented 1 year ago

@dastcaboz i have implemented this features as per this task: https://github.com/twanda/vertical-agriculture/issues/70

dastcaboz commented 1 year ago

@siddharth7815 you have to show me this tomorrow. I do not understand how to create a new history.

dastcaboz commented 1 year ago

We leave the concept as currently implemented: When user changes a defined field odoo creates by default a new history. Alternatively user can choose to correct the current record without creating a history. -> THIS FUNCTION SHOULD BE ATTRIBUTABLE TO A SPECIFIC ROLE.

We would like to adapt the current concept in some points:

Dates:

  1. Only "Valid from" is editable by user.
  2. "Valid to" is displayed but not editable to a normal user. -> THIS SHOULD BE POSSIBLE FOR SPECIALLY ASSIGNED USERS.
  3. "Valid from" by default shows the actual date, but can be changed by user
  4. "Valid to" by default shows 31/12/2199
  5. When creating a history, "Valid from" is again defined by user. odoo must make a validity check wether the date does overlap with the validity dates of an already existing history. If YES odoo must deny the creation of the new record.
  6. When a new record is created the "Valid to" date of the history must be "Valid from" (of the new record) – 1 day.
  7. If user is saving a record without having changed the "Valid from" date, a warning appears asking the user to change the "Valid from" date. Otherwise saving is denied.

Save, Discrad, Change Record:

  1. On top of record three buttons: "Save", "Discard" and with a distance to left "Change record"
  2. "Change record" IS ONLY VIVIBLE TO SPECIALLY ASSIGNED USERS
  3. User presses "Save": History is created IF "Valid From" has been changed to a date at least + 1 day as compared to last record. Odoo has to check validity to avoid overlapping records or periods without record.
  4. Warning appears "Are you sure you want to save?"
  5. User presses "Discard": Return to Edit mode
  6. Specially assigned User presses "Change record": Current record is changed without the creation of a history. Odoo must check the validity of the dates (no overlapping record, no period without record)
dastcaboz commented 1 year ago
issue70_01 issue70_02 issue70_03