Commit Graph
103974 Commits
Author SHA1 Message Date
Jérome Maes ba3eaa61ba [MOV] survey_crm: module directory organization 2016-07-15 12:57:51 +02:00
Tanguy Charlier 09ea5c7d49 [IMP] survey: add gc of empty survey userinputs in the autovacuum cron 2016-07-15 12:57:51 +02:00
Ravi Gadhia 66cb880b74 [MIG] survey: migrate into new api 2016-07-15 12:57:51 +02:00
Tanguy Charlier 628c1d9564 [MOV] survey: module directory organization 2016-07-15 12:57:50 +02:00
Jérome Maes c12a5fb204 [MERGE] calendar: migration to new api
* Move files and reorganize directories according to guidelines
* Lint and clean code, remove dead code
* Migrate code to the new API

In REF commit, some fields of calendar.event models changed. Due to
bad design, the code was not clean with the new API. Changing computed
fields make it more performant, and reduce code complexity.
See commit "[REF] calendar: change computed fields for start and
stop dates" for details.
2016-07-14 14:06:16 +02:00
Jérome Maes 51903f8a50 [IMP] calendar: rename cn field into common_name
We are not so lazy anymore. Oh wait ... !
2016-07-14 14:04:35 +02:00
tde-banana-odoo b7b935dbf8 [IMP] calendar: clean sending email to attendees
Change `send_email_to_attendees` signature to force setting email
template and remove `email_from`, since it is not usefull.

Now, when sending email to attendee, meeting author will also received
an invitation.

`get_ics_file` has been modified to be executed in batch.
2016-07-14 14:04:35 +02:00
Jérome Maes b1316f44eb [IMP] calendar, hr_holidays: uniformize context key to prevent sending mail to attendees
Code courtesy of tde-banana-odoo
2016-07-14 14:04:35 +02:00
Jérome Maes 95938118c7 [REF] calendar: change computed fields for start and stop dates
- `start` and `stop` fields are not computed anymore. Indeed, it was not normal
to have required stored computed field. Normally we shouldn't write on these
fields, but since client calendar api need them, we keep them as normal
datetime fields
- `start_date` and `stop_date` become stored computed date fields depending of
`start`,`stop` and `allday`. An inverse method allow to write on these fields,
since it can be the case from the form view
- `start_datetime` and `stop_datetime` follow the same logic
- `onchange_allday` code is mostly moved in `_inverse_dates` of new computed fields
- `_set_date` method (called in create/write) is now removed, since it does the same
thing as old onchanges
- `_onchange_duration` is kept to adapt `stop_datetime` when changing `start_datetime`
or `duration` on form view
- Duration is now 'zero' in database for allday meeting. Before, it was not changed.
Setting it to zero is less falsy. `duration` can not (yet) be a computed field since
it depends on others computed fields.

After migration, we manage to keep old behavior but the code was crap. Switching stored computed
fields make it cleaner, and respecting new API standarts.
This changes avoid multiple methods doing almost the same thing, and is less 'buggy'.
2016-07-14 14:04:34 +02:00
Jérome Maes 5040719b8d [REF] calendar: remove useless code 2016-07-14 14:04:34 +02:00
Jérome Maes 21e4579551 [REF] calendar: reorder methods, make some private, and rename some others 2016-07-14 14:04:34 +02:00
Mitali Patel e3560bd310 [REF] calendar: Migrated yml test cases to python unittest 2016-07-14 14:04:34 +02:00
Jérome Maes 6af6148a24 [REF] calendar: code cleaning to be more 'api v8'
- move `get_ics_file` from calendar.attendee to calendar.event
- remove calendar.event arguments to convert method into
`api.multi`, which make more sense
- `create_attendees` now returns recordset instead of list of ids
- change signature of `get_interval` method
2016-07-14 14:04:34 +02:00
Jérome Maes bcfe16a69e [IMP] calendar: add helpers to mange virtual ids 2016-07-14 14:04:34 +02:00
Jérome Maes 6bc14c9142 [MIG] calendar: migration to new API
Migration of all python code, mostly withtout chagnes. And adapting
xml files to guidelines.

