[IMP] All res_config files : Convert Booleans to Selection fields + radio buttons in views
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
<field name="auth_signup_uninvited" class="oe_inline"/>
|
<field name="auth_signup_uninvited" class="oe_inline"/>
|
||||||
<label for="auth_signup_uninvited"/>
|
<label for="auth_signup_uninvited"/>
|
||||||
</div>
|
</div>
|
||||||
<div attrs="{'invisible':[('auth_signup_uninvited','=',False)]}">
|
<div attrs="{'invisible':[('auth_signup_uninvited','=',False)]}" groups="base.group_no_one">
|
||||||
<label for="auth_signup_template_user_id"/>
|
<label for="auth_signup_template_user_id"/>
|
||||||
<field name="auth_signup_template_user_id" class="oe_inline"
|
<field name="auth_signup_template_user_id" class="oe_inline"
|
||||||
attrs="{'required': [('auth_signup_uninvited', '=', True)]}"
|
attrs="{'required': [('auth_signup_uninvited', '=', True)]}"
|
||||||
|
|||||||
@@ -80,12 +80,10 @@ class base_config_settings(osv.osv_memory):
|
|||||||
self.pool['ir.rule'].write(cr, uid, [partner_rule.id], {'active': not bool(wizard.company_share_partner)}, context=context)
|
self.pool['ir.rule'].write(cr, uid, [partner_rule.id], {'active': not bool(wizard.company_share_partner)}, context=context)
|
||||||
|
|
||||||
|
|
||||||
# Preferences wizard for Sales & CRM.
|
# Empty class but required since it's overrided by sale & crm
|
||||||
# It is defined here because it is inherited independently in modules sale, crm.
|
|
||||||
class sale_config_settings(osv.osv_memory):
|
class sale_config_settings(osv.osv_memory):
|
||||||
_name = 'sale.config.settings'
|
_name = 'sale.config.settings'
|
||||||
_inherit = 'res.config.settings'
|
_inherit = 'res.config.settings'
|
||||||
_columns = {
|
_columns = {
|
||||||
'module_crm': fields.boolean('CRM'),
|
|
||||||
'module_sale' : fields.boolean('SALE'),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,15 +19,6 @@
|
|||||||
<button type="object" name="open_company" string="Configure your company data" icon="gtk-execute" class="oe_inline oe_link"/>
|
<button type="object" name="open_company" string="Configure your company data" icon="gtk-execute" class="oe_inline oe_link"/>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
|
||||||
<label for="id" string="Options"/>
|
|
||||||
<div>
|
|
||||||
<div name="multi_company">
|
|
||||||
<field name="module_multi_company" class="oe_inline"/>
|
|
||||||
<label for="module_multi_company"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Email" name="email_label"/>
|
<label for="id" string="Email" name="email_label"/>
|
||||||
<div name="email">
|
<div name="email">
|
||||||
@@ -38,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group groups="base.group_no_one">
|
||||||
<label for="id" string="Portal access"/>
|
<label for="id" string="Portal access"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
@@ -72,6 +63,42 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
|
<group groups="base.group_no_one">
|
||||||
|
<label for="font" />
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<field name="font" class="oe_inline" />
|
||||||
|
<button string="(reload fonts)" name="act_discover_fonts" type="object" class="oe_link"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<label for="id" string="Multi Company"/>
|
||||||
|
<div>
|
||||||
|
<div name="multi_company">
|
||||||
|
<field name="module_multi_company" class="oe_inline"/>
|
||||||
|
<label for="module_multi_company"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</group>
|
||||||
|
<group attrs="{'invisible': [('module_multi_company','=',False)]}">
|
||||||
|
<label for="module_inter_company_rules" string="Inter company"/>
|
||||||
|
<div name="inter_company">
|
||||||
|
<div name="module_inter_company_rules">
|
||||||
|
<field name="module_inter_company_rules" class="oe_inline"/>
|
||||||
|
<label for="module_inter_company_rules"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</group>
|
||||||
|
<group string="Shared ressources" name="company_share_ressources" attrs="{'invisible': [('module_multi_company','=',False)]}">
|
||||||
|
<label for="company_share_partner" />
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<field name="company_share_partner" class="oe_inline" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</group>
|
||||||
|
<separator string="Google Integration" name="google"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Google Drive"/>
|
<label for="id" string="Google Drive"/>
|
||||||
<div name="google_drive">
|
<div name="google_drive">
|
||||||
@@ -95,32 +122,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
|
||||||
<label for="font" />
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<field name="font" class="oe_inline" />
|
|
||||||
<button string="(reload fonts)" name="act_discover_fonts" type="object" class="oe_link"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<label for="module_inter_company_rules" string="Inter company"/>
|
|
||||||
<div name="inter_company">
|
|
||||||
<div name="module_inter_company_rules">
|
|
||||||
<field name="module_inter_company_rules" class="oe_inline"/>
|
|
||||||
<label for="module_inter_company_rules"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
<group string="Shared ressources" name="company_share_ressources">
|
|
||||||
<label for="company_share_partner" />
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<field name="company_share_partner" class="oe_inline" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -145,20 +146,9 @@
|
|||||||
or
|
or
|
||||||
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
||||||
</header>
|
</header>
|
||||||
<div name="customer feature" attrs="{'invisible': [('module_sale','=',False)]}">
|
<div id="main">
|
||||||
<field name="module_sale" invisible="1"/>
|
|
||||||
<separator string="Quotations and Sales Orders"/>
|
|
||||||
<group name="Customer">
|
|
||||||
<label for="id" string="Customer Features"/>
|
|
||||||
<div name="Customer Features"/>
|
|
||||||
</group>
|
|
||||||
<group name="Sale">
|
|
||||||
<label for="id" string="Sale Features"/>
|
|
||||||
<div name="Sale Features"/>
|
|
||||||
</group>
|
|
||||||
</div>
|
</div>
|
||||||
<div name="config_sale"/>
|
|
||||||
<div name="config_pos"/>
|
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -236,7 +236,6 @@ class crm_lead(format_address, osv.osv):
|
|||||||
'function': fields.char('Function'),
|
'function': fields.char('Function'),
|
||||||
'title': fields.many2one('res.partner.title', 'Title'),
|
'title': fields.many2one('res.partner.title', 'Title'),
|
||||||
'company_id': fields.many2one('res.company', 'Company', select=1),
|
'company_id': fields.many2one('res.company', 'Company', select=1),
|
||||||
'planned_cost': fields.float('Planned Costs'),
|
|
||||||
'meeting_count': fields.function(_meeting_count, string='# Meetings', type='integer'),
|
'meeting_count': fields.function(_meeting_count, string='# Meetings', type='integer'),
|
||||||
'lost_reason': fields.many2one('crm.lost.reason', 'Lost Reason', select=True, track_visibility='onchange'),
|
'lost_reason': fields.many2one('crm.lost.reason', 'Lost Reason', select=True, track_visibility='onchange'),
|
||||||
}
|
}
|
||||||
@@ -1001,7 +1000,6 @@ class crm_lead(format_address, osv.osv):
|
|||||||
if msg.get('priority') in dict(crm_stage.AVAILABLE_PRIORITIES):
|
if msg.get('priority') in dict(crm_stage.AVAILABLE_PRIORITIES):
|
||||||
update_vals['priority'] = msg.get('priority')
|
update_vals['priority'] = msg.get('priority')
|
||||||
maps = {
|
maps = {
|
||||||
'cost':'planned_cost',
|
|
||||||
'revenue': 'planned_revenue',
|
'revenue': 'planned_revenue',
|
||||||
'probability':'probability',
|
'probability':'probability',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -556,11 +556,6 @@
|
|||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
<page string="Fund Raising" groups="crm.group_fund_raising">
|
|
||||||
<group>
|
|
||||||
<field name="planned_cost"/>
|
|
||||||
</group>
|
|
||||||
</page>
|
|
||||||
</notebook>
|
</notebook>
|
||||||
</sheet>
|
</sheet>
|
||||||
<div class="oe_chatter">
|
<div class="oe_chatter">
|
||||||
|
|||||||
@@ -10,17 +10,16 @@ class crm_configuration(osv.TransientModel):
|
|||||||
_inherit = ['sale.config.settings', 'fetchmail.config.settings']
|
_inherit = ['sale.config.settings', 'fetchmail.config.settings']
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'group_fund_raising': fields.boolean("Manage Fund Raising",
|
|
||||||
implied_group='crm.group_fund_raising',
|
|
||||||
help="""Allows you to trace and manage your activities for fund raising."""),
|
|
||||||
'module_crm_claim': fields.boolean("Manage Customer Claims",
|
|
||||||
help='Allows you to track your customers/vendors claims and grievances.\n'
|
|
||||||
'-This installs the module crm_claim.'),
|
|
||||||
'generate_sales_team_alias': fields.boolean(
|
'generate_sales_team_alias': fields.boolean(
|
||||||
"Automatically generate an email alias at the sales team creation",
|
"Automatically generate an email alias at the sales team creation",
|
||||||
help="Odoo will generate an email alias based on the sales team name"),
|
help="Odoo will generate an email alias based on the sales team name"),
|
||||||
'alias_prefix': fields.char('Default Alias Name for Leads'),
|
'alias_prefix': fields.char('Default Alias Name for Leads'),
|
||||||
'alias_domain' : fields.char('Alias Domain')
|
'alias_domain' : fields.char('Alias Domain'),
|
||||||
|
'group_multi_salesteams': fields.selection([
|
||||||
|
(0, 'One sales team only'),
|
||||||
|
(1, 'Activate multiple sales teams')
|
||||||
|
], "Multiple Sales Teams",
|
||||||
|
implied_group='base.group_multi_salesteams'),
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
|
|||||||
@@ -7,51 +7,37 @@
|
|||||||
<field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
|
<field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<data>
|
<data>
|
||||||
<div name="config_sale" position="inside">
|
<div id="main" position="inside">
|
||||||
<separator string="Sale Services"/>
|
<group string="CRM" name="config_alias">
|
||||||
<group>
|
<label for="id" string="Leads Email Alias"/>
|
||||||
<label for="id" string="After-Sale Services"/>
|
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div attrs="{'invisible': [('alias_domain', 'in', ['localhost', '', False])]}">
|
||||||
<field name="module_crm_claim" class="oe_inline"/>
|
<p class="text-muted">
|
||||||
<label for="module_crm_claim"/>
|
Each sales team has an email alias that
|
||||||
|
could be setup on the sales team form. You
|
||||||
|
can setup a generic email alias to create
|
||||||
|
incoming leads.
|
||||||
|
</p>
|
||||||
|
<field name="alias_prefix" class="oe_inline"/>
|
||||||
|
<span>@</span>
|
||||||
|
<field name="alias_domain" class="oe_inline" readonly="1"/>
|
||||||
|
</div>
|
||||||
|
<div attrs="{'invisible': [('alias_domain', 'not in', ['localhost', '', False])]}">
|
||||||
|
<p>
|
||||||
|
<button type="action"
|
||||||
|
name="base_setup.action_general_configuration"
|
||||||
|
string="Setup your domain alias" class="oe_link"/>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<label for="group_multi_salesteams"/>
|
||||||
|
<div>
|
||||||
|
<field name="group_multi_salesteams" widget="radio"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
</div>
|
</div>
|
||||||
<div name="config_sale" position="after">
|
|
||||||
<div name="config_alias">
|
|
||||||
<separator string="Emails Integration"/>
|
|
||||||
<p name="config_email_integration">
|
|
||||||
Odoo allows to automatically create leads
|
|
||||||
from incoming emails.
|
|
||||||
</p>
|
|
||||||
<group>
|
|
||||||
<label for="id" string="Leads Email Alias"/>
|
|
||||||
<div>
|
|
||||||
<div attrs="{'invisible': [('alias_domain', 'not in', ['localhost', '', False])]}">
|
|
||||||
<p>
|
|
||||||
<label string="To be able to set your Leads Email Alias, you need to fill your alias domain first."/><br />
|
|
||||||
<button type="action" name="base_setup.action_general_configuration"
|
|
||||||
string="Configure your email alias domain" class="oe_inline oe_link"/>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="oe_inline">
|
|
||||||
<label string="Create new leads when an email is sent to the following alias:" class="oe_inline oe_form_label_help oe_align_right"/>
|
|
||||||
<field name="alias_prefix" class="oe_inline"/>
|
|
||||||
<span>@</span>
|
|
||||||
<field name="alias_domain" class="oe_inline" readonly="1"/>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<field name="generate_sales_team_alias"/>
|
|
||||||
<label for="generate_sales_team_alias"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</data>
|
</data>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -24,11 +24,6 @@
|
|||||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="group_fund_raising" model="res.groups">
|
|
||||||
<field name="name">Manage Fund Raising</field>
|
|
||||||
<field name="category_id" ref="base.module_category_hidden"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record model="res.users" id="base.user_root">
|
<record model="res.users" id="base.user_root">
|
||||||
<field eval="[(4,ref('base.group_partner_manager'))]" name="groups_id"/>
|
<field eval="[(4,ref('base.group_partner_manager'))]" name="groups_id"/>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -84,7 +84,6 @@
|
|||||||
assert len(line_ids), "Delivery cost is not Added"
|
assert len(line_ids), "Delivery cost is not Added"
|
||||||
line_data = self.browse(cr ,uid ,line_ids[0] ,context)
|
line_data = self.browse(cr ,uid ,line_ids[0] ,context)
|
||||||
assert float_compare(line_data.price_subtotal, 0, precision_digits=2) == 0, "Delivey cost is not correspond."
|
assert float_compare(line_data.price_subtotal, 0, precision_digits=2) == 0, "Delivey cost is not correspond."
|
||||||
|
|
||||||
-
|
-
|
||||||
I set default delivery policy.
|
I set default delivery policy.
|
||||||
-
|
-
|
||||||
|
|||||||
+21
-10
@@ -6,19 +6,30 @@ class event_config_settings(osv.TransientModel):
|
|||||||
_name='event.config.settings'
|
_name='event.config.settings'
|
||||||
_inherit='res.config.settings'
|
_inherit='res.config.settings'
|
||||||
_columns = {
|
_columns = {
|
||||||
'module_event_sale': fields.boolean(
|
'module_event_sale': fields.selection([
|
||||||
'Sell events tickets',
|
(0, "All events are free"),
|
||||||
|
(1, 'Allow selling tickets')
|
||||||
|
], "Tickets",
|
||||||
help='Install the event_sale module'),
|
help='Install the event_sale module'),
|
||||||
'module_website_event_track': fields.boolean(
|
'module_website_event_track': fields.selection([
|
||||||
'Organize few days event with track, full agenda, own menu in website',
|
(0, "No mini website per event"),
|
||||||
|
(1, 'Allow tracks, agenda and dedicated menus/website per event')
|
||||||
|
], "Tracks and Agenda",
|
||||||
help='Install the module website_event_track'),
|
help='Install the module website_event_track'),
|
||||||
'module_website_event_questions': fields.boolean(
|
'module_website_event_questions': fields.selection([
|
||||||
'Ask questions to online subscribers',
|
(0, "No extra questions on subscriptions"),
|
||||||
|
(1, 'Allow adding extra questions on subscriptions')
|
||||||
|
], "Subscription Survey",
|
||||||
help='Install the website_event_questions module'),
|
help='Install the website_event_questions module'),
|
||||||
'auto_confirmation': fields.boolean(
|
'auto_confirmation': fields.selection([
|
||||||
'Automate events and subscription confirmation', help='Unselect this option to manually manage draft event and draft subscription'),
|
(1, 'No validation step on subscription'),
|
||||||
'group_email_scheduling': fields.boolean(
|
(0, "Manually confirm every subscription")
|
||||||
'Schedule emails to attendees and subscribers',
|
], "Auto Confirmation",
|
||||||
|
help='Unselect this option to manually manage draft event and draft subscription'),
|
||||||
|
'group_email_scheduling': fields.selection([
|
||||||
|
(0, "No automated emails"),
|
||||||
|
(1, 'Schedule emails to attendees and subscribers')
|
||||||
|
], "Email Scheduling",
|
||||||
help='You will be able to configure emails, and to schedule them to be automatically sent to the attendees on subscription and/or attendance',
|
help='You will be able to configure emails, and to schedule them to be automatically sent to the attendees on subscription and/or attendance',
|
||||||
implied_group='event.group_email_scheduling'),
|
implied_group='event.group_email_scheduling'),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,30 +12,31 @@
|
|||||||
or
|
or
|
||||||
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
||||||
</header>
|
</header>
|
||||||
<separator string="Mass Mailing"/>
|
<separator string="Events"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Settings"/>
|
<label for="module_event_sale"/>
|
||||||
<div>
|
<div>
|
||||||
<div name="module_event_sale">
|
<field name="module_event_sale" widget="radio"/>
|
||||||
<field name="module_event_sale" class="oe_inline"/>
|
</div>
|
||||||
<label for="module_event_sale"/>
|
|
||||||
</div>
|
<label for="module_website_event_track"/>
|
||||||
<div name="module_website_event_track">
|
<div>
|
||||||
<field name="module_website_event_track"/>
|
<field name="module_website_event_track" widget="radio"/>
|
||||||
<label for="module_website_event_track"/>
|
</div>
|
||||||
</div>
|
|
||||||
<div name="div_website_event_questions">
|
<label for="module_website_event_questions"/>
|
||||||
<field name="module_website_event_questions"/>
|
<div>
|
||||||
<label for="module_website_event_questions"/>
|
<field name="module_website_event_questions" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
<div name="div_auto_confirmation">
|
|
||||||
<field name="auto_confirmation"/>
|
<label for="auto_confirmation"/>
|
||||||
<label for="auto_confirmation"/>
|
<div>
|
||||||
</div>
|
<field name="auto_confirmation" widget="radio"/>
|
||||||
<div name="div_email_scheduling">
|
</div>
|
||||||
<field name="group_email_scheduling"/>
|
|
||||||
<label for="group_email_scheduling"/>
|
<label for="group_email_scheduling"/>
|
||||||
</div>
|
<div>
|
||||||
|
<field name="group_email_scheduling" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ class calendar_config_settings(osv.TransientModel):
|
|||||||
_inherit = 'base.config.settings'
|
_inherit = 'base.config.settings'
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'google_cal_sync': fields.boolean("Show tutorial to know how to get my 'Client ID' and my 'Client Secret'"),
|
'google_cal_sync': fields.boolean("Show Tutorial"),
|
||||||
'cal_client_id': fields.char("Client_id"),
|
'cal_client_id': fields.char("Client_id"),
|
||||||
'cal_client_secret': fields.char("Client_key"),
|
'cal_client_secret': fields.char("Client_key"),
|
||||||
'server_uri': fields.char('URI for tuto')
|
'server_uri': fields.char('URI for tuto')
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<label for="google_cal_sync"/>
|
<label for="google_cal_sync"/>
|
||||||
<field name="google_cal_sync" class="oe_inline"/>
|
<field name="google_cal_sync"/>
|
||||||
<div>
|
<div>
|
||||||
<div attrs="{'invisible':[('google_cal_sync','=',False)]}">
|
<div attrs="{'invisible':[('google_cal_sync','=',False)]}">
|
||||||
<br/><h2>To setup the signin process with Google, first you have to perform the following steps</h2>
|
<br/><h2>To setup the signin process with Google, first you have to perform the following steps</h2>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ class HrEquipmentConfigSettings(models.TransientModel):
|
|||||||
_name = 'hr.equipment.config.settings'
|
_name = 'hr.equipment.config.settings'
|
||||||
_inherit = 'res.config.settings'
|
_inherit = 'res.config.settings'
|
||||||
|
|
||||||
alias_manage = fields.Boolean('Alias Manage')
|
|
||||||
equipment_alias_prefix = fields.Char('Use the following alias to report internal equipment issue')
|
equipment_alias_prefix = fields.Char('Use the following alias to report internal equipment issue')
|
||||||
alias_domain = fields.Char("Alias Domain")
|
alias_domain = fields.Char("Alias Domain")
|
||||||
|
|
||||||
@@ -41,7 +40,3 @@ class HrEquipmentConfigSettings(models.TransientModel):
|
|||||||
pass
|
pass
|
||||||
return {'alias_domain': alias_domain}
|
return {'alias_domain': alias_domain}
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def set_default_alias_manage(self):
|
|
||||||
config_value = self.alias_manage
|
|
||||||
self.env['ir.values'].set_default('hr.config.settings', 'alias_manage', config_value)
|
|
||||||
|
|||||||
@@ -14,10 +14,10 @@
|
|||||||
<group name="hr_equipment_grp">
|
<group name="hr_equipment_grp">
|
||||||
<label for="id" string="Requests Alias"/>
|
<label for="id" string="Requests Alias"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="alias_manage" class="oe_inline"/>
|
|
||||||
<label for="equipment_alias_prefix" class="oe_inline"/>
|
<label for="equipment_alias_prefix" class="oe_inline"/>
|
||||||
<div attrs="{'invisible': [('alias_manage', '=', False)]}">
|
<div>
|
||||||
<field name="equipment_alias_prefix" class="oe_inline" attrs="{'required': [('alias_manage', '=', True)]}"/>@
|
<label for="id" id="the following alias to report internal equipment issue"/>
|
||||||
|
<field name="equipment_alias_prefix" class="oe_inline"/>@
|
||||||
<field name="alias_domain" class="oe_inline" readonly="1"/>
|
<field name="alias_domain" class="oe_inline" readonly="1"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from openerp import SUPERUSER_ID
|
||||||
|
from openerp.osv import fields, osv
|
||||||
|
|
||||||
|
|
||||||
|
class hr_applicant_settings(osv.TransientModel):
|
||||||
|
_name = 'hr.recruitment.config.settings'
|
||||||
|
_inherit = ['res.config.settings', 'fetchmail.config.settings']
|
||||||
|
|
||||||
|
_columns = {
|
||||||
|
'module_document': fields.selection([
|
||||||
|
(0, "Do not manage CVs and motivation letter"),
|
||||||
|
(1, 'Allow the automatic indexation of resumes')
|
||||||
|
], "Resumes",
|
||||||
|
help='Manage your CV\'s and motivation letter related to all applicants.\n'
|
||||||
|
'-This installs the module document_ftp. This will install the knowledge management module in order to allow you to search using specific keywords through the content of all documents (PDF, .DOCx...)'),
|
||||||
|
'alias_prefix': fields.char('Default Alias Name for Jobs'),
|
||||||
|
'alias_domain': fields.char('Alias Domain'),
|
||||||
|
}
|
||||||
|
|
||||||
|
_defaults = {
|
||||||
|
'alias_domain': lambda self, cr, uid, context: self.pool["ir.config_parameter"].get_param(cr, uid, "mail.catchall.domain", context=context),
|
||||||
|
}
|
||||||
|
|
||||||
|
def _find_default_job_alias_id(self, cr, uid, context=None):
|
||||||
|
alias_id = self.pool['ir.model.data'].xmlid_to_res_id(cr, uid, 'hr_recruitment.mail_alias_jobs')
|
||||||
|
if not alias_id:
|
||||||
|
alias_ids = self.pool['mail.alias'].search(
|
||||||
|
cr, uid, [
|
||||||
|
('alias_model_id.model', '=', 'hr.applicant'),
|
||||||
|
('alias_force_thread_id', '=', False),
|
||||||
|
('alias_parent_model_id.model', '=', 'hr.job'),
|
||||||
|
('alias_parent_thread_id', '=', False),
|
||||||
|
('alias_defaults', '=', '{}')
|
||||||
|
], context=context)
|
||||||
|
alias_id = alias_ids and alias_ids[0] or False
|
||||||
|
return alias_id
|
||||||
|
|
||||||
|
def get_default_alias_prefix(self, cr, uid, ids, context=None):
|
||||||
|
alias_name = False
|
||||||
|
alias_id = self._find_default_job_alias_id(cr, uid, context=context)
|
||||||
|
if alias_id:
|
||||||
|
alias_name = self.pool['mail.alias'].browse(cr, uid, alias_id, context=context).alias_name
|
||||||
|
return {'alias_prefix': alias_name}
|
||||||
|
|
||||||
|
def set_default_alias_prefix(self, cr, uid, ids, context=None):
|
||||||
|
mail_alias = self.pool.get('mail.alias')
|
||||||
|
for record in self.browse(cr, uid, ids, context=context):
|
||||||
|
alias_id = self._find_default_job_alias_id(cr, uid, context=context)
|
||||||
|
if not alias_id:
|
||||||
|
create_ctx = dict(context, alias_model_name='hr.applicant', alias_parent_model_name='hr.job')
|
||||||
|
alias_id = self.pool['mail.alias'].create(cr, uid, {'alias_name': record.alias_prefix}, context=create_ctx)
|
||||||
|
else:
|
||||||
|
mail_alias.write(cr, uid, alias_id, {'alias_name': record.alias_prefix}, context=context)
|
||||||
|
return True
|
||||||
@@ -20,18 +20,18 @@
|
|||||||
</header>
|
</header>
|
||||||
<separator string="Recruitment"/>
|
<separator string="Recruitment"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Settings"/>
|
<label for="module_document"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="module_document" class="oe_inline"/>
|
<field name="module_document" widget="radio"/>
|
||||||
<label for="module_document"/>
|
|
||||||
</div>
|
</div>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
<div attrs="{'invisible': [('alias_domain', '=', False)]}">
|
<div attrs="{'invisible': [('alias_domain', '=', False)]}">
|
||||||
<label string="Default job email address"/>
|
<label string="Default job email address"/>
|
||||||
<field name="alias_prefix" class="oe_inline" attrs="{'required': [('alias_domain', '!=', False)]}"/>
|
<field name="alias_prefix" class="oe_inline" attrs="{'required': [('alias_domain', '!=', False)]}"/>
|
||||||
@
|
@
|
||||||
<field name="alias_domain" class="oe_inline" readonly="1"/>
|
<field name="alias_domain" class="oe_inline" readonly="1"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -8,8 +8,10 @@ class MassMailingConfiguration(osv.TransientModel):
|
|||||||
_inherit = 'res.config.settings'
|
_inherit = 'res.config.settings'
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'group_mass_mailing_campaign': fields.boolean(
|
'group_mass_mailing_campaign': fields.selection([
|
||||||
'Manage Mass Mailing using Campaign',
|
(0, "Do not organize and schedule mail campaigns (easy)"),
|
||||||
|
(1, "Allow using marketing campaigns (advanced)")
|
||||||
|
], "Campaigns",
|
||||||
implied_group='mass_mailing.group_mass_mailing_campaign',
|
implied_group='mass_mailing.group_mass_mailing_campaign',
|
||||||
help="""Manage mass mailign using Campaigns"""),
|
help="""Manage mass mailign using Campaigns"""),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,10 +14,9 @@
|
|||||||
</header>
|
</header>
|
||||||
<separator string="Mass Mailing"/>
|
<separator string="Mass Mailing"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Settings"/>
|
<label for="group_mass_mailing_campaign"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="group_mass_mailing_campaign" class="oe_inline"/>
|
<field name="group_mass_mailing_campaign" widget="radio"/>
|
||||||
<label for="group_mass_mailing_campaign"/>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -9,7 +9,16 @@ class mrp_config_settings(osv.osv_memory):
|
|||||||
_inherit = 'res.config.settings'
|
_inherit = 'res.config.settings'
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'module_mrp_repair': fields.boolean("Manage repairs of products ",
|
'group_product_variant': fields.selection([
|
||||||
|
(0, "No variants on products"),
|
||||||
|
(1, 'Products can have several attributes, defining variants (Example: size, color,...)')
|
||||||
|
], "Product Variants",
|
||||||
|
help='Work with product variant allows you to define some variant of the same products, an ease the product management in the ecommerce for example',
|
||||||
|
implied_group='product.group_product_variant'),
|
||||||
|
'module_mrp_repair': fields.selection([
|
||||||
|
(0, "Do not manage product repairs"),
|
||||||
|
(1, "Manage product repairs")
|
||||||
|
], "Repairs",
|
||||||
help='Allows to manage all product repairs.\n'
|
help='Allows to manage all product repairs.\n'
|
||||||
'* Add/remove products in the reparation\n'
|
'* Add/remove products in the reparation\n'
|
||||||
'* Impact for stocks\n'
|
'* Impact for stocks\n'
|
||||||
@@ -18,23 +27,32 @@ class mrp_config_settings(osv.osv_memory):
|
|||||||
'* Repair quotation report\n'
|
'* Repair quotation report\n'
|
||||||
'* Notes for the technician and for the final customer.\n'
|
'* Notes for the technician and for the final customer.\n'
|
||||||
'-This installs the module mrp_repair.'),
|
'-This installs the module mrp_repair.'),
|
||||||
'module_mrp_operations': fields.boolean("Allow detailed planning of work order",
|
'module_mrp_operations': fields.selection([
|
||||||
|
(0, "Do not use a planning for the work orders "),
|
||||||
|
(1, "Allow detailed planning of work orders")
|
||||||
|
], "Work Order Planning",
|
||||||
help='This allows to add state, date_start,date_stop in production order operation lines (in the "Work Centers" tab).\n'
|
help='This allows to add state, date_start,date_stop in production order operation lines (in the "Work Centers" tab).\n'
|
||||||
'-This installs the module mrp_operations.'),
|
'-This installs the module mrp_operations.'),
|
||||||
'module_mrp_byproduct': fields.boolean("Produce several products from one manufacturing order",
|
'module_mrp_byproduct': fields.selection([
|
||||||
|
(0, "No by-products in bills of materials (A + B --> C)"),
|
||||||
|
(1, "Bills of materials may produce residual products (A + B --> C + D)")
|
||||||
|
], "By-Products",
|
||||||
help='You can configure by-products in the bill of material.\n'
|
help='You can configure by-products in the bill of material.\n'
|
||||||
'Without this module: A + B + C -> D.\n'
|
'Without this module: A + B + C -> D.\n'
|
||||||
'With this module: A + B + C -> D + E.\n'
|
'With this module: A + B + C -> D + E.\n'
|
||||||
'-This installs the module mrp_byproduct.'),
|
'-This installs the module mrp_byproduct.'),
|
||||||
'group_mrp_routings': fields.boolean("Manage Work Order Operations and work orders ",
|
'group_mrp_routings': fields.selection([
|
||||||
|
(0, "Manage production by manufacturing orders"),
|
||||||
|
(1, "Manage production by work orders")
|
||||||
|
], "Routings",
|
||||||
implied_group='mrp.group_mrp_routings',
|
implied_group='mrp.group_mrp_routings',
|
||||||
help='Work Order Operations allow you to create and manage the manufacturing operations that should be followed '
|
help='Work Order Operations allow you to create and manage the manufacturing operations that should be followed '
|
||||||
'within your work centers in order to produce a product. They are attached to bills of materials '
|
'within your work centers in order to produce a product. They are attached to bills of materials '
|
||||||
'that will define the required raw materials.'),
|
'that will define the required raw materials.'),
|
||||||
'group_mrp_properties': fields.boolean("Allow several bill of materials per products using properties",
|
'group_rounding_efficiency': fields.selection([
|
||||||
implied_group='product.group_mrp_properties',
|
(0, "No rounding and efficiency on bills of materials"),
|
||||||
help="""The selection of the right Bill of Material to use will depend on the properties specified on the sales order and the Bill of Material."""),
|
(1, "Manage rounding and efficiency of bills of materials components")
|
||||||
'group_rounding_efficiency': fields.boolean("Manage rounding and efficiency of BoM components",
|
], "Rounding efficiency",
|
||||||
implied_group='mrp.group_rounding_efficiency',
|
implied_group='mrp.group_rounding_efficiency',
|
||||||
help="""Allow to manage product rounding on quantity and product efficiency during production process"""),
|
help="""Allow to manage product rounding on quantity and product efficiency during production process"""),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,48 +25,36 @@
|
|||||||
</header>
|
</header>
|
||||||
<separator string="Manufacturing Order"/>
|
<separator string="Manufacturing Order"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Order"/>
|
<label for="group_product_variant"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="group_product_variant" widget="radio"/>
|
||||||
<field name="module_mrp_byproduct" class="oe_inline"/>
|
|
||||||
<label for="module_mrp_byproduct"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<field name="module_mrp_repair" class="oe_inline"/>
|
|
||||||
<label for="module_mrp_repair"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
|
||||||
<group >
|
<label for="module_mrp_byproduct"/>
|
||||||
<label for="id" string="Planning"/>
|
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="module_mrp_byproduct" widget="radio"/>
|
||||||
<field name="group_mrp_routings" class="oe_inline"/>
|
</div>
|
||||||
<label for="group_mrp_routings"/>
|
|
||||||
</div>
|
<label for="module_mrp_repair"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="module_mrp_operations" class="oe_inline"/>
|
<field name="module_mrp_repair" widget="radio"/>
|
||||||
<label for="module_mrp_operations" />
|
</div>
|
||||||
</div>
|
|
||||||
|
<label for="group_mrp_routings"/>
|
||||||
|
<div>
|
||||||
|
<field name="group_mrp_routings" widget="radio"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label for="module_mrp_operations"/>
|
||||||
|
<div>
|
||||||
|
<field name="module_mrp_operations" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<separator string="Master Data"/>
|
<separator string="Master Data"/>
|
||||||
<group >
|
<group >
|
||||||
<label for="id" string="Products"/>
|
<label for="group_rounding_efficiency"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="group_rounding_efficiency" widget="radio"/>
|
||||||
<field name="group_mrp_properties" class="oe_inline"/>
|
|
||||||
<label for="group_mrp_properties" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<label for="id" string="Bill of Materials"/>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<field name="group_rounding_efficiency" class="oe_inline"/>
|
|
||||||
<label for="group_rounding_efficiency" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -157,13 +157,6 @@ class note_note(osv.osv):
|
|||||||
offset=offset, limit=limit, context=context, orderby=orderby,lazy=lazy)
|
offset=offset, limit=limit, context=context, orderby=orderby,lazy=lazy)
|
||||||
|
|
||||||
|
|
||||||
#upgrade config setting page to configure pad
|
|
||||||
class note_base_config_settings(osv.osv_memory):
|
|
||||||
_inherit = 'base.config.settings'
|
|
||||||
_columns = {
|
|
||||||
'module_note_pad': fields.boolean('Use collaborative pads (etherpad)'),
|
|
||||||
}
|
|
||||||
|
|
||||||
class res_users(osv.Model):
|
class res_users(osv.Model):
|
||||||
_name = 'res.users'
|
_name = 'res.users'
|
||||||
_inherit = ['res.users']
|
_inherit = ['res.users']
|
||||||
|
|||||||
@@ -139,27 +139,6 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!-- general settings -->
|
|
||||||
<record model="ir.ui.view" id="view_general_settings_note_form">
|
|
||||||
<field name="name">note.view.general_settings.form</field>
|
|
||||||
<field name="model">base.config.settings</field>
|
|
||||||
<field name="inherit_id" ref="base_setup.view_general_configuration"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<xpath expr="//group[@name='authentication']" position="after">
|
|
||||||
<group>
|
|
||||||
<label for="id" string="Notes"/>
|
|
||||||
<div name="note">
|
|
||||||
<div>
|
|
||||||
<field name="module_note_pad" class="oe_inline"/>
|
|
||||||
<label for="module_note_pad"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- Action -->
|
<!-- Action -->
|
||||||
<record model="ir.actions.act_window" id="action_note_note">
|
<record model="ir.actions.act_window" id="action_note_note">
|
||||||
<field name="name">Notes</field>
|
<field name="name">Notes</field>
|
||||||
|
|||||||
@@ -25,5 +25,5 @@ Use for update your text memo in real time with the following user that you invi
|
|||||||
],
|
],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'application': False,
|
'application': False,
|
||||||
'auto_install': False,
|
'auto_install': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,19 @@ class pos_configuration(osv.TransientModel):
|
|||||||
_name = 'pos.config.settings'
|
_name = 'pos.config.settings'
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'module_pos_restaurant': fields.boolean("Use restaurant extensions",
|
'module_pos_restaurant': fields.selection([
|
||||||
|
(0, "Point of sale for shops"),
|
||||||
|
(1, "Restaurant: activate table management")
|
||||||
|
], "Restaurant",
|
||||||
help='This module adds several restaurant features to the Point of Sale: \n\n- Bill Printing: Allows you to print a receipt before the order is paid \n\n- Bill Splitting: Allows you to split an order into different orders \n\n- Kitchen Order Printing: allows you to print orders updates to kitchen or bar printers'),
|
help='This module adds several restaurant features to the Point of Sale: \n\n- Bill Printing: Allows you to print a receipt before the order is paid \n\n- Bill Splitting: Allows you to split an order into different orders \n\n- Kitchen Order Printing: allows you to print orders updates to kitchen or bar printers'),
|
||||||
'module_pos_loyalty': fields.boolean("Use loyalty programs",
|
'module_pos_loyalty': fields.selection([
|
||||||
|
(0, "No loyalty programns"),
|
||||||
|
(1, "Use loyalty programs")
|
||||||
|
], "Loyalty",
|
||||||
help='Allows you to define a loyalty program in the point of sale, where the customers earn loyalty points and get rewards'),
|
help='Allows you to define a loyalty program in the point of sale, where the customers earn loyalty points and get rewards'),
|
||||||
'module_pos_discount': fields.boolean("Allow global discounts on point of sale orders",
|
'module_pos_discount': fields.selection([
|
||||||
|
(0, "Allow discounts on order lines only"),
|
||||||
|
(1, "Allow global discounts")
|
||||||
|
], "Discount",
|
||||||
help='Allows the cashier to quickly give a percentage sale discount for all the sales order to a customer'),
|
help='Allows the cashier to quickly give a percentage sale discount for all the sales order to a customer'),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,20 +13,19 @@
|
|||||||
</header>
|
</header>
|
||||||
<separator string="Point of Sale"/>
|
<separator string="Point of Sale"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Extensions"/>
|
<label for="module_pos_restaurant"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="module_pos_restaurant" widget="radio"/>
|
||||||
<field name="module_pos_restaurant" class="oe_inline"/>
|
</div>
|
||||||
<label for="module_pos_restaurant"/>
|
|
||||||
</div>
|
<label for="module_pos_loyalty"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="module_pos_loyalty" class="oe_inline"/>
|
<field name="module_pos_loyalty" widget="radio"/>
|
||||||
<label for="module_pos_loyalty"/>
|
</div>
|
||||||
</div>
|
|
||||||
<div>
|
<label for="module_pos_discount"/>
|
||||||
<field name="module_pos_discount" class="oe_inline"/>
|
<div>
|
||||||
<label for="module_pos_discount"/>
|
<field name="module_pos_discount" widget="radio"/>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -27,5 +27,5 @@ In that case, you can not use priorities any more on the different picking.
|
|||||||
'demo': [],
|
'demo': [],
|
||||||
'test': ['test/procurement_jit.yml'],
|
'test': ['test/procurement_jit.yml'],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'auto_install': False,
|
'auto_install': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,15 +15,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//label[@name='email_label']" position="before">
|
|
||||||
<label for="id" string="Products"/>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<field name="group_product_variant" class="oe_inline"/>
|
|
||||||
<label for="group_product_variant"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</xpath>
|
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -9,52 +9,55 @@ class project_configuration(osv.osv_memory):
|
|||||||
_inherit = 'res.config.settings'
|
_inherit = 'res.config.settings'
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'module_sale_service': fields.boolean('Generate tasks from sale orders',
|
'module_sale_service': fields.selection([
|
||||||
|
(0, "No automatic task creation"),
|
||||||
|
(1, 'Generate tasks from sale orders')
|
||||||
|
], "Sale Service",
|
||||||
help='This feature automatically creates project tasks from service products in sale orders. '
|
help='This feature automatically creates project tasks from service products in sale orders. '
|
||||||
'In order to make it work, the product has to be a service and \'Create Task Automatically\' '
|
'In order to make it work, the product has to be a service and \'Create Task Automatically\' '
|
||||||
'has to be flagged on the procurement tab in the product form.\n'
|
'has to be flagged on the procurement tab in the product form.\n'
|
||||||
'-This installs the module sale_service.'),
|
'-This installs the module sale_service.'),
|
||||||
'module_pad': fields.boolean("Use integrated collaborative note pads on task",
|
'module_pad': fields.selection([
|
||||||
|
(0, "Task description is a plain text"),
|
||||||
|
(1, "Collaborative rich text on task description")
|
||||||
|
], "Pads",
|
||||||
help='Lets the company customize which Pad installation should be used to link to new pads '
|
help='Lets the company customize which Pad installation should be used to link to new pads '
|
||||||
'(for example: http://ietherpad.com/).\n'
|
'(for example: http://ietherpad.com/).\n'
|
||||||
'-This installs the module pad.'),
|
'-This installs the module pad.'),
|
||||||
'module_project_timesheet': fields.boolean("Record timesheet lines per tasks",
|
'module_project_timesheet': fields.selection([
|
||||||
|
(0, "Do not record timesheets on tasks"),
|
||||||
|
(1, "Record timesheet lines per tasks")
|
||||||
|
], "Timesheets on Project",
|
||||||
help='This allows you to transfer the entries under tasks defined for Project Management to '
|
help='This allows you to transfer the entries under tasks defined for Project Management to '
|
||||||
'the timesheet line entries for particular date and user, with the effect of creating, '
|
'the timesheet line entries for particular date and user, with the effect of creating, '
|
||||||
'editing and deleting either ways.\n'
|
'editing and deleting either ways.\n'
|
||||||
'-This installs the module project_timesheet.'),
|
'-This installs the module project_timesheet.'),
|
||||||
'module_project_issue': fields.boolean("Track issues and bugs",
|
'module_rating_project': fields.selection([
|
||||||
help='Provides management of issues/bugs in projects.\n'
|
(0, "No customer rating"),
|
||||||
'-This installs the module project_issue.'),
|
(1, 'Allow activating customer rating on projects, at issue completion')
|
||||||
'module_rating_project': fields.boolean('Allow customers to rate provided services',
|
], "Rating",
|
||||||
help="This allows customers to give rating on provided services"),
|
help="This allows customers to give rating on provided services"),
|
||||||
'time_unit': fields.many2one('product.uom', 'Working time unit', required=True,
|
'module_project_issue_sheet': fields.selection([
|
||||||
help='This will set the unit of measure used in projects and tasks.\n'
|
(0, "Do not track working hours on issues"),
|
||||||
'Changing the unit will only impact new entries.'),
|
(1, "Activate timesheets on issues")
|
||||||
'module_project_issue_sheet': fields.boolean("Invoice working time on issues",
|
], "Timesheets Invoicing",
|
||||||
help='Provides timesheet support for the issues/bugs management in project.\n'
|
help='Provides timesheet support for the issues/bugs management in project.\n'
|
||||||
'-This installs the module project_issue_sheet.'),
|
'-This installs the module project_issue_sheet.'),
|
||||||
'group_tasks_work_on_tasks': fields.boolean("Log work activities on tasks",
|
'group_time_work_estimation_tasks': fields.selection([
|
||||||
implied_group='project.group_tasks_work_on_tasks',
|
(0, "Do not estimate working time on tasks"),
|
||||||
help="Allows you to compute work on tasks."),
|
(1, "Manage time estimation on tasks")
|
||||||
'group_time_work_estimation_tasks': fields.boolean("Manage time estimation on tasks",
|
], "Time Work Estimation",
|
||||||
implied_group='project.group_time_work_estimation_tasks',
|
implied_group='project.group_time_work_estimation_tasks',
|
||||||
help="Allows you to compute Time Estimation on tasks."),
|
help="Allows you to compute Time Estimation on tasks."),
|
||||||
'generate_project_alias': fields.boolean("Automatically generate an email alias at the project creation",
|
'generate_project_alias': fields.selection([
|
||||||
|
(0, "Do not create an email alias automatically"),
|
||||||
|
(1, "Automatically generate an email alias at the project creation")
|
||||||
|
], "Project Alias",
|
||||||
help="Odoo will generate an email alias at the project creation from project name."),
|
help="Odoo will generate an email alias at the project creation from project name."),
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_default_time_unit(self, cr, uid, fields, context=None):
|
def onchange_time_estimation_project_timesheet(self, cr, uid, ids, group_time_work_estimation_tasks):
|
||||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
if group_time_work_estimation_tasks:
|
||||||
return {'time_unit': user.company_id.project_time_mode_id.id}
|
|
||||||
|
|
||||||
def set_time_unit(self, cr, uid, ids, context=None):
|
|
||||||
config = self.browse(cr, uid, ids[0], context)
|
|
||||||
user = self.pool.get('res.users').browse(cr, uid, uid, context)
|
|
||||||
user.company_id.write({'project_time_mode_id': config.time_unit.id})
|
|
||||||
|
|
||||||
def onchange_time_estimation_project_timesheet(self, cr, uid, ids, group_time_work_estimation_tasks, module_project_timesheet):
|
|
||||||
if group_time_work_estimation_tasks or module_project_timesheet:
|
|
||||||
return {'value': {'group_tasks_work_on_tasks': True}}
|
return {'value': {'group_tasks_work_on_tasks': True}}
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|||||||
@@ -25,65 +25,32 @@
|
|||||||
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
||||||
</header>
|
</header>
|
||||||
<separator string="Project Management"/>
|
<separator string="Project Management"/>
|
||||||
<group>
|
<group name="project_management">
|
||||||
<label for="id" string="Task"/>
|
<label for="module_sale_service"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="module_sale_service" widget="radio"/>
|
||||||
<field name="module_project_timesheet" on_change="onchange_time_estimation_project_timesheet(group_time_work_estimation_tasks, module_project_timesheet)" class="oe_inline"/>
|
|
||||||
<label for="module_project_timesheet"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<field name="module_sale_service" class="oe_inline"/>
|
|
||||||
<label for="module_sale_service"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<field name="module_pad" class="oe_inline"/>
|
|
||||||
<label for="module_pad"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
|
||||||
<group>
|
<label for="module_pad"/>
|
||||||
<label for="id" string="Planning"/>
|
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="module_pad" widget="radio"/>
|
||||||
<field name="group_time_work_estimation_tasks" on_change="onchange_time_estimation_project_timesheet(group_time_work_estimation_tasks, module_project_timesheet)" class="oe_inline"/>
|
|
||||||
<label for="group_time_work_estimation_tasks"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label for="time_unit"/>
|
|
||||||
<field name="time_unit" class="oe_inline" domain="[('category_id.name','=','Working Time')]"/>
|
|
||||||
</div>
|
|
||||||
<div attrs="{'invisible': [('module_project_timesheet','=',False)]}">
|
|
||||||
<field name="group_tasks_work_on_tasks" class="oe_inline"/>
|
|
||||||
<label for="group_tasks_work_on_tasks" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
|
||||||
<group>
|
<label for="group_time_work_estimation_tasks"/>
|
||||||
<label for="id" string="Communication"/>
|
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="group_time_work_estimation_tasks" on_change="onchange_time_estimation_project_timesheet(group_time_work_estimation_tasks)" widget="radio"/>
|
||||||
<field name="generate_project_alias" class="oe_inline"/>
|
|
||||||
<label for="generate_project_alias" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<separator string="Helpdesk & Support"/>
|
<separator string="Helpdesk & Support"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Support"/>
|
<label for="module_rating_project"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="module_rating_project" widget="radio"/>
|
||||||
<field name="module_project_issue" class="oe_inline"/>
|
</div>
|
||||||
<label for="module_project_issue"/>
|
|
||||||
</div>
|
<label for="module_project_issue_sheet"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="module_rating_project" class="oe_inline"/>
|
<field name="module_project_issue_sheet" widget="radio"/>
|
||||||
<label for="module_rating_project"/>
|
|
||||||
</div>
|
|
||||||
<div name="module_project_issue_sheet">
|
|
||||||
<field name="module_project_issue_sheet" class="oe_inline"/>
|
|
||||||
<label for="module_project_issue_sheet"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -3,3 +3,4 @@
|
|||||||
|
|
||||||
import project_timesheet
|
import project_timesheet
|
||||||
import report
|
import report
|
||||||
|
import res_config
|
||||||
@@ -16,13 +16,14 @@ with the effect of creating, editing and deleting either ways.
|
|||||||
'author': 'OpenERP SA',
|
'author': 'OpenERP SA',
|
||||||
'website': 'https://www.odoo.com/page/project-management',
|
'website': 'https://www.odoo.com/page/project-management',
|
||||||
'images': ['images/invoice_task_work.jpeg', 'images/my_timesheet.jpeg', 'images/working_hour.jpeg'],
|
'images': ['images/invoice_task_work.jpeg', 'images/my_timesheet.jpeg', 'images/working_hour.jpeg'],
|
||||||
'depends': ['resource', 'project', 'sale_contract', 'procurement'],
|
'depends': ['resource', 'project', 'sale_contract'],
|
||||||
'data': [
|
'data': [
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'security/project_timesheet_security.xml',
|
'security/project_timesheet_security.xml',
|
||||||
'report/project_report_view.xml',
|
'report/project_report_view.xml',
|
||||||
'project_timesheet_view.xml',
|
'project_timesheet_view.xml',
|
||||||
'project_dashboard.xml',
|
'project_dashboard.xml',
|
||||||
|
'res_config_view.xml',
|
||||||
],
|
],
|
||||||
'demo': ['project_timesheet_demo.xml'],
|
'demo': ['project_timesheet_demo.xml'],
|
||||||
'test': [
|
'test': [
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
|
from openerp.osv import fields, osv
|
||||||
|
from openerp.tools.translate import _
|
||||||
|
|
||||||
|
class project_configuration(osv.osv_memory):
|
||||||
|
_name = 'project.config.settings'
|
||||||
|
_inherit = 'project.config.settings'
|
||||||
|
|
||||||
|
_columns = {
|
||||||
|
'group_tasks_work_on_tasks': fields.selection([
|
||||||
|
(0, "Do not log work activities on task"),
|
||||||
|
(1, "Log work activities on tasks")
|
||||||
|
], "Activity Log",
|
||||||
|
implied_group='project.group_tasks_work_on_tasks',
|
||||||
|
help="Allows you to compute work on tasks."),
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
<record id="view_config_settings" model="ir.ui.view">
|
||||||
|
<field name="name">project settings</field>
|
||||||
|
<field name="model">project.config.settings</field>
|
||||||
|
<field name="inherit_id" ref="project.view_config_settings"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//group[@name='project_management']" position="inside">
|
||||||
|
<label for="group_tasks_work_on_tasks"/>
|
||||||
|
<div>
|
||||||
|
<field name="group_tasks_work_on_tasks" widget="radio"/>
|
||||||
|
</div>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</openerp>
|
||||||
@@ -9,40 +9,54 @@ class purchase_config_settings(osv.osv_memory):
|
|||||||
_inherit = 'res.config.settings'
|
_inherit = 'res.config.settings'
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
|
'group_product_variant': fields.selection([
|
||||||
|
(0, "No variants on products"),
|
||||||
|
(1, 'Products can have several attributes, defining variants (Example: size, color,...)')
|
||||||
|
], "Product Variants",
|
||||||
|
help='Work with product variant allows you to define some variant of the same products, an ease the product management in the ecommerce for example',
|
||||||
|
implied_group='product.group_product_variant'),
|
||||||
'default_invoice_method': fields.selection(
|
'default_invoice_method': fields.selection(
|
||||||
[('manual', 'Control vendor bill on purchase order line'),
|
[('manual', 'Control vendor bill on purchase order line'),
|
||||||
('picking', 'Control vendor bill on incoming shipments'),
|
('picking', 'Control vendor bill on incoming shipments'),
|
||||||
('order', 'Control vendor bill on a pregenerated draft invoice'),
|
('order', 'Control vendor bill on a pregenerated draft invoice'),
|
||||||
], 'Default invoicing control method', required=True, default_model='purchase.order'),
|
], 'Default invoicing control method', required=True, default_model='purchase.order'),
|
||||||
'group_purchase_pricelist':fields.boolean("Manage pricelist per vendor",
|
'group_purchase_pricelist':fields.selection([
|
||||||
|
(0, 'Set a fixed cost price on each product'),
|
||||||
|
(1, 'Use pricelists to adapt your price per vendors or products')
|
||||||
|
], "Pricelists",
|
||||||
implied_group='product.group_purchase_pricelist',
|
implied_group='product.group_purchase_pricelist',
|
||||||
help='Allows to manage different prices based on rules per category of vendor.\n'
|
help='Allows to manage different prices based on rules per category of vendor.\n'
|
||||||
'Example: 10% for retailers, promotion of 5 EUR on this product, etc.'),
|
'Example: 10% for retailers, promotion of 5 EUR on this product, etc.'),
|
||||||
'group_uom':fields.boolean("Manage different units of measure for products",
|
'group_uom':fields.selection([
|
||||||
|
(0, 'Products have only one unit of measure (easier)'),
|
||||||
|
(1, 'Some products may be sold/puchased in different unit of measures (advanced)')
|
||||||
|
], "Unit of Measures",
|
||||||
implied_group='product.group_uom',
|
implied_group='product.group_uom',
|
||||||
help="""Allows you to select and maintain different units of measure for products."""),
|
help="""Allows you to select and maintain different units of measure for products."""),
|
||||||
'group_costing_method':fields.boolean("Use 'Real Price' and 'Average' costing methods.",
|
'group_costing_method':fields.selection([
|
||||||
|
(0, 'Set a fixed cost price on each product'),
|
||||||
|
(1, "Use a 'Fixed', 'Real' or 'Average' price costing method")
|
||||||
|
], "Costing Methods",
|
||||||
implied_group='stock_account.group_inventory_valuation',
|
implied_group='stock_account.group_inventory_valuation',
|
||||||
help="""Allows you to compute product cost price based on average cost."""),
|
help="""Allows you to compute product cost price based on average cost."""),
|
||||||
'module_warning': fields.boolean("Alerts by products or vendor",
|
'module_purchase_double_validation': fields.selection([
|
||||||
help='Allow to configure notification on products and trigger them when a user wants to purchase a given product or a given vendor.\n'
|
(0, 'Confirm purchase orders in one step'),
|
||||||
'Example: Product: this product is deprecated, do not purchase more than 5.\n'
|
(1, 'Get 2 levels of approvals to confirm a purchase order')
|
||||||
'Vendor: don\'t forget to ask for an express delivery.'),
|
], "Levels of Approvals",
|
||||||
'module_purchase_double_validation': fields.boolean("Force two levels of approvals",
|
|
||||||
help='Provide a double validation mechanism for purchases exceeding minimum amount.\n'
|
help='Provide a double validation mechanism for purchases exceeding minimum amount.\n'
|
||||||
'-This installs the module purchase_double_validation.'),
|
'-This installs the module purchase_double_validation.'),
|
||||||
'module_purchase_requisition': fields.boolean("Manage calls for tenders",
|
'module_purchase_requisition': fields.selection([
|
||||||
|
(0, 'Purchase propositions trigger draft purchase orders to a single supplier'),
|
||||||
|
(1, 'Allow using call for tenders to get quotes from multiple suppliers (advanced)')
|
||||||
|
], "Calls for Tenders",
|
||||||
help="""Calls for tenders are used when you want to generate requests for quotations to several vendors for a given set of products.
|
help="""Calls for tenders are used when you want to generate requests for quotations to several vendors for a given set of products.
|
||||||
You can configure per product if you directly do a Request for Quotation
|
You can configure per product if you directly do a Request for Quotation
|
||||||
to one vendor or if you want a Call for Tenders to compare offers from several vendors."""),
|
to one vendor or if you want a Call for Tenders to compare offers from several vendors."""),
|
||||||
'group_advance_purchase_requisition': fields.boolean("Choose from several bids in a call for tenders",
|
'module_stock_dropshipping': fields.selection([
|
||||||
implied_group='purchase.group_advance_bidding',
|
(0, 'Suppliers always deliver to your warehouse(s)'),
|
||||||
help="""In the process of a public tendering, you can compare the tender lines and choose for each requested product which quantity you will buy from each bid."""),
|
(1, "Allow suppliers to deliver directly to your customers")
|
||||||
'group_analytic_account_for_purchases': fields.boolean('Analytic accounting for purchases',
|
], "Dropshipping",
|
||||||
implied_group='purchase.group_analytic_accounting',
|
help='\nCreates the dropship Route and add more complex tests'
|
||||||
help="Allows you to specify an analytic account on purchase order lines."),
|
|
||||||
'module_stock_dropshipping': fields.boolean("Manage dropshipping",
|
|
||||||
help='\nCreates the dropship route and add more complex tests'
|
|
||||||
'-This installs the module stock_dropshipping.'),
|
'-This installs the module stock_dropshipping.'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,55 +32,41 @@
|
|||||||
</group>
|
</group>
|
||||||
<separator string="Purchase Order"/>
|
<separator string="Purchase Order"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Vendor Features"/>
|
<label for="group_product_variant"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="group_product_variant" widget="radio"/>
|
||||||
<field name="group_purchase_pricelist" class="oe_inline"/>
|
|
||||||
<label for="group_purchase_pricelist"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<field name="module_warning" class="oe_inline"/>
|
|
||||||
<label for="module_warning"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
|
||||||
<group>
|
<label for="group_purchase_pricelist"/>
|
||||||
<label for="id" string="Purchase Order"/>
|
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="group_purchase_pricelist" widget="radio"/>
|
||||||
<field name="group_uom" class="oe_inline"/>
|
</div>
|
||||||
<label for="group_uom"/>
|
|
||||||
</div>
|
<label for="group_uom"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="group_costing_method" class="oe_inline"/>
|
<field name="group_uom" widget="radio"/>
|
||||||
<label for="group_costing_method"/>
|
</div>
|
||||||
</div>
|
|
||||||
<div name="module_purchase_double_validation">
|
<label for="group_costing_method"/>
|
||||||
<field name="module_purchase_double_validation" class="oe_inline"/>
|
<div>
|
||||||
<label for="module_purchase_double_validation"/>
|
<field name="group_costing_method" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<field name="module_purchase_requisition" class="oe_inline"/>
|
<label for="module_purchase_double_validation"/>
|
||||||
<label for="module_purchase_requisition"/>
|
<div name="module_purchase_double_validation">
|
||||||
</div>
|
<field name="module_purchase_double_validation" widget="radio"/>
|
||||||
<div attrs="{'invisible': [('module_purchase_requisition', '=', False)]}">
|
</div>
|
||||||
<field name="group_advance_purchase_requisition" class="oe_inline"/>
|
|
||||||
<label for="group_advance_purchase_requisition"/>
|
<label for="module_purchase_requisition"/>
|
||||||
</div>
|
<div>
|
||||||
<div>
|
<field name="module_purchase_requisition" widget="radio"/>
|
||||||
<field name="group_analytic_account_for_purchases" class="oe_inline"/>
|
|
||||||
<label for="group_analytic_account_for_purchases"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<separator string="Location & Warehouse"/>
|
<separator string="Location & Warehouse"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Routes"/>
|
<label for="module_stock_dropshipping"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="module_stock_dropshipping" widget="radio"/>
|
||||||
<field name="module_stock_dropshipping" class="oe_inline"/>
|
|
||||||
<label for="module_stock_dropshipping"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<div name="module_purchase_double_validation" position="inside">
|
<div name="module_purchase_double_validation" position="inside">
|
||||||
<span class="oe_separate-from-text">
|
<span class="oe_separate-from-text">
|
||||||
<label for="limit_amount"/>
|
<label for="limit_amount"/>
|
||||||
<field name="limit_amount" attrs="{'required': [('module_purchase_double_validation','=',True)]}" class="oe_inline"/>
|
<field name="limit_amount" attrs="{'required': [('module_purchase_double_validation','=',1)]}" class="oe_inline"/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
+45
-55
@@ -13,77 +13,67 @@ class sale_configuration(osv.TransientModel):
|
|||||||
_inherit = 'sale.config.settings'
|
_inherit = 'sale.config.settings'
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'timesheet': fields.boolean('Prepare invoices based on timesheets',
|
'group_product_variant': fields.selection([
|
||||||
help='For modifying account analytic view to show important data to project manager of services companies.'
|
(0, "No variants on products"),
|
||||||
'You can also view the report of account analytic summary user-wise as well as month wise.\n'
|
(1, 'Products can have several attributes, defining variants (Example: size, color,...)')
|
||||||
'-This installs the module sale_contract.'),
|
], "Product Variants",
|
||||||
'module_sale_contract': fields.boolean('Use contracts management',
|
help='Work with product variant allows you to define some variant of the same products, an ease the product management in the ecommerce for example',
|
||||||
|
implied_group='product.group_product_variant'),
|
||||||
|
'module_sale_contract': fields.selection([
|
||||||
|
(0, 'Sell based on sales order only'),
|
||||||
|
(1, 'Activate contract management to track costs and revenues')
|
||||||
|
], "Contracts",
|
||||||
help='Allows to define your customer contracts conditions: invoicing '
|
help='Allows to define your customer contracts conditions: invoicing '
|
||||||
'method (fixed price, on timesheet, advance invoice), the exact pricing '
|
'method (fixed price, on timesheet, advance invoice), the exact pricing '
|
||||||
'(650€/day for a developer), the duration (one year support contract).\n'
|
'(650€/day for a developer), the duration (one year support contract).\n'
|
||||||
'You will be able to follow the progress of the contract and invoice automatically.\n'
|
'You will be able to follow the progress of the contract and invoice automatically.\n'
|
||||||
'-It installs the sale_contract module.'),
|
'-It installs the sale_contract module.'),
|
||||||
'group_sale_pricelist':fields.boolean("Use pricelists to adapt your price per customers",
|
'group_sale_pricelist':fields.selection([
|
||||||
|
(0, 'Set a fixed sale price on each product'),
|
||||||
|
(1, 'Use pricelists to adapt your price per customers or products')
|
||||||
|
], "Pricelists",
|
||||||
implied_group='product.group_sale_pricelist',
|
implied_group='product.group_sale_pricelist',
|
||||||
help="""Allows to manage different prices based on rules per category of customers.
|
help="""Allows to manage different prices based on rules per category of customers.
|
||||||
Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
|
Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
|
||||||
'group_uom':fields.boolean("Allow using different units of measure",
|
'group_uom':fields.selection([
|
||||||
|
(0, 'Products have only one unit of measure (easier)'),
|
||||||
|
(1, 'Some products may be sold/purchased in different unit of measures (advanced)')
|
||||||
|
], "Unit of Measures",
|
||||||
implied_group='product.group_uom',
|
implied_group='product.group_uom',
|
||||||
help="""Allows you to select and maintain different units of measure for products."""),
|
help="""Allows you to select and maintain different units of measure for products."""),
|
||||||
'group_discount_per_so_line': fields.boolean("Allow setting a discount on the sales order lines",
|
'group_discount_per_so_line': fields.selection([
|
||||||
implied_group='sale.group_discount_per_so_line',
|
(0, 'No discount on sales order lines, global discount only'),
|
||||||
help="Allows you to apply some discount per sales order line."),
|
(1, 'Allow discounts on sales order lines')
|
||||||
'group_display_incoterm':fields.boolean("Display incoterms on the printed sale orders and invoices reports",
|
], "Discount",
|
||||||
|
implied_group='sale.group_discount_per_so_line'),
|
||||||
|
'group_display_incoterm':fields.selection([
|
||||||
|
(0, 'No incoterm on reports'),
|
||||||
|
(1, 'Show incoterms on sale orders and invoices')
|
||||||
|
], "Incoterms",
|
||||||
implied_group='sale.group_display_incoterm',
|
implied_group='sale.group_display_incoterm',
|
||||||
help="The printed reports will display the incoterms for the sale orders and the related invoices"),
|
help="The printed reports will display the incoterms for the sale orders and the related invoices"),
|
||||||
'module_warning': fields.boolean("Allow configuring alerts by customer or products",
|
'module_sale_margin': fields.selection([
|
||||||
help='Allow to configure notification on products and trigger them when a user wants to sell a given product or a given customer.\n'
|
(0, 'Salespeople do not need to view margins when quoting'),
|
||||||
'Example: Product: this product is deprecated, do not purchase more than 5.\n'
|
(1, 'Display margins on quotations and sales orders')
|
||||||
'Vendor: don\'t forget to ask for an express delivery.'),
|
], "Margins"),
|
||||||
'module_sale_margin': fields.boolean("Display margins on sales orders",
|
'module_website_sale_digital': fields.selection([
|
||||||
help='This adds the \'Margin\' on sales order.\n'
|
(0, 'No digital products'),
|
||||||
'This gives the profitability by calculating the difference between the Unit Price and Cost Price.\n'
|
(1, 'Allows to sell downloadable content from the portal')
|
||||||
'-This installs the module sale_margin.'),
|
], "Digital Products"),
|
||||||
'module_sale_layout': fields.boolean("Allow to categorize sale order lines",
|
'module_website_quote': fields.selection([
|
||||||
help='Allows to create categories to structure lines in pdf reports.\n'
|
(0, 'Print quotes or send by email'),
|
||||||
'-This installs the module sale_layout.'),
|
(1, 'Send online quotations based on templates (advanced)')
|
||||||
'module_website_quote': fields.boolean("Allow online quotations and templates",
|
], "Online Quotations"),
|
||||||
help='This adds the online quotation'),
|
'group_sale_delivery_address': fields.selection([
|
||||||
'module_sale_journal': fields.boolean("Allow batch invoicing of delivery orders through journals",
|
(0, "Invoicing and shipping addresses are always the same (Example: services companies)"),
|
||||||
help='Allows you to categorize your sales and deliveries (picking lists) between different journals, '
|
(1, 'Have 3 fields on sales orders: customer, invoice address, delivery address')
|
||||||
'and perform batch operations on journals.\n'
|
], "Customer Addresses",
|
||||||
'-This installs the module sale_journal.'),
|
implied_group='sale.group_delivery_invoice_address'),
|
||||||
'module_analytic_user_function': fields.boolean("One employee can have different roles per contract",
|
|
||||||
help='Allows you to define what is the default function of a specific user on a given account.\n'
|
|
||||||
'This is mostly used when a user encodes his timesheet. The values are retrieved and the fields are auto-filled. '
|
|
||||||
'But the possibility to change these values is still available.\n'
|
|
||||||
'-This installs the module analytic_user_function.'),
|
|
||||||
'module_project': fields.boolean("Project"),
|
|
||||||
'module_sale_stock': fields.boolean("Trigger delivery orders automatically from sales orders",
|
|
||||||
help='Allows you to Make Quotation, Sale Order using different Order policy and Manage Related Stock.\n'
|
|
||||||
'-This installs the module sale_stock.'),
|
|
||||||
'group_sale_delivery_address': fields.boolean("Allow a different address for delivery and invoicing ",
|
|
||||||
implied_group='sale.group_delivery_invoice_address',
|
|
||||||
help="Allows you to specify different delivery and invoice addresses on a sales order."),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def set_sale_defaults(self, cr, uid, ids, context=None):
|
def set_sale_defaults(self, cr, uid, ids, context=None):
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
def onchange_task_work(self, cr, uid, ids, task_work, context=None):
|
|
||||||
if not task_work:
|
|
||||||
return {'value': {}}
|
|
||||||
return {'value': {
|
|
||||||
'module_project_timesheet': task_work,
|
|
||||||
'module_sale_service': task_work,
|
|
||||||
}}
|
|
||||||
|
|
||||||
def onchange_timesheet(self, cr, uid, ids, timesheet, context=None):
|
|
||||||
return {'value': {
|
|
||||||
'timesheet': timesheet,
|
|
||||||
'module_sale_contract': timesheet,
|
|
||||||
}}
|
|
||||||
|
|
||||||
class account_config_settings(osv.osv_memory):
|
class account_config_settings(osv.osv_memory):
|
||||||
_inherit = 'account.config.settings'
|
_inherit = 'account.config.settings'
|
||||||
_columns = {
|
_columns = {
|
||||||
|
|||||||
@@ -6,102 +6,58 @@
|
|||||||
<field name="model">sale.config.settings</field>
|
<field name="model">sale.config.settings</field>
|
||||||
<field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
|
<field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<div name="customer feature" position="before">
|
<div id="main" position="inside">
|
||||||
<separator string="Invoicing Process"/>
|
<group string="Products">
|
||||||
<group>
|
<label for="group_product_variant"/>
|
||||||
<label for="id" string="Invoicing Process"/>
|
|
||||||
<div>
|
<div>
|
||||||
<div name="timesheet">
|
<field name="group_product_variant" widget="radio"/>
|
||||||
<field name="timesheet" class="oe_inline" on_change="onchange_timesheet(timesheet)"/>
|
</div>
|
||||||
<label for="timesheet"/>
|
|
||||||
</div>
|
<label for="module_website_sale_digital"/>
|
||||||
|
<div>
|
||||||
|
<field name="module_website_sale_digital" widget="radio"/>
|
||||||
|
</div>
|
||||||
|
<label for="group_uom" string="Unit of Measures"/>
|
||||||
|
<div>
|
||||||
|
<field name="group_uom" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<group name='default_options' invisible="1">
|
<group string="Quotations & Sales" id="sale">
|
||||||
<label for="id" string="Default Options"/>
|
|
||||||
<div name="div_default_options"/>
|
|
||||||
</group>
|
|
||||||
</div>
|
|
||||||
<div name="Customer Features" position="inside">
|
|
||||||
<div>
|
|
||||||
<field name="group_sale_pricelist" class="oe_inline"/>
|
|
||||||
<label for="group_sale_pricelist"/>
|
<label for="group_sale_pricelist"/>
|
||||||
</div>
|
|
||||||
<div name="module_warning">
|
|
||||||
<field name="module_warning" class="oe_inline"/>
|
|
||||||
<label for="module_warning"/> <span class="oe_grey">Purchase and Warehouse Management will be installed</span>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<field name="group_sale_delivery_address" class="oe_inline"/>
|
|
||||||
<label for="group_sale_delivery_address"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<group name="Sale" position="before">
|
|
||||||
<group>
|
|
||||||
<label for="id" string="Warehouse Features"/>
|
|
||||||
<div name="warehouse_features">
|
|
||||||
<div name='module_sale_stock'>
|
|
||||||
<field name="module_sale_stock" class="oe_inline"/>
|
|
||||||
<label for="module_sale_stock"/>
|
|
||||||
</div>
|
|
||||||
<div name="display_incoterm" attrs="{'invisible': [('module_sale_stock', '!=', True)]}">
|
|
||||||
<field name="group_display_incoterm" class="oe_inline"/>
|
|
||||||
<label for="group_display_incoterm"/>
|
|
||||||
</div>
|
|
||||||
<div name='module_sale_journal'>
|
|
||||||
<field name="module_sale_journal" class="oe_inline"/>
|
|
||||||
<label for="module_sale_journal"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
</group>
|
|
||||||
<group name="Sale" position="before">
|
|
||||||
<group name="Product Features">
|
|
||||||
<label for="id" string="Product Features"/>
|
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="group_sale_pricelist" widget="radio"/>
|
||||||
<field name="group_uom" class="oe_inline"/>
|
|
||||||
<label for="group_uom"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<field name="group_discount_per_so_line" class="oe_inline"/>
|
|
||||||
<label for="group_discount_per_so_line"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
|
||||||
</group>
|
<label for="group_sale_delivery_address"/>
|
||||||
<div name="Sale Features" position="inside">
|
<div>
|
||||||
<div name="module_website_quote">
|
<field name="group_sale_delivery_address" widget="radio"/>
|
||||||
<field name="module_website_quote" class="oe_inline"/>
|
</div>
|
||||||
|
|
||||||
|
<label for="group_display_incoterm"/>
|
||||||
|
<div>
|
||||||
|
<field name="group_display_incoterm" widget="radio"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label for="group_discount_per_so_line"/>
|
||||||
|
<div>
|
||||||
|
<field name="group_discount_per_so_line" widget="radio"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<label for="module_website_quote"/>
|
<label for="module_website_quote"/>
|
||||||
</div>
|
|
||||||
<div name="module_sale_margin">
|
|
||||||
<field name="module_sale_margin" class="oe_inline"/>
|
|
||||||
<label for="module_sale_margin"/>
|
|
||||||
</div>
|
|
||||||
<div name="module_sale_layout">
|
|
||||||
<field name="module_sale_layout" class="oe_inline"/>
|
|
||||||
<label for="module_sale_layout"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div name="customer feature" position="after">
|
|
||||||
<separator string="Contracts Management"/>
|
|
||||||
<p>
|
|
||||||
Use contract to be able to manage your services with
|
|
||||||
multiple invoicing as part of the same contract with
|
|
||||||
your customer.
|
|
||||||
</p>
|
|
||||||
<group>
|
|
||||||
<label for="id" string="Contract Features"/>
|
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="module_website_quote" widget="radio"/>
|
||||||
<field name="module_sale_contract" on_change="onchange_timesheet(module_sale_contract)" class="oe_inline"/>
|
</div>
|
||||||
<label for="module_sale_contract"/>
|
|
||||||
</div>
|
<label for="module_sale_margin"/>
|
||||||
<div name="module_analytic_user_function" attrs="{'invisible':[('module_sale_contract','=',False)]}">
|
<div>
|
||||||
<field name="module_analytic_user_function" class="oe_inline"/>
|
<field name="module_sale_margin" widget="radio"/>
|
||||||
<label for="module_analytic_user_function"/>
|
</div>
|
||||||
</div>
|
|
||||||
|
</group>
|
||||||
|
<group string="Contracts" id="contract">
|
||||||
|
<label for="module_sale_contract"/>
|
||||||
|
<div>
|
||||||
|
<field name="module_sale_contract" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,27 +9,9 @@ class sale_configuration(osv.osv_memory):
|
|||||||
_inherit = 'sale.config.settings'
|
_inherit = 'sale.config.settings'
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'group_template_required': fields.boolean("Mandatory use of templates.",
|
'group_template_required': fields.selection([
|
||||||
implied_group='sale_contract.group_template_required',
|
(0, "Optional contract templates"),
|
||||||
help="Allows you to set the template field as required when creating an analytic account or a contract."),
|
(1, "Force setting a contract templates for every contract")
|
||||||
'time_unit': fields.many2one('product.uom', 'The default working time unit.'),
|
], "Contract Templates",
|
||||||
|
implied_group='sale_contract.group_template_required'),
|
||||||
}
|
}
|
||||||
|
|
||||||
def default_get(self, cr, uid, fields, context=None):
|
|
||||||
ir_model_data = self.pool.get('ir.model.data')
|
|
||||||
res = super(sale_configuration, self).default_get(cr, uid, fields, context)
|
|
||||||
if res.get('module_project'):
|
|
||||||
user = self.pool.get('res.users').browse(cr, uid, uid, context)
|
|
||||||
res['time_unit'] = user.company_id.project_time_mode_id.id
|
|
||||||
res['timesheet'] = res.get('module_sale_contract')
|
|
||||||
return res
|
|
||||||
|
|
||||||
def set_sale_defaults(self, cr, uid, ids, context=None):
|
|
||||||
ir_model_data = self.pool.get('ir.model.data')
|
|
||||||
wizard = self.browse(cr, uid, ids)[0]
|
|
||||||
|
|
||||||
if wizard.module_project and wizard.time_unit:
|
|
||||||
user = self.pool.get('res.users').browse(cr, uid, uid, context)
|
|
||||||
user.company_id.write({'project_time_mode_id': wizard.time_unit.id})
|
|
||||||
res = super(sale_configuration, self).set_sale_defaults(cr, uid, ids, context)
|
|
||||||
return res
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
<field name="model">sale.config.settings</field>
|
<field name="model">sale.config.settings</field>
|
||||||
<field name="inherit_id" ref="sale.view_sales_config"/>
|
<field name="inherit_id" ref="sale.view_sales_config"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//div[@name='module_analytic_user_function']" position="inside">
|
<xpath expr="//group[@id='contract']" position="inside">
|
||||||
|
<label for="group_template_required"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="group_template_required" class="oe_inline"/>
|
<field name="group_template_required" widget="radio"/>
|
||||||
<label for="group_template_required"/>
|
|
||||||
</div>
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ completed.
|
|||||||
""",
|
""",
|
||||||
'author': 'OpenERP SA',
|
'author': 'OpenERP SA',
|
||||||
'website': 'https://www.odoo.com/page/crm',
|
'website': 'https://www.odoo.com/page/crm',
|
||||||
'depends': ['project', 'procurement', 'sale', 'procurement_jit'],
|
'depends': ['project', 'sale'],
|
||||||
'data': ['views/sale_service_view.xml'],
|
'data': ['views/sale_service_view.xml'],
|
||||||
'demo': ['demo/sale_service_demo.xml'],
|
'demo': ['demo/sale_service_demo.xml'],
|
||||||
'test': ['test/project_task_procurement.yml'],
|
'test': ['test/project_task_procurement.yml'],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
'auto_install': False,
|
'auto_install': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,49 +10,40 @@ class sale_configuration(osv.osv_memory):
|
|||||||
_inherit = 'sale.config.settings'
|
_inherit = 'sale.config.settings'
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'group_invoice_deli_orders': fields.boolean('Generate invoices after and based on delivery orders',
|
'default_order_policy': fields.selection([
|
||||||
implied_group='sale_stock.group_invoice_deli_orders',
|
('manual', 'Invoice based on sales order'),
|
||||||
help="To allow your salesman to make invoices for Delivery Orders using the menu 'Deliveries to Invoice'."),
|
('picking', 'Invoice based on delivery orders')],
|
||||||
'task_work': fields.boolean("Prepare invoices based on task's activities",
|
'Invoicing Method', default_model='sale.order'),
|
||||||
help='Lets you transfer the entries under tasks defined for Project Management to '
|
'module_delivery': fields.selection([
|
||||||
'the Timesheet line entries for particular date and particular user with the effect of creating, editing and deleting either ways '
|
(0, 'No shipping costs on sales orders'),
|
||||||
'and to automatically creates project tasks from procurement lines.\n'
|
(1, 'Allow adding shipping costs')
|
||||||
'-This installs the modules project_timesheet and sale_service.'),
|
], "Shipping"),
|
||||||
'default_order_policy': fields.selection(
|
'default_picking_policy' : fields.selection([
|
||||||
[('manual', 'Create invoice on sales order'), ('picking', 'Create invoice on deliveries')],
|
(0, 'Ship products when some are available, and allow back orders'),
|
||||||
'The default invoicing method is', default_model='sale.order',
|
(1, 'Ship all products at once, without back orders')
|
||||||
help="You can generate invoices based on sales orders or based on shippings."),
|
], "Default Shipping Policy"),
|
||||||
'module_delivery': fields.boolean('Allow adding shipping costs',
|
'group_mrp_properties': fields.selection([
|
||||||
help='Allows you to add delivery methods in sales orders and delivery orders.\n'
|
(0, "Don't use manufacturing properties (recommended as its easier)"),
|
||||||
'You can define your own carrier and delivery grids for prices.\n'
|
(1, 'Allow setting manufacturing order properties per order line (avanced)')
|
||||||
'-This installs the module delivery.'),
|
], "Properties on SO Lines",
|
||||||
'default_picking_policy' : fields.boolean("Deliver all at once when all products are available.",
|
|
||||||
help = "Sales order by default will be configured to deliver all products at once instead of delivering each product when it is available. This may have an impact on the shipping price."),
|
|
||||||
'group_mrp_properties': fields.boolean('Product properties on order lines',
|
|
||||||
implied_group='sale.group_mrp_properties',
|
implied_group='sale.group_mrp_properties',
|
||||||
help="Allows you to tag sales order lines with properties."),
|
help="Allows you to tag sales order lines with properties."),
|
||||||
'module_project_timesheet': fields.boolean("Project Timesheet"),
|
'group_route_so_lines': fields.selection([
|
||||||
'module_sale_service': fields.boolean("Sale Service"),
|
(0, 'No order specific routes like MTO or drop shipping'),
|
||||||
'group_route_so_lines': fields.boolean('Choose MTO, drop shipping,... on sales order lines',
|
(1, 'Choose specific routes on sales order lines (advanced)')
|
||||||
implied_group='sale_stock.group_route_so_lines',
|
], "Order Routing",
|
||||||
help="Allows you to choose a delivery route on sales order lines"),
|
implied_group='sale_stock.group_route_so_lines'),
|
||||||
}
|
}
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'default_order_policy': 'manual',
|
'default_order_policy': 'manual',
|
||||||
}
|
}
|
||||||
|
|
||||||
def default_get(self, cr, uid, fields, context=None):
|
|
||||||
res = super(sale_configuration, self).default_get(cr, uid, fields, context)
|
|
||||||
# task_work, time_unit depend on other fields
|
|
||||||
res['task_work'] = res.get('module_sale_service') and res.get('module_project_timesheet')
|
|
||||||
return res
|
|
||||||
|
|
||||||
def get_default_sale_config(self, cr, uid, ids, context=None):
|
def get_default_sale_config(self, cr, uid, ids, context=None):
|
||||||
ir_values = self.pool.get('ir.values')
|
ir_values = self.pool.get('ir.values')
|
||||||
default_picking_policy = ir_values.get_default(cr, uid, 'sale.order', 'picking_policy')
|
default_picking_policy = ir_values.get_default(cr, uid, 'sale.order', 'picking_policy')
|
||||||
return {
|
return {
|
||||||
'default_picking_policy': default_picking_policy == 'one',
|
'default_picking_policy': (default_picking_policy == 'one') and 1 or 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
def set_sale_defaults(self, cr, uid, ids, context=None):
|
def set_sale_defaults(self, cr, uid, ids, context=None):
|
||||||
@@ -66,7 +57,3 @@ class sale_configuration(osv.osv_memory):
|
|||||||
res = super(sale_configuration, self).set_sale_defaults(cr, uid, ids, context)
|
res = super(sale_configuration, self).set_sale_defaults(cr, uid, ids, context)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def onchange_invoice_methods(self, cr, uid, ids, group_invoice_deli_orders, context=None):
|
|
||||||
if not group_invoice_deli_orders:
|
|
||||||
return {'value': {'default_order_policy': 'manual'}}
|
|
||||||
return {'value': {'default_order_policy': 'picking'}}
|
|
||||||
|
|||||||
@@ -7,48 +7,33 @@
|
|||||||
<field name="inherit_id" ref="sale.view_sales_config"/>
|
<field name="inherit_id" ref="sale.view_sales_config"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<data>
|
<data>
|
||||||
<xpath expr="//div[@name='timesheet']" position="before">
|
<xpath expr="//div[@id='main']" position="inside">
|
||||||
<div>
|
<group string="Shipping">
|
||||||
<field name="group_invoice_deli_orders" class="oe_inline" on_change="onchange_invoice_methods(group_invoice_deli_orders)"/>
|
|
||||||
<label for="group_invoice_deli_orders"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<field name="task_work" class="oe_inline" on_change="onchange_task_work(task_work)"/>
|
|
||||||
<label for="task_work"/>
|
|
||||||
</div>
|
|
||||||
</xpath>
|
|
||||||
<group name="default_options" position="attributes">
|
|
||||||
<attribute name="invisible">0</attribute>
|
|
||||||
</group>
|
|
||||||
<xpath expr="//div[@name='div_default_options']" position="inside">
|
|
||||||
<div attrs="{'invisible':[('group_invoice_deli_orders','=',False)],'required': [('group_invoice_deli_orders','=',True)]}">
|
|
||||||
<field name="default_order_policy" class="oe_inline"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<field name="module_delivery" class="oe_inline"/>
|
|
||||||
<label for="module_delivery"/>
|
<label for="module_delivery"/>
|
||||||
</div>
|
<div>
|
||||||
</xpath>
|
<field name="module_delivery" widget="radio"/>
|
||||||
<group name='default_options' position="after">
|
</div>
|
||||||
<field name="module_project_timesheet" invisible="1"/>
|
|
||||||
<field name="module_sale_service" invisible="1"/>
|
|
||||||
</group>
|
|
||||||
<div name='warehouse_features' position='inside'>
|
|
||||||
<div name='default_picking_policy' attrs="{'invisible':[('group_invoice_deli_orders','=',False)]}">
|
|
||||||
<field name="default_picking_policy" class="oe_inline"/>
|
|
||||||
<label for="default_picking_policy"/>
|
<label for="default_picking_policy"/>
|
||||||
</div>
|
<div name='default_picking_policy'>
|
||||||
</div>
|
<field name="default_picking_policy" widget="radio"/>
|
||||||
<div name='module_sale_journal' position="before">
|
</div>
|
||||||
|
</group>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//group[@id='sale']" position="inside">
|
||||||
|
<label for="default_order_policy"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="group_mrp_properties" class="oe_inline"/>
|
<field name="default_order_policy" widget="radio"/>
|
||||||
<label for="group_mrp_properties"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<xpath expr="//div[@name='Sale Features']" position="inside">
|
<label for="group_route_so_lines"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="group_route_so_lines" class="oe_inline"/>
|
<field name="group_route_so_lines" widget="radio"/>
|
||||||
<label for="group_route_so_lines"/>
|
</div>
|
||||||
|
|
||||||
|
<label for="group_mrp_properties" groups="base.group_no_one"/>
|
||||||
|
<div groups="base.group_no_one">
|
||||||
|
<field name="group_mrp_properties" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<openerp>
|
<openerp>
|
||||||
<data noupdate="0">
|
<data noupdate="0">
|
||||||
<record id="group_invoice_deli_orders" model="res.groups">
|
|
||||||
<field name="name">Enable Invoicing Delivery orders</field>
|
|
||||||
<field name="category_id" ref="base.module_category_hidden"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="group_route_so_lines" model="res.groups">
|
<record id="group_route_so_lines" model="res.groups">
|
||||||
<field name="name">Enable Route on Sales Order Line</field>
|
<field name="name">Enable Route on Sales Order Line</field>
|
||||||
<field name="category_id" ref="base.module_category_hidden"/>
|
<field name="category_id" ref="base.module_category_hidden"/>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
groups="base.group_sale_salesman"
|
groups="base.group_sale_salesman"
|
||||||
parent="base.menu_base_partner" sequence="5" />
|
parent="base.menu_base_partner" sequence="5" />
|
||||||
<menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_aftersale" sequence="1"/>
|
<menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_aftersale" sequence="1"/>
|
||||||
<menuitem action="outgoing_picking_list_to_invoice" id="menu_action_picking_list_to_invoice" parent="base.menu_invoiced" groups="sale_stock.group_invoice_deli_orders" sequence="20"/>
|
<menuitem action="outgoing_picking_list_to_invoice" id="menu_action_picking_list_to_invoice" parent="base.menu_invoiced" sequence="20"/>
|
||||||
|
|
||||||
<record id="stock_location_route_form_view_inherit" model="ir.ui.view">
|
<record id="stock_location_route_form_view_inherit" model="ir.ui.view">
|
||||||
<field name="name">stock.location.route.form</field>
|
<field name="name">stock.location.route.form</field>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
|
|
||||||
import sales_team
|
import sales_team
|
||||||
|
|||||||
+69
-20
@@ -71,58 +71,107 @@ class stock_config_settings(osv.osv_memory):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
|
'group_product_variant': fields.selection([
|
||||||
|
(0, "No variants on products"),
|
||||||
|
(1, 'Products can have several attributes, defining variants (Example: size, color,...)')
|
||||||
|
], "Product Variants",
|
||||||
|
help='Work with product variant allows you to define some variant of the same products, an ease the product management in the ecommerce for example',
|
||||||
|
implied_group='product.group_product_variant'),
|
||||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||||
'module_procurement_jit': fields.boolean("Generate procurement in real time",
|
'module_procurement_jit': fields.selection([
|
||||||
|
(1, 'Schedule orders in real time'),
|
||||||
|
(0, 'Run scheduler once a day')
|
||||||
|
], "Procurements",
|
||||||
help="""This allows Just In Time computation of procurement orders.
|
help="""This allows Just In Time computation of procurement orders.
|
||||||
All procurement orders will be processed immediately, which could in some
|
All procurement orders will be processed immediately, which could in some
|
||||||
cases entail a small performance impact.
|
cases entail a small performance impact.
|
||||||
This installs the module procurement_jit."""),
|
This installs the module procurement_jit."""),
|
||||||
'module_claim_from_delivery': fields.boolean("Allow claim on deliveries",
|
'module_claim_from_delivery': fields.selection([
|
||||||
|
(0, 'Do not manage claims'),
|
||||||
|
(1, 'Allow claims on deliveries')
|
||||||
|
], "Claims",
|
||||||
help='Adds a Claim link to the delivery order.\n'
|
help='Adds a Claim link to the delivery order.\n'
|
||||||
'-This installs the module claim_from_delivery.'),
|
'-This installs the module claim_from_delivery.'),
|
||||||
'module_product_expiry': fields.boolean("Expiry date on serial numbers",
|
'module_product_expiry': fields.selection([
|
||||||
|
(0, 'Do not use expiry date'),
|
||||||
|
(1, 'Define expiry date on serial numbers')
|
||||||
|
], "Expiry Dates",
|
||||||
help="""Track different dates on products and serial numbers.
|
help="""Track different dates on products and serial numbers.
|
||||||
The following dates can be tracked:
|
The following dates can be tracked:
|
||||||
- end of life
|
- end of life
|
||||||
- best before date
|
- best before date
|
||||||
- removal date
|
- removal date
|
||||||
- alert date.
|
- alert date.
|
||||||
This installs the module product_expiry."""),
|
This installs the module product_expiry."""),
|
||||||
'group_uom': fields.boolean("Manage different units of measure for products",
|
'group_uom': fields.selection([
|
||||||
|
(0, 'Products have only one unit of measure (easier)'),
|
||||||
|
(1, 'Some products may be sold/purchased in different unit of measures (advanced)')
|
||||||
|
], "Unit of Measures",
|
||||||
implied_group='product.group_uom',
|
implied_group='product.group_uom',
|
||||||
help="""Allows you to select and maintain different units of measure for products."""),
|
help="""Allows you to select and maintain different units of measure for products."""),
|
||||||
'group_uos': fields.boolean("Store products in a different unit of measure than the sales order",
|
'group_uos': fields.selection([
|
||||||
|
(0, 'Use the same product unit of measure in the stocks than in the sales order'),
|
||||||
|
(1, 'Store products in a different unit of measure than the sales order')
|
||||||
|
], "Unit of Sales",
|
||||||
implied_group='product.group_uos',
|
implied_group='product.group_uos',
|
||||||
help='Allows you to store units of a product, but sell and invoice based on a different unit of measure.\n'
|
help='Allows you to store units of a product, but sell and invoice based on a different unit of measure.\n'
|
||||||
'For instance, you can store pieces of meat that you sell and invoice based on their weight.'),
|
'For instance, you can store pieces of meat that you sell and invoice based on their weight.'),
|
||||||
'group_stock_packaging': fields.boolean("Allow to define several packaging methods on products",
|
'group_stock_packaging': fields.selection([
|
||||||
|
(0, 'Do not manage packaging'),
|
||||||
|
(1, 'Manage available packaging options per products')
|
||||||
|
], "Packaging Methods",
|
||||||
implied_group='product.group_stock_packaging',
|
implied_group='product.group_stock_packaging',
|
||||||
help="""Allows you to create and manage your packaging dimensions and types you want to be maintained in your system."""),
|
help="""Allows you to create and manage your packaging dimensions and types you want to be maintained in your system."""),
|
||||||
'group_stock_production_lot': fields.boolean("Track lots or serial numbers",
|
'group_stock_production_lot': fields.selection([
|
||||||
|
(0, 'Do not track individual product items'),
|
||||||
|
(1, 'Track lots or serial numbers')
|
||||||
|
], "Lots and Serial Numbers",
|
||||||
implied_group='stock.group_production_lot',
|
implied_group='stock.group_production_lot',
|
||||||
help="""This allows you to assign a lot (or serial number) to the pickings and moves. This can make it possible to know which production lot was sent to a certain client, ..."""),
|
help="""This allows you to assign a lot (or serial number) to the pickings and moves. This can make it possible to know which production lot was sent to a certain client, ..."""),
|
||||||
'group_stock_tracking_lot': fields.boolean("Use packages: pallets, boxes, ...",
|
'group_stock_tracking_lot': fields.selection([
|
||||||
|
(0, 'Do not manage packaging'),
|
||||||
|
(1, 'Record packages used on packing: pallets, boxes, ...)')
|
||||||
|
], "Packages",
|
||||||
implied_group='stock.group_tracking_lot',
|
implied_group='stock.group_tracking_lot',
|
||||||
help="""This allows to manipulate packages. You can put something in, take something from a package, but also move entire packages and put them even in another package. """),
|
help="""This allows to manipulate packages. You can put something in, take something from a package, but also move entire packages and put them even in another package. """),
|
||||||
'group_stock_tracking_owner': fields.boolean("Manage owner on stock",
|
'group_stock_tracking_owner': fields.selection([
|
||||||
|
(0, 'All products in your warehouse belong to your company'),
|
||||||
|
(1, 'Manage consignee stocks (advanced)')
|
||||||
|
], "Product Owners",
|
||||||
implied_group='stock.group_tracking_owner',
|
implied_group='stock.group_tracking_owner',
|
||||||
help="""This way you can receive products attributed to a certain owner. """),
|
help="""This way you can receive products attributed to a certain owner. """),
|
||||||
'group_stock_multiple_locations': fields.boolean("Manage multiple locations",
|
'group_stock_multiple_locations': fields.selection([
|
||||||
|
(0, 'Do not record internal moves within a warehouse'),
|
||||||
|
(1, 'Manage several locations per warehouse')
|
||||||
|
], "Multi Locations",
|
||||||
implied_group='stock.group_locations',
|
implied_group='stock.group_locations',
|
||||||
help="""This will show you the locations and allows you to define multiple picking types and warehouses."""),
|
help="""This will show you the locations and allows you to define multiple picking types and warehouses."""),
|
||||||
'group_stock_single_location': fields.boolean("Manage only one location per warehouse",
|
'group_stock_single_location': fields.boolean("Manage only one location per warehouse",
|
||||||
implied_group='stock.group_single_location',
|
implied_group='stock.group_single_location',
|
||||||
help="""This implies that you manage one location per warehouse, i.e. no internal transfer is possible."""),
|
help="""This implies that you manage one location per warehouse, i.e. no internal transfer is possible."""),
|
||||||
'group_stock_adv_location': fields.boolean("Manage routes for your warehouse",
|
'group_stock_adv_location': fields.selection([
|
||||||
|
(0, 'No automatic routing of products'),
|
||||||
|
(1, 'Advanced routing of products using rules')
|
||||||
|
], "Routes",
|
||||||
implied_group='stock.group_adv_location',
|
implied_group='stock.group_adv_location',
|
||||||
help="""This option supplements the warehouse application by effectively implementing Push and Pull inventory flows through Routes."""),
|
help="""This option supplements the warehouse application by effectively implementing Push and Pull inventory flows through Routes."""),
|
||||||
'decimal_precision': fields.integer('Decimal precision on weight', help="As an example, a decimal precision of 2 will allow weights like: 9.99 kg, whereas a decimal precision of 4 will allow weights like: 0.0231 kg."),
|
'decimal_precision': fields.integer('Decimal precision on weight', help="As an example, a decimal precision of 2 will allow weights like: 9.99 kg, whereas a decimal precision of 4 will allow weights like: 0.0231 kg."),
|
||||||
'propagation_minimum_delta': fields.related('company_id', 'propagation_minimum_delta', type='integer', string="Minimum days to trigger a propagation of date change in pushed/pull flows."),
|
'propagation_minimum_delta': fields.related('company_id', 'propagation_minimum_delta', type='integer', string="Minimum days to trigger a propagation of date change in pushed/pull flows."),
|
||||||
'module_stock_dropshipping': fields.boolean("Manage dropshipping",
|
'module_stock_dropshipping': fields.selection([
|
||||||
|
(0, 'Suppliers always deliver to your warehouse(s)'),
|
||||||
|
(1, "Allow suppliers to deliver directly to your customers")
|
||||||
|
], "Dropshipping",
|
||||||
help='\nCreates the dropship route and add more complex tests'
|
help='\nCreates the dropship route and add more complex tests'
|
||||||
'-This installs the module stock_dropshipping.'),
|
'-This installs the module stock_dropshipping.'),
|
||||||
'module_stock_picking_wave': fields.boolean('Manage picking wave', help='Install the picking wave module which will help you grouping your pickings and processing them in batch'),
|
'module_stock_picking_wave': fields.selection([
|
||||||
'module_stock_calendar': fields.boolean('Manage minimum stock rules according to the purchase and delivery calendars',
|
(0, 'Manage pickings one at a time'),
|
||||||
|
(1, 'Manage picking in batch per worker')
|
||||||
|
], "Picking Waves",
|
||||||
|
help='Install the picking wave module which will help you grouping your pickings and processing them in batch'),
|
||||||
|
'module_stock_calendar': fields.selection([
|
||||||
|
(0, 'Set lead times in calendar days (easy)'),
|
||||||
|
(1, "Adapt lead times using the suppliers' open days calendars (advanced)")
|
||||||
|
], "Minimun Stock Rules",
|
||||||
help='This allows you to handle minimum stock rules differently by the possibility to take into account the purchase and delivery calendars \n-This installs the module stock_calendar.'),
|
help='This allows you to handle minimum stock rules differently by the possibility to take into account the purchase and delivery calendars \n-This installs the module stock_calendar.'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,89 +24,93 @@
|
|||||||
</header>
|
</header>
|
||||||
<separator string="Traceability"/>
|
<separator string="Traceability"/>
|
||||||
<group name="traceability">
|
<group name="traceability">
|
||||||
<label for="id" string="Traceability"/>
|
<label for="group_stock_production_lot"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="group_stock_production_lot" widget="radio"/>
|
||||||
<field name="group_stock_production_lot" class="oe_inline"/>
|
</div>
|
||||||
<label for="group_stock_production_lot"/>
|
|
||||||
</div>
|
<label for="module_product_expiry" attrs="{'invisible': [('group_stock_production_lot','=',0)]}"/>
|
||||||
<div attrs="{'invisible': [('group_stock_production_lot','=',False)]}">
|
<div attrs="{'invisible': [('group_stock_production_lot','=', 0)]}">
|
||||||
<field name="module_product_expiry" class="oe_inline"/>
|
<field name="module_product_expiry" widget="radio"/>
|
||||||
<label for="module_product_expiry"/>
|
</div>
|
||||||
</div>
|
|
||||||
<div>
|
<label for="group_stock_tracking_lot"/>
|
||||||
<field name="group_stock_tracking_lot" class="oe_inline"/>
|
<div>
|
||||||
<label for="group_stock_tracking_lot"/>
|
<field name="group_stock_tracking_lot" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<field name="group_stock_tracking_owner" class="oe_inline"/>
|
<label for="group_stock_tracking_owner"/>
|
||||||
<label for="group_stock_tracking_owner"/>
|
<div>
|
||||||
</div>
|
<field name="group_stock_tracking_owner" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<separator string="Location & Warehouse"/>
|
<separator string="Location & Warehouse"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Logistic"/>
|
<label for="group_product_variant"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="group_product_variant" widget="radio"/>
|
||||||
<field name="module_procurement_jit" class="oe_inline"/>
|
</div>
|
||||||
<label for="module_procurement_jit"/>
|
|
||||||
</div>
|
<label for="module_procurement_jit"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="group_stock_multiple_locations" class="oe_inline"/>
|
<field name="module_procurement_jit" widget="radio"/>
|
||||||
<label for="group_stock_multiple_locations"/>
|
</div>
|
||||||
</div>
|
|
||||||
<div>
|
<label for="group_stock_multiple_locations"/>
|
||||||
<field name="group_stock_adv_location" class="oe_inline" on_change="onchange_adv_location(group_stock_adv_location)"/>
|
<div>
|
||||||
<label for="group_stock_adv_location"/>
|
<field name="group_stock_multiple_locations" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
<div attrs="{'invisible': [('group_stock_adv_location', '=', False)]}">
|
|
||||||
<label for="propagation_minimum_delta"/>
|
<label for="group_stock_adv_location"/>
|
||||||
<field name="propagation_minimum_delta" class="oe_inline"/>
|
<div>
|
||||||
</div>
|
<field name="group_stock_adv_location" widget="radio"/>
|
||||||
|
<label for="propagation_minimum_delta" attrs="{'invisible': [('group_stock_adv_location', '=', 0)]}"/>
|
||||||
|
<field name="propagation_minimum_delta" class="oe_inline" attrs="{'invisible': [('group_stock_adv_location', '=', 0)]}"/>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Products"/>
|
<label for="id" string="Products" groups="base.group_no_one"/>
|
||||||
<div>
|
<div groups="base.group_no_one">
|
||||||
<div>
|
<div>
|
||||||
<field name="group_stock_packaging" class="oe_inline"/>
|
|
||||||
<label for="group_stock_packaging"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label for="decimal_precision"/>
|
<label for="decimal_precision"/>
|
||||||
<field name="decimal_precision" class="oe_inline"/>
|
<field name="decimal_precision" class="oe_inline"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<field name="group_uom" class="oe_inline"/>
|
|
||||||
<label for="group_uom"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<field name="group_uos" class="oe_inline"/>
|
|
||||||
<label for="group_uos" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</group>
|
|
||||||
<group>
|
<label for="group_stock_packaging"/>
|
||||||
<label for="id" string="Additional Features"/>
|
<div>
|
||||||
<div>
|
<field name="group_stock_packaging" widget="radio"/>
|
||||||
<div>
|
</div>
|
||||||
<field name="module_claim_from_delivery" class="oe_inline"/>
|
|
||||||
<label for="module_claim_from_delivery"/>
|
<label for="group_uom"/>
|
||||||
</div>
|
<div>
|
||||||
<div>
|
<field name="group_uom" widget="radio"/>
|
||||||
<field name="module_stock_dropshipping" class="oe_inline"/>
|
</div>
|
||||||
<label for="module_stock_dropshipping"/>
|
|
||||||
</div>
|
<label for="group_uos"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="module_stock_picking_wave" class="oe_inline"/>
|
<field name="group_uos" widget="radio"/>
|
||||||
<label for="module_stock_picking_wave"/>
|
</div>
|
||||||
</div>
|
|
||||||
<div>
|
<label for="module_claim_from_delivery"/>
|
||||||
<field name="module_stock_calendar" class="oe_inline"/>
|
<div>
|
||||||
<label for="module_stock_calendar"/>
|
<field name="module_claim_from_delivery" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<label for="module_stock_dropshipping"/>
|
||||||
|
<div>
|
||||||
|
<field name="module_stock_dropshipping" widget="radio"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label for="module_stock_picking_wave"/>
|
||||||
|
<div>
|
||||||
|
<field name="module_stock_picking_wave" widget="radio"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label for="module_stock_calendar"/>
|
||||||
|
<div>
|
||||||
|
<field name="module_stock_calendar" widget="radio"/>
|
||||||
|
</div>
|
||||||
</group>
|
</group>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -9,14 +9,23 @@ class stock_config_settings(osv.osv_memory):
|
|||||||
_inherit = 'stock.config.settings'
|
_inherit = 'stock.config.settings'
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'group_stock_inventory_valuation': fields.boolean("Generate accounting entries per stock movement",
|
'group_stock_inventory_valuation': fields.selection([
|
||||||
|
(0, "Periodic inventory valuation (recommended)"),
|
||||||
|
(1, 'Perpetual inventory valuation (stock move generates accounting entries)')
|
||||||
|
], "Inventory Valuation",
|
||||||
implied_group='stock_account.group_inventory_valuation',
|
implied_group='stock_account.group_inventory_valuation',
|
||||||
help="""Allows to configure inventory valuations on products and product categories."""),
|
help="""Allows to configure inventory valuations on products and product categories."""),
|
||||||
'module_stock_invoice_directly': fields.boolean("Create and open the invoice when the user finish a delivery order",
|
'module_stock_invoice_directly': fields.selection([
|
||||||
|
(0, 'Create invoices in batch'),
|
||||||
|
(1, 'Create and open the invoice when the user finishes a delivery order')
|
||||||
|
], "Invoicing",
|
||||||
help='This allows to automatically launch the invoicing wizard if the delivery is '
|
help='This allows to automatically launch the invoicing wizard if the delivery is '
|
||||||
'to be invoiced when you send or deliver goods.\n'
|
'to be invoiced when you send or deliver goods.\n'
|
||||||
'-This installs the module stock_invoice_directly.'),
|
'-This installs the module stock_invoice_directly.'),
|
||||||
'module_stock_landed_costs': fields.boolean("Calculate landed costs on products",
|
'module_stock_landed_costs': fields.selection([
|
||||||
|
(0, 'No landed costs'),
|
||||||
|
(1, 'Include landed costs in product costing computation')
|
||||||
|
], "Landed Costs",
|
||||||
help="""Install the module that allows to affect landed costs on pickings, and split them onto the different products."""),
|
help="""Install the module that allows to affect landed costs on pickings, and split them onto the different products."""),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,21 +8,20 @@
|
|||||||
<xpath expr="//group[@name='traceability']" position="after">
|
<xpath expr="//group[@name='traceability']" position="after">
|
||||||
<separator string="Accounting"/>
|
<separator string="Accounting"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Accounting"/>
|
<label for="module_stock_landed_costs"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<field name="module_stock_landed_costs" widget="radio" on_change="onchange_landed_costs(module_stock_landed_costs)"/>
|
||||||
<field name="group_stock_inventory_valuation" class="oe_inline"/>
|
</div>
|
||||||
<label for="group_stock_inventory_valuation"/>
|
|
||||||
</div>
|
<label for="group_stock_inventory_valuation"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="module_stock_invoice_directly" class="oe_inline"/>
|
<field name="group_stock_inventory_valuation" widget="radio"/>
|
||||||
<label for="module_stock_invoice_directly"/>
|
</div>
|
||||||
</div>
|
|
||||||
<div>
|
<label for="module_stock_invoice_directly"/>
|
||||||
<field name="module_stock_landed_costs" on_change="onchange_landed_costs(module_stock_landed_costs)" class="oe_inline"/>
|
<div>
|
||||||
<label for="module_stock_landed_costs"/>
|
<field name="module_stock_invoice_directly" widget="radio"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</group>
|
</group>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
from openerp import models, fields
|
from openerp import models, fields
|
||||||
from openerp.addons.sale.res_config import sale_configuration
|
|
||||||
|
|
||||||
class website_sale_configuration(models.TransientModel):
|
|
||||||
_inherit = 'sale.config.settings'
|
|
||||||
|
|
||||||
module_website_sale_digital = fields.Boolean('Sell digital products',
|
|
||||||
help="Allow you to set mark a product as a digital product, allowing customers that have purchased the product to download its attachments. This installs the module website_sale_digital.")
|
|
||||||
|
|
||||||
|
|
||||||
class website_config_settings(models.TransientModel):
|
class website_config_settings(models.TransientModel):
|
||||||
_inherit = 'website.config.settings'
|
_inherit = 'website.config.settings'
|
||||||
|
|||||||
@@ -1,25 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<record id="view_website_sales_config" model="ir.ui.view">
|
|
||||||
<field name="name">website_sale settings</field>
|
|
||||||
<field name="model">sale.config.settings</field>
|
|
||||||
<field name="inherit_id" ref="sale.view_sales_config"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<div name="customer feature" position="before">
|
|
||||||
<separator string="Products Management"/>
|
|
||||||
<group>
|
|
||||||
<label for="id" string="Product Types"/>
|
|
||||||
<div>
|
|
||||||
<div name="group_invoice_so_lines">
|
|
||||||
<field name="module_website_sale_digital" class="oe_inline"/>
|
|
||||||
<label for="module_website_sale_digital"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
</div>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="website_config_settings_view_form" model="ir.ui.view">
|
<record id="website_config_settings_view_form" model="ir.ui.view">
|
||||||
<field name="name">website.config.settings.form.inherit</field>
|
<field name="name">website.config.settings.form.inherit</field>
|
||||||
<field name="model">website.config.settings</field>
|
<field name="model">website.config.settings</field>
|
||||||
|
|||||||
@@ -402,6 +402,10 @@ class res_config_settings(osv.osv_memory, res_config_module_installation_mixin):
|
|||||||
* For a boolean field like 'module_XXX', ``execute`` triggers the immediate
|
* For a boolean field like 'module_XXX', ``execute`` triggers the immediate
|
||||||
installation of the module named 'XXX' if the field has value ``True``.
|
installation of the module named 'XXX' if the field has value ``True``.
|
||||||
|
|
||||||
|
* For a selection field like 'module_XXX' composed of 2 integers values ('0' and '1'),
|
||||||
|
``execute`` triggers the immediate installation of the module named 'XXX'
|
||||||
|
if the field has the integer value ``1``.
|
||||||
|
|
||||||
* For the other fields, the method ``execute`` invokes all methods with a name
|
* For the other fields, the method ``execute`` invokes all methods with a name
|
||||||
that starts with 'set_'; such methods can be defined to implement the effect
|
that starts with 'set_'; such methods can be defined to implement the effect
|
||||||
of those fields.
|
of those fields.
|
||||||
@@ -493,7 +497,7 @@ class res_config_settings(osv.osv_memory, res_config_module_installation_mixin):
|
|||||||
elif name.startswith('group_') and isinstance(field, fields.boolean) and hasattr(field, 'implied_group'):
|
elif name.startswith('group_') and isinstance(field, fields.boolean) and hasattr(field, 'implied_group'):
|
||||||
field_groups = getattr(field, 'group', 'base.group_user').split(',')
|
field_groups = getattr(field, 'group', 'base.group_user').split(',')
|
||||||
groups.append((name, map(ref, field_groups), ref(field.implied_group)))
|
groups.append((name, map(ref, field_groups), ref(field.implied_group)))
|
||||||
elif name.startswith('module_') and isinstance(field, fields.boolean):
|
elif name.startswith('module_') and (isinstance(field, fields.boolean) or isinstance(field, fields.selection)):
|
||||||
mod_ids = ir_module.search(cr, uid, [('name', '=', name[7:])])
|
mod_ids = ir_module.search(cr, uid, [('name', '=', name[7:])])
|
||||||
record = ir_module.browse(cr, uid, mod_ids[0], context) if mod_ids else None
|
record = ir_module.browse(cr, uid, mod_ids[0], context) if mod_ids else None
|
||||||
modules.append((name, record))
|
modules.append((name, record))
|
||||||
@@ -521,6 +525,8 @@ class res_config_settings(osv.osv_memory, res_config_module_installation_mixin):
|
|||||||
# modules: which modules are installed/to install
|
# modules: which modules are installed/to install
|
||||||
for name, module in classified['module']:
|
for name, module in classified['module']:
|
||||||
res[name] = module and module.state in ('installed', 'to install', 'to upgrade')
|
res[name] = module and module.state in ('installed', 'to install', 'to upgrade')
|
||||||
|
if self._fields[name].type == 'selection':
|
||||||
|
res[name] = int(res[name])
|
||||||
|
|
||||||
# other fields: call all methods that start with 'get_default_'
|
# other fields: call all methods that start with 'get_default_'
|
||||||
for method in dir(self):
|
for method in dir(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user