Commit Graph
114 Commits
Author SHA1 Message Date
Josse Colpaert 2ddc35a530 [REF][NEWPIE] mrp: new MRP
This commit contains the core of the new MRP. It contains a whole refactoring
of the MRP application, with improved and new features, written in new API.
Among other here are the main manufacturing workflow improvements :

 - Picking type not only for pickings but also for manufacturing orders
 - Properties replaced by picking type
 - BoM can only be produced with its routing (no other)
 - Either produce without routing with only production orders, or produce with
   routing
 - By default, there is an order in the work orders (serially), but you can
   override it to be able to work in parallel
 - Time clocking on work orders and block time on work centers with reporting
   on OEE, performance, losses, ...
 - Real-time adaptation of timings on operations
 - Lots/serial numbers can be inputted like in the pickings on manufacturing
   orders.  It is also possible to input them in the work orders.
 - Material availability independent of production order state (possibility to
   start production when only part of it is there)
 - Work sheets on work orders
 - Put messages on work orders to make your workers pay attention to something
 - Full traceability link to see for each produced piece of stock, the
   consumed pieces, ...
 - Separate scrap object (a scrap is not done based on an original move
   anymore)
 - Separate unbuild system (if you want to unbuild into its original
   components)

Thanks to all people that helped during this development, notably but not
limited to Chirag A Dodiya (cod@odoo.com), Gaurav Panchal (gan@odoo.com),
Jignesh Rathod (jir@odoo.com), Mansi Trivedi (mtr@odoo.com), Pariket Trivedi
(ptr@odoo.com).
2016-07-04 16:22:37 +02:00
Josse Colpaert ba7274dc01 [IMP] resource, misc: time_efficiency on 100 scale 2016-07-04 16:22:35 +02:00
Xavier Morel 4a6adff30d [ADD] resource: work day helpers
Add methods to query work days (entire) for resources for systems
working daily insted of hourly.
2016-06-07 17:41:44 +02:00
Christophe Simonis d1a79ec704 [MERGE] forward port of branch saas-6 up to 9363372 2016-02-17 16:28:56 +01:00
Christophe Simonis 9363372efe [MERGE] forward port of branch 8.0 up to 0f46e6a 2016-02-17 16:20:23 +01:00
Adrien Peiffer (ACSONE) 5e940643a5 [FIX] In some cases, the half hours are not considered in intervals computation 2016-02-16 17:24:21 +01:00
Christophe Simonis 57168a9e90 [MERGE] forward port of branch saas-6 up to a669433 2015-09-23 14:34:26 +02:00
Christophe Simonis 3bb0cb2a50 [MERGE] forward port of branch 8.0 up to 9c8b99a 2015-09-04 18:30:48 +02:00
Goffin Simon 64e1c28e35 [FIX] resource: get_working_intervals_of_day
To compute start and end date of a working interval this function replaced
hour in datetime object without taking into account the time zone. The start and end date
taking respectively from calendar_working_day.hour_from and calendar_working_day.hour_to are
in the time zone of the user and the datetime object are compared in UTC to avoid schedule's gap.
This is why the start and end must be converted in UTC after being replaced by these hours.
The tz_info must be removed from dates because it's forbidden to compare naive and aware dates.

opw:648349
2015-09-04 10:01:20 +02:00
Raphael Collet ed95043d7e [IMP] *: add archive/unarchive feature on some models
Add the statbutton, search filter, and enable the kanban column archiving on
models `res.partner`, `crm.lead`, `event.event`, `hr.employee`, `hr.applicant`,
`mail.mass_mailing`, `mail.mass_mailing.list`, `product.product`,
`project.project`, `project.task`, `project.issue`.
2015-09-02 14:29:42 +02:00
Christophe Simonis 044c0625ad [MERGE] forward port of branch saas-6 up to 7faf72c 2015-08-31 19:57:20 +02:00
Christophe Simonis 7faf72c024 [MERGE] forward port of branch 8.0 up to 0c1e978 2015-08-31 19:25:37 +02:00
Antonio Espinosa e1d59f8f82 [FIX] resource: Schedule days backwards when days is negative number
Regarding _schedule_days, similar thing was done in
saas-6, @ fd5e7f2.
When the argument `days` was negative, the
returned intervals were wrong.

Regarding `get_working_intervals_of_day`,
calling this method without
`default_interval` and calendar
set crashed.

Closes #8208
2015-08-28 12:33:46 +02:00
Thibault Delavallée f1099a6598 [REM] resource, project: removed faces library and its related
code in resource and project.

This library was once used to perfom resource allocation: scheduling
tasks and things like that. However this feature cannot be accessed
through the interface since a long time.

The feature is now removed from the project code. The library has been
removed. Some code in resource used only in the project code
has also been removed, as well as a test linked to this code.
2015-07-28 12:36:00 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
Goffin Simon 0fd773a486 [IMP] Cleanup and refactoring of exception handling
Unify and refactor exception handling in framework and addons.

