Odoo project related addons
savoirfairelinux / project-addons Goto Github PK
View Code? Open in Web Editor NEWOdoo project related addons
License: GNU Lesser General Public License v3.0
Odoo project related addons
License: GNU Lesser General Public License v3.0
Describe the bug
Correct test test_080_create_activity in project_event/tests/test_project_event_task.py:
FAIL: test_080_create_activity (odoo.addons.project_event.tests.test_project_event_task.TestProjectEventTask) 2019-12-04 17:55:57,987 195 ERROR circleci_test odoo.addons.project_event.tests.test_project_event_task: Traceback (most recent call last): 2019-12-04 17:55:57,987 195 ERROR circleci_test odoo.addons.project_event.tests.test_project_event_task:
File "/mnt/extra-addons/project_event/tests/test_project_event_task.py", line 253, in test_080_create_activity
2019-12-04 17:55:57,987 195 ERROR circleci_test odoo.addons.project_event.tests.test_project_event_task: datetime.today().replace(second=0, microsecond=0)) 2019-12-04 17:55:57,987 195 ERROR circleci_test odoo.addons.project_event.tests.test_project_event_task:
AssertionError: datetime.datetime(2019, 12, 4, 17, 54) != datetime.datetime(2019, 12, 4, 17, 55)
2019-12-04 17:55:57,987 195 INFO circleci_test odoo.addons.project_event.tests.test_project_event_task: Ran 30 tests in 92.331s
`
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Test result should be consistent
Add any other context about the problem here.
https://circleci.com/gh/savoirfairelinux/project-addons/2108
ERROR: duplicate key value violates unique constraint "mail_followers_mail_followers_res_partner_res_model_id_uniq"
Originally posted by @rimbendhaou in https://github.com/savoirfairelinux/project-addons/pull/103/files
**Is your feature request related to a problem?
@jananjoy Suggested change on copy method of project_task:
#183 (comment)
Describe the solution you'd like
Check implications and apply the suggestion
Describe alternatives you've considered
This is a minor enhancement (Testing redmine)
psycopg2.ProgrammingError: column "state" of relation "project_project" does not exist
LINE 1: INSERT INTO "project_project" ("id", "state", "privacy_visib...
ERROR lg_4_task_creation odoo.sql_db: bad query: b'INSERT INTO "project_project" ("id", "state", "privacy_visibility", "active", "resource_calendar_id", "sequence", "user_id", "label_tasks", "responsible_id", "notes", "project_type", "code", "alias_id", "analytic_account_id", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('project_project_id_seq'), 'draft', 'employees', true, 1, 10, 1, 'Tasks', 9, NULL, 'event', 'EV000006', 17, 29, 1, 1, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id'
ERROR: column "state" of relation "project_project" does not exist
LINE 1: INSERT INTO "project_project" ("id", "state", "privacy_visib...
Is your feature request related to a problem?
'category_id' field should be well integrated with the refactored done. It seems that it is not taken into account on templates and wizard.
Describe the solution you'd like
'category_id' field should be well integrated with the refactored done. The whole module should be refactored.
Event field in the activity form get empty (after saving) when assigning a lately created event to the existing activity.
To Reproduce
Steps to reproduce the behavior:
Create an Activity, fill the required form and save it
Create an Event, fill the required form and save it
Go back to the Activity and Assign the Event field to the activity.
Click save
Expected behavior
The activity is saved with updated fields of the event information.
Describe the bug
An error is produced when we try to create an activity without an event or if we put a predefined event as the event of the new activity.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Either the activity should be created or the selection of event on the new activity should be required without predefined events.
Is your feature request related to a problem? Please describe.
A task and activity must have an responsible. 'responsible_id' should be required. However, if this is done, the module doesn't build, The most likely reason is that there are 'project.task' records being inserted without responsible.
Describe the solution you'd like
'responsible_id' field should be required and this shouldn't cause any error.
Additional context
Error when responsible_id is required
2018-11-13 23:13:32,113 682 ERROR 11.0_nov_1310 odoo.sql_db: bad query: b'ALTER TABLE "project_task" ALTER COLUMN "responsible_id" SET NOT NULL'
ERROR: column "responsible_id" contains null values
2018-11-13 23:13:32,113 682 WARNING 11.0_nov_1310 odoo.schema: Table 'project_task': unable to set NOT NULL on column 'responsible_id'!
If you want to have it, you should update the records and execute manually:
ALTER TABLE "project_task" ALTER COLUMN "responsible_id" SET NOT NULL
Traceback (most recent call last):
File "/opt/odoodev/git/odoo/odoo/tools/sql.py", line 109, in set_not_null
cr.execute(query)
File "/opt/odoodev/git/odoo/odoo/sql_db.py", line 155, in wrapper
return f(self, *args, **kwargs)
File "/opt/odoodev/git/odoo/odoo/sql_db.py", line 232, in execute
res = self._obj.execute(query, params)
psycopg2.IntegrityError: column "responsible_id" contains null values
odoo/odoo#30020
steps to reproduce:
Create a new calendar event that is recurrent, repeated every 1 week with number of repetitions = 0, to be repeated on Mon, Tue, Wed, Thu:
Current behavior:
This creates thousands of virtual events, causing a huge performance issue - most likely causing a CPU timeout.
Expected behavior:
There are two options here:
(quick fix) require to set a number of repetitions > 0
If a user sets 0 as number of repetitions, assume that it's going to happen until a defined period (e.g. 1 year from today's date by default), and then set a cron job that recreates this same event every year.
Seems that Google calendar does something similar to 2). If you create a recurring event with infinite occurrences, you'll see the calendar events for 1 year. After that you won't see them. At least immediately. Perhaps they will eventually appear as you come closer to the next year¿?
CodeFactor found an issue: Do not use len(SEQUENCE)
to determine if a sequence is empty
It's currently on:
project_event\models\project_task.py:622
Odoo Server error when duplicating new event in the Event model
Is your feature request related to a problem? Please describe.
https://github.com/savoirfairelinux/project-addons/pull/215/files#r235826685
SAML error messages should be in English by default. And we need to move it to the SAML module, not here.
Describe the solution you'd like
Propose a PR to the SAML OCA module, remove it from here because this module has nothing to do with SAML.
Describe alternatives you've considered
Put the SAML on gitlab on the web module, but better to go with the PR to the SAML OCA module.
Additional context
https://github.com/savoirfairelinux/project-addons/pull/215/files#r235826685
CodeFactor found an issue: Unnecessary "else" after "return"
It's currently on:
project_event\models\project_task.py:287
Is your feature request related to a problem? Please describe.
There are at least two behaviors of the system that depend on the following missing constraint: Each hr.employee must have one res.user (required). And one res.user can only have one hr.employee.
Describe the solution you'd like
Each hr.employee must have one res.user (required). And one res.user can only have one hr.employee.
Describe the bug
When creating an Activity without assigning an Event and then creating an Event and affecting it to an activity crashes the system
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The activity is saved with the affected Event
Desktop (please complete the following information):
Traceback (most recent call last):
File "/home/jrajkumar/udem/git/odoo/odoo/modules/registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/jrajkumar/udem/git/odoo/odoo/modules/loading.py", line 345, in load_modules
modules.button_install()
File "", line 2, in button_install
File "/home/jrajkumar/udem/git/odoo/odoo/addons/base/module/module.py", line 71, in check_and_log
return method(self, *args, **kwargs)
File "/home/jrajkumar/udem/git/odoo/odoo/addons/base/module/module.py", line 398, in button_install
modules._state_update('to install', ['uninstalled'])
File "/home/jrajkumar/udem/git/odoo/odoo/addons/base/module/module.py", line 363, in state_update
raise UserError(("You try to install module '%s' that depends on module '%s'.\nBut the latter module is not available in your system.") % (module.name, dep.name,))
odoo.exceptions.UserError: ("You try to install module 'project_event' that depends on module 'web_widget_table'.\nBut the latter module is not available in your system.", '')
2019-03-27 14:32:43,676 517 CRITICAL udem_test_march28 odoo.service.server: Failed to initialize database udem_test_march28
.
Traceback (most recent call last):
File "/home/jrajkumar/udem/git/odoo/odoo/service/server.py", line 925, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/home/jrajkumar/udem/git/odoo/odoo/modules/registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/jrajkumar/udem/git/odoo/odoo/modules/loading.py", line 345, in load_modules
modules.button_install()
File "", line 2, in button_install
File "/home/jrajkumar/udem/git/odoo/odoo/addons/base/module/module.py", line 71, in check_and_log
return method(self, *args, **kwargs)
File "/home/jrajkumar/udem/git/odoo/odoo/addons/base/module/module.py", line 398, in button_install
modules._state_update('to install', ['uninstalled'])
File "/home/jrajkumar/udem/git/odoo/odoo/addons/base/module/module.py", line 363, in state_update
raise UserError(("You try to install module '%s' that depends on module '%s'.\nBut the latter module is not available in your system.") % (module.name, dep.name,))
odoo.exceptions.UserError: ("You try to install module 'project_event' that depends on module 'web_widget_table'.\nBut the latter module is not available in your system.", '')
Is your feature request related to a problem? Please describe.
Tasks without project cannot have a timesheet, but they should.
Describe the solution you'd like
Change the validation, so tasks without projet_id can have a timesheet.
Describe alternatives you've considered
Assign tasks to a default project?
CodeFactor found an issue: Do not use len(SEQUENCE)
to determine if a sequence is empty
It's currently on:
project_event\models\project_task.py:614
Describe the bug
When an event (project_project) is duplicated, an error occurs.
To Reproduce
Steps to reproduce the behavior:
Click on duplicate at the top of the event form page
Expected behavior
The event should be duplicated
Error Message
Traceback (most recent call last):
File "/opt/odoodev/git/odoo/odoo/http.py", line 650, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoodev/git/odoo/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoodev/git/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/opt/odoodev/git/odoo/odoo/http.py", line 692, in dispatch
result = self._call_function(**self.params)
File "/opt/odoodev/git/odoo/odoo/http.py", line 342, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoodev/git/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoodev/git/odoo/odoo/http.py", line 335, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoodev/git/odoo/odoo/http.py", line 936, in call
return self.method(*args, **kw)
File "/opt/odoodev/git/odoo/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/opt/odoodev/git/odoo/addons/web/controllers/main.py", line 934, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoodev/git/odoo/addons/web/controllers/main.py", line 926, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoodev/git/odoo/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/opt/odoodev/git/odoo/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoodev/git/odoo/addons/project/models/project.py", line 245, in copy
project = super(Project, self).copy(default)
File "/opt/odoodev/git/odoo/odoo/models.py", line 3946, in copy
new = self.with_context(lang=None).create(vals)
File "/opt/odoodev/git/server-tools/auditlog/models/rule.py", line 206, in create_full
new_record = create_full.origin(self, vals, **kwargs)
File "/opt/odoodev/git/project-addons/project_event/models/project_project.py", line 135, in create
return super(Project, self).create(vals)
File "/opt/odoodev/git/odoo/addons/project/models/project.py", line 256, in create
project = super(Project, self).create(vals)
File "/opt/odoodev/git/odoo/addons/mail/models/mail_alias.py", line 223, in create
)).create(vals)
File "/opt/odoodev/git/odoo/addons/mail/models/mail_thread.py", line 248, in create
thread.message_auto_subscribe(list(create_values), values=create_values)
File "/opt/odoodev/git/odoo/addons/mail/models/mail_thread.py", line 2173, in message_auto_subscribe
self.message_subscribe(partner_ids=[pid], subtype_ids=subtypes, force=(subtypes != None))
File "/opt/odoodev/git/odoo/addons/project/models/project.py", line 311, in message_subscribe
partner_ids=[partner_id], channel_ids=None, subtype_ids=None, force=False)
File "/opt/odoodev/git/odoo/addons/mail/models/mail_thread.py", line 2024, in message_subscribe
self.sudo().write({'message_follower_ids': gen})
File "/opt/odoodev/git/server-tools/auditlog/models/rule.py", line 273, in write_full
result = write_full.origin(self, vals, **kwargs)
File "/opt/odoodev/git/project-addons/project_event/models/project_task.py", line 381, in write
self.update_reservation_event(vals)
File "/opt/odoodev/git/project-addons/project_event/models/project_task.py", line 426, in update_reservation_event
self.ensure_one()
File "/opt/odoodev/git/odoo/odoo/models.py", line 4366, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: project.task()
Describe the bug
Message send before the change in status is made on project_project
To Reproduce
Change the status, but do not confirm. Even if no confirmation was made, the message is sent and it appears on the message thread of the event
Expected behavior
If the change of status is not confirmed, there shouldn't be any message
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.