-
Notifications
You must be signed in to change notification settings - Fork 239
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
[ADD] fieldservice 0.0.1 #2
Conversation
[FIX] Lint errors
0067bb7
to
abe1780
Compare
Todo:
|
[ADD] fsm.wizard
Update fsm_stage.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to have this merged, so we can start working with it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few style issues to fix, and a few design questions to clarify.
'utm', | ||
'rating', | ||
'portal', | ||
'web_timeline', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should be neat on dependencies: afaics we don't actually need utm, rating and portal right now.
These dependencies should added by a "FSM portal" module extension.
Regarding the web_timeline, I see the point - it makes the base module flashier.
But adding the additional dependency on the web OCA repo will add some trouble for people trying to install this from the FSM Github repo. So, it is not a showstopper, but I would rather separate the timeline into a different module (that can be made after this PR is merged).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -0,0 +1,49 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<odoo> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no_update="1"?
This should be suggested default data, not required data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
fieldservice/models/fsm_location.py
Outdated
_inherits = {'res.partner': 'partner_id'} | ||
_description = 'Field Service Location' | ||
|
||
description = fields.Char(string='Description') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use name
instead of description
it will be automatically picked by name_get
for record representation.
color = fields.Integer('Color Index', default=0) | ||
|
||
# Request | ||
name = fields.Char(string='Name', required=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string="Title"?
fieldservice/models/fsm_order.py
Outdated
default=lambda self: _('New')) | ||
customer_id = fields.Many2one('res.partner', string='Customer', | ||
domain=[('customer', '=', True)], | ||
required=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider not making it mandatory in the base module.
fieldservice/models/fsm_order.py
Outdated
_name = 'fsm.order' | ||
_description = 'Field Service Order' | ||
_inherit = ['mail.thread', 'utm.mixin', 'rating.mixin', | ||
'mail.activity.mixin', 'portal.mixin'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need all these at this point? (utm, rating and portal)
|
||
class ServiceLocation(models.Model): | ||
_name = 'service.location' | ||
_description = 'Location of the service' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this to indicate a precise location inside a fsm.location?
Should it be linked to a fsm_location_id?
|
||
class ServiceRequest(models.Model): | ||
_name = 'service.request' | ||
_description = 'Details of the Service Request' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this for Work Orders inside a Service Order?
Should it have a order_id
field for the parent Order?
name="action_cancel" string="Cancel" | ||
type="object" groups="fieldservice.group_fsm_dispatcher" | ||
attrs="{'invisible': [('stage_id', '=', %(fieldservice.fsm_stage_completed)d)]}"/> | ||
<field name="stage_id" widget="statusbar"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a hard coded stage list and workflow.
I would prefer a more flexible stage/state combination, more friendly for each customer's specific workflow.
We can have a separate discussion on this topic if you like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
</group> | ||
<group> | ||
<field name="fold"/> | ||
</group> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to include Teams in the FSM base module, and allow for different Stages for each team:
my "Installations" team might have a different workflow from my "Repairs" teams.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #5
[FIX] PR comments
#3