The generic `except_osv` is now deprecated, and replaced by more specialized exception subtypes:
 - `UserError` (renamed from Warning, as it conflicts with the built-in `Warning`) raised when a non-technical error occurs during a business operation. It could be a missing information in the data provided by the user, or a misconfiguration.
 - `AccessError`: raised when any operation is denied because the user conducting it does not have the required access rights.
 - `AccessDenied`: raised when an operation that requires authenticated access is attempted via an unauthenticated request.
 - `MissingError`: raised when an operation is attempted on a record that does not exist.
 - `ValidationError`: raised when an operation violates a SQL or Python constraint.
 - All other exceptions are internal errors due to a system problem or bug, and raised untouched to the client-side, which should display a traceback.

All exceptions take a single message argument.

The `test_exceptions` module has been updated to showcase both new and old (deprecated) exceptions.

A great many old `except_osv` had a useless title with "Error!" or "Warning", those have been removed, as this is handled by the client-side widget that displays the messages.

This commit introduces a more consistent policy for logging errors and warnings:
 - All messages that do not require administrator attention should be logged at INFO level or lower. This includes all errors that are notified to the user in a friendly manner, even for access right problems or validation errors during business operations.
 - All messages that indicate a likely misconfiguration or malicious use by the users should be logged at WARNING level, as they typically require administrator attention.
 - All other unhandled internal errors cannot typically be handled by the user and should be logged at ERROR or higher level, as they require immediate administrator attention.
2015-01-16 17:15:18 +01:00
Leonardo Donelli 4a0b13ed92 [REF] remove vim modelines and resulting trailing blank lines
Let 2015 be a year without modelines!
cf #4174
2014-12-31 15:52:13 +01:00
Josse Colpaert 61a415badd [IMP] Add group on leave
[IMP] interval_remove_leaves everywhere instead of interval_remove_leaves_groups once

[FIX] Add cr, uid in test
2014-12-19 11:08:19 +01:00
Josse Colpaert fd5e7f20d0 [IMP] Add stock_calendar module and adapt the resource module to contain some necessary changes
Update views for date_to on calendars

[IMP] Will add a date_to in the calendar attendance and date_from and date_to should be applied/ check backwards also
[IMP] get_attendance_for_weekday will pass date instead of weekday

[IMP] should assign correct procurements in run
2014-12-19 11:08:00 +01:00
Thibault Delavallée 622b52d262 [FIX] project_issue, resource: fixed computation of hours / days to open (assign) or close an issue. Those fields now have a conditional store, because they were not recomputed even when changing date_open and date_closed. Changing the stage now correctly changes the date_closed. Also added some fixes in resource module, the date was not correctly taken into account when computing the number of working hours between two dates. 2014-08-07 08:54:09 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary size parameters on char fields 2014-06-25 17:13:43 +02:00
Holger Brunn 266b553aa8 [FIX] pass correct magic value for resource
[FIX] typo

lp bug: https://launchpad.net/bugs/1297352 fixed

bzr revid: hbrunn@therp.nl-20140325151047-6sd0irzu4e85i5ru
2014-03-25 16:10:47 +01:00
Xavier Morel 642b3a167d [FIX] resource: py26 compat'
bzr revid: xmo@openerp.com-20140128175640-gmeecmwhevhg3oek
2014-01-28 18:56:40 +01:00
Thibault Delavallée 339c2ecc54 [IMP] default_interval also in schedule_hours, allowing to
schedule some work with a default calendar, like previous version
of resource module.

bzr revid: tde@openerp.com-20140122142805-8zyntmkx72l10fbq
2014-01-22 15:28:05 +01:00
Thibault Delavallée 2f275894f3 [CLEAN] resource: removed some TDE NOTE
bzr revid: tde@openerp.com-20140122134700-0iwb4uhg8jjdjzxn
2014-01-22 14:47:00 +01:00
Thibault Delavallée 6df94832bd [CLEAN] resource: some cleaning in docstrings
bzr revid: tde@openerp.com-20140122134609-7fvd1p49r8e40zoa
2014-01-22 14:46:09 +01:00
Thibault Delavallée 9fbbba1ee0 [IMP] resource : some docstrings cleaning + void calendar
taken into account in days scheduling + finished yesys