On calendar.py, some changes have been perform to make the migration works :
- `_compute` method has been split into `_compute_dates`, `_compute_attendee` and `_compute_display_time`.
- remove unused method `onchange_partner_ids`, `check_partners_email`
- make `compute_rule_string` use a cache record instead of a value
dict to avoid crashes
- remove `new_invitation_token` method, and make it a default value on attendee creation
- add a default value on `day` field, otherwise the "Please select a
proper day of the month" exception is raised during the onchange
2016-07-14 14:04:33 +02:00
Jérome Maes fe42986ee2 [MOV] calendar: split models in multiple files 2016-07-14 14:04:33 +02:00
Jérome Maes b535461e47 [MOV] calendar: reoganize module directory 2016-07-14 14:04:33 +02:00
Yannick Tivisse 2a36b54f14 [MERGE] website_gengo: Migration to new API 2016-07-14 11:37:41 +02:00
Yannick Tivisse c5b1a6ba61 [FIX] base_gengo: pass a translation if '_check_value' raise a ValidationError 2016-07-14 11:01:10 +02:00
Jigar Patel 5f146ac42d [MIG] website_gengo: Migrate into new api 2016-07-14 11:01:09 +02:00
Jigar Patel c9dcc6fa76 [MOV] website_gengo: File name as per new api guideline 2016-07-14 11:01:09 +02:00
Yannick Tivisse fac108b606 [FIX] base_gengo: issue introduced during the migration 2016-07-14 11:01:09 +02:00
Yannick Tivisse 187c3f2fcd [MERGE] base_gengo: Migration to new API 2016-07-13 16:54:51 +02:00
Yannick Tivisse 651caf0f59 [MIG] base_gengo: Migrated to new API 2016-07-13 16:46:29 +02:00
Yannick Tivisse 9fd3c9e7f0 [MOV] base_gengo: Reorganized File Structure 2016-07-13 15:36:50 +02:00
Joren Van Onder 7229a5be95 [IMP] stock: consistent kanban view for pack operations and move lines
This makes the kanban view for pack_operation_product_ids more
consistent with the one for the move lines and also adds the UOM for the
pack operation to the kanban card.
2016-07-13 14:10:57 +02:00
Yannick Tivisse da6ecd39b2 [MERGE] resource: Migration to new API 2016-07-13 12:54:32 +02:00
Yannick Tivisse 6372080621 [FIX] project_issue: new api call to 'get_working_hours' 2016-07-13 12:53:34 +02:00
Yannick Tivisse ee9b64a428 [FIX] hr_holiday: correct call to get_working_hours + typo 2016-07-13 12:53:34 +02:00
Ravi Gohil dc77ed4f90 [MIG] resource: Migrated unittest cases to new api
- Converted yml test cases to python unittest
- now, 'self.calendar' recordset from common.py will carry forward its context
  so no need to pass context explicitely to the methods calling using that recordset.
- removed commented code
- used odoo.fields.Datetime to covert dates instead of python datetime library
2016-07-13 12:53:34 +02:00
Yannick Tivisse 839a4b8316 [FIX] hr_payroll: wrong call to 'working_hours_on_day' 2016-07-13 12:53:34 +02:00
Ravi Gohil 87f8860982 [MIG] stock_calendar: migrate resource.py file + cleaning
90 percents of the file had to be migrated because of the methods
interval_remove_leaves and get_leave_intervals that were migrated in
the module resource
2016-07-13 12:53:34 +02:00
Mansi Gandhi a4e57ea16c [MIG] resource: Migrated to new api. 2016-07-13 12:53:34 +02:00
Ravi Gohil 22ef7c15b5 [MOV] resource: Organized/renamed files as per new api guidelines. 2016-07-13 12:53:34 +02:00
Yannick Tivisse 03856e6e17 [MERGE] base_import_module: migration to new API 2016-07-13 12:49:01 +02:00
Mohammed Shekha 870f2ff893 [MIG] base_import_module: Migrated to new API 2016-07-13 12:46:50 +02:00
Mohammed Shekha fc634557f7 [MOV] base_import_module: Change file name as per migration guidelines 2016-07-13 12:46:50 +02:00
Fabien Pinckaers c1e5ab9b13 [IMP] sale: consistency top menu: a sale order is/was a quotation 2016-07-13 10:32:44 +02:00
Fabien Pinckaers 7016f9131b [IMP] website_recruitment: category Website to make it visible from Customize > Install apps 2016-07-13 10:29:48 +02:00
Thibault Delavallée 8d81344d97 [MERGE] stock submodules: migrate to new API
* Move files and reorganize directories according to guidelines
* Lint and clean code, remove dead code
* Migrate code to the new API

Applied to stock submodules: stock_account, stock_calendar,
stock_landed_costs.

The following modules were already in new API, but cleaned and reorganized:
stock_dropshipping, stock_picking_wave, sale_stock

Two fixes from saas-12 in yaml_import have been included in this branch
because originally developped when fixing issues related to the new API
migration.
2016-07-13 10:00:45 +02:00
Thibault Delavallée 7ad15c3827 [IMP] sale_stock: small code improvements
This module is already migrated. However some code could easily be improved
or cleaned.
2016-07-12 17:53:49 +02:00
Thibault Delavallée d94df45501 [FIX] sale_stock: indentation issue 2016-07-12 17:53:49 +02:00
Thibault Delavallée d56ccae9f1 [CLN] sale_stock: cleaning and linting 2016-07-12 17:53:49 +02:00
Thibault Delavallée 3bf3d15fc5 [REM] sale_stock: unused demo file 2016-07-12 17:53:11 +02:00
Thibault Delavallée b755ee80a5 [MOV] sale_stock: reorganize module 2016-07-12 17:53:10 +02:00
Mansi Trivedi 5beec98ef8 [MIG] stock_calendar: test from yml to unit tests 2016-07-12 17:53:10 +02:00
Thibault Delavallée 4cb0965365 [MIG] stock_calendar: new API 2016-07-12 17:53:10 +02:00
Thibault Delavallée 3f7a950ccb [REF] purchase, stock_calendar: pre migration cleaning
* All methods are converted into an api.multi style (using ids instead of
  a browse record or an id)
* Removed api.v7 methods for two methods defined in purchase and overriden
  in stock_calendar, now used only in a true multi-style (old and new API)
* Moved methods having orderpoint as primary object on the orderpoint model
* Removed unused next_day field on resource.calendar model; it was
  introduced with hacks of resource.calendar, and never used.

The whole override of resource models should be cleaned but will be done
after migration of resource and stock.calendar.
2016-07-12 17:53:10 +02:00
Mansi Trivedi 61039df4b9 [MOV] stock_calendar: reorganize module 2016-07-12 17:53:09 +02:00
Divyesh Makwana 1919945770 [MIG] stock_account: new API 2016-07-12 17:53:07 +02:00