bzr revid: tde@openerp.com-20140122132918-4c1ag6y5gqasi32d
2014-01-22 14:29:18 +01:00
Thibault Delavallée 6e1cb5226b [IMP] hr_contract: added override of base_action_rule (+ dependency) to add the possibility to use a user-related working scheduling.
bzr revid: tde@openerp.com-20130902134200-xvy5hb7lqv2wv0um
2013-09-02 15:42:00 +02:00
Thibault Delavallée 2cdefa52ef [FIX] resource: fixed computation with a False calendar id (spotted in stock_no_autopicking.py yml tests)
bzr revid: tde@openerp.com-20130830144334-ong666lutkbibtrd
2013-08-30 16:43:34 +02:00
Thibault Delavallée 83e0e842c2 [CLEAN] resource: cleaned old API
bzr revid: tde@openerp.com-20130830142736-pd1o12fe40h2vgi2
2013-08-30 16:27:36 +02:00
Thibault Delavallée 53fe285259 [IMP] resource: old API replacement + first implementation of compute_hours, to compute the number of working hours between two dates.
bzr revid: tde@openerp.com-20130830141610-uu1t88atcvpmkjjb
2013-08-30 16:16:10 +02:00
Thibault Delavallée af79a26a1f [IMP] resource: overall fix of hours/days computation + scheduling + added tests
bzr revid: tde@openerp.com-20130830133250-ixehp7imac0duygd
2013-08-30 15:32:50 +02:00
Thibault Delavallée a67459018c [IMP] resource: first refactoring of various methods to calculate timed intervals based on resource.calendar. Added tests.
bzr revid: tde@openerp.com-20130821105109-1rtynzx69hmslxey
2013-08-21 12:51:09 +02:00
Thibault Delavallée a05b0bebbe [FORWARD] Forward port of 7.0 branch until revision 9143.
bzr revid: tde@openerp.com-20130521122359-b5vii7gv8arluz06
2013-05-21 14:23:59 +02:00
Martin Trigaux 38eb2bf80d [FIX]resource: revert correctly
bzr revid: mat@openerp.com-20130510082654-102w20am9zvgspd7
2013-05-10 10:26:54 +02:00
Martin Trigaux 726f755c2e [IMP]resource: use correctly float_compare
bzr revid: mat@openerp.com-20130510082338-055enqqpxcsuyp23
2013-05-10 10:23:38 +02:00
Martin Trigaux c820f6dcf8 [REF] revert useless chqnges
bzr revid: mat@openerp.com-20130510081803-d08uqm4b3as588xp
2013-05-10 10:18:03 +02:00
Martin Trigaux a7ee9acdaf [IMP] resource: use float_compare instead
bzr revid: mat@openerp.com-20130508142104-clgs1khxgktxlxsm
2013-05-08 16:21:04 +02:00
Martin Trigaux 22d6ef5cfe [FIX] resource: avoid floating point error in interval
bzr revid: mat@openerp.com-20130507094035-rtbyzukv4shpx024
2013-05-07 11:40:35 +02:00
Vo Minh Thu e69326ee3b [REF] removed explicit model instanciations.
bzr revid: vmt@openerp.com-20130415102349-vgcrfok2k5y10cwz
2013-04-15 12:23:49 +02:00
Chris Biersbach 90271ca3f8 [IMP] Removed debugging code
bzr revid: cbi@openerp.com-20130319103927-tpjpx5izr44xzmzp
2013-03-19 11:39:27 +01:00
Chris Biersbach 4b57becf80 [FIX] Forward Port of Changes from 6.1 Revision 7051 to make the issue analysis report work
bzr revid: cbi@openerp.com-20130319103126-07r73qlouykqazjt
2013-03-19 11:31:26 +01:00
Vo Minh Thu 6072fd11af [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20121210111654-0pm3pupnqqeip52n
2012-12-10 12:16:54 +01:00
Raphael Collet 590add54d4 [IMP] resource: improve ugly code in conversion function
bzr revid: rco@openerp.com-20121210090554-fb59bzz5ceogehms
2012-12-10 10:05:54 +01:00
Raphael Collet 635d5cbf0e [REV] undo revid:rco@openerp.com-20121207124917-cy3hz9x7aymd1cdt, because a potentially better patch is in line
bzr revid: rco@openerp.com-20121207150836-vsmee753v1w6yw6j
2012-12-07 16:08:36 +01:00
Raphael Collet 68e94d2f61 [MERGE] lp:~vrt-openerp/openobject-addons/trunk-bug-932584 (manage working times as local times)
bzr revid: rco@openerp.com-20121207124917-cy3hz9x7aymd1cdt
2012-12-07 13:49:17 +01:00
Raphael Collet aff07dfa3b [IMP] resource: improve code that computes working hours in local times
bzr revid: rco@openerp.com-20121207122351-eitc7zej6ss2035j
2012-12-07 13:23:51 +01:00
Raphael Collet 6ed367c093 [IMP] resource: small code improvements
bzr revid: rco@openerp.com-20121207121925-ju6mdv66k4zsw5yk
2012-12-07 13:19:25 +01:00
Raphael Collet ecd2cd1e05 [IMP] resource: improve conversion function hours (float) -> datetime.time
bzr revid: rco@openerp.com-20121207102718-jxojya78wnb8jmgc
2012-12-07 11:27:18 +01:00