[IMP] All res_config files : Convert Booleans to Selection fields + radio buttons in views

This commit is contained in:
Yannick Tivisse
2015-08-10 15:22:31 +02:00
parent 522086c98b
commit 3d8f7c2f24
54 changed files with 732 additions and 787 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
<field name="auth_signup_uninvited" class="oe_inline"/>
<label for="auth_signup_uninvited"/>
</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"/>
<field name="auth_signup_template_user_id" class="oe_inline"
attrs="{'required': [('auth_signup_uninvited', '=', True)]}"
+2 -4
View File
@@ -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)
# Preferences wizard for Sales & CRM.
# It is defined here because it is inherited independently in modules sale, crm.
# Empty class but required since it's overrided by sale & crm
class sale_config_settings(osv.osv_memory):
_name = 'sale.config.settings'
_inherit = 'res.config.settings'
_columns = {
'module_crm': fields.boolean('CRM'),
'module_sale' : fields.boolean('SALE'),
}
+39 -49
View File
@@ -19,15 +19,6 @@
<button type="object" name="open_company" string="Configure your company data" icon="gtk-execute" class="oe_inline oe_link"/>
</p>
</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>
<label for="id" string="Email" name="email_label"/>
<div name="email">
@@ -38,7 +29,7 @@
</div>
</div>
</group>
<group>
<group groups="base.group_no_one">
<label for="id" string="Portal access"/>
<div>
<div>
@@ -72,6 +63,42 @@
</div>
</div>
</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>
<label for="id" string="Google Drive"/>
<div name="google_drive">
@@ -95,32 +122,6 @@
</div>
</div>
</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>
</field>
</record>
@@ -145,20 +146,9 @@
or
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
</header>
<div name="customer feature" attrs="{'invisible': [('module_sale','=',False)]}">
<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 id="main">
</div>
<div name="config_sale"/>
<div name="config_pos"/>
</form>
</field>
</record>
-2
View File
@@ -236,7 +236,6 @@ class crm_lead(format_address, osv.osv):
'function': fields.char('Function'),
'title': fields.many2one('res.partner.title', 'Title'),
'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'),
'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):
update_vals['priority'] = msg.get('priority')
maps = {
'cost':'planned_cost',
'revenue': 'planned_revenue',
'probability':'probability',
}
-5
View File
@@ -556,11 +556,6 @@
</group>
</group>
</page>
<page string="Fund Raising" groups="crm.group_fund_raising">
<group>
<field name="planned_cost"/>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
+6 -7
View File
@@ -10,17 +10,16 @@ class crm_configuration(osv.TransientModel):
_inherit = ['sale.config.settings', 'fetchmail.config.settings']
_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(
"Automatically generate an email alias at the sales team creation",
help="Odoo will generate an email alias based on the sales team name"),
'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 = {
+26 -40
View File
@@ -7,51 +7,37 @@
<field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
<field name="arch" type="xml">
<data>
<div name="config_sale" position="inside">
<separator string="Sale Services"/>
<group>
<label for="id" string="After-Sale Services"/>
<div id="main" position="inside">
<group string="CRM" name="config_alias">
<label for="id" string="Leads Email Alias"/>
<div>
<div>
<field name="module_crm_claim" class="oe_inline"/>
<label for="module_crm_claim"/>
<div attrs="{'invisible': [('alias_domain', 'in', ['localhost', '', False])]}">
<p class="text-muted">
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>
<label for="group_multi_salesteams"/>
<div>
<field name="group_multi_salesteams" widget="radio"/>
</div>
</group>
</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>
</field>
</record>
-5
View File
@@ -24,11 +24,6 @@
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</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">
<field eval="[(4,ref('base.group_partner_manager'))]" name="groups_id"/>
</record>
-1
View File
@@ -84,7 +84,6 @@
assert len(line_ids), "Delivery cost is not Added"
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."
-
I set default delivery policy.
-
+21 -10
View File
@@ -6,19 +6,30 @@ class event_config_settings(osv.TransientModel):
_name='event.config.settings'
_inherit='res.config.settings'
_columns = {
'module_event_sale': fields.boolean(
'Sell events tickets',
'module_event_sale': fields.selection([
(0, "All events are free"),
(1, 'Allow selling tickets')
], "Tickets",
help='Install the event_sale module'),
'module_website_event_track': fields.boolean(
'Organize few days event with track, full agenda, own menu in website',
'module_website_event_track': fields.selection([
(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'),
'module_website_event_questions': fields.boolean(
'Ask questions to online subscribers',
'module_website_event_questions': fields.selection([
(0, "No extra questions on subscriptions"),
(1, 'Allow adding extra questions on subscriptions')
], "Subscription Survey",
help='Install the website_event_questions module'),
'auto_confirmation': fields.boolean(
'Automate events and subscription confirmation', help='Unselect this option to manually manage draft event and draft subscription'),
'group_email_scheduling': fields.boolean(
'Schedule emails to attendees and subscribers',
'auto_confirmation': fields.selection([
(1, 'No validation step on subscription'),
(0, "Manually confirm every subscription")
], "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',
implied_group='event.group_email_scheduling'),
}
+24 -23
View File
@@ -12,30 +12,31 @@
or
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
</header>
<separator string="Mass Mailing"/>
<separator string="Events"/>
<group>
<label for="id" string="Settings"/>
<div>
<div name="module_event_sale">
<field name="module_event_sale" class="oe_inline"/>
<label for="module_event_sale"/>
</div>
<div name="module_website_event_track">
<field name="module_website_event_track"/>
<label for="module_website_event_track"/>
</div>
<div name="div_website_event_questions">
<field name="module_website_event_questions"/>
<label for="module_website_event_questions"/>
</div>
<div name="div_auto_confirmation">
<field name="auto_confirmation"/>
<label for="auto_confirmation"/>
</div>
<div name="div_email_scheduling">
<field name="group_email_scheduling"/>
<label for="group_email_scheduling"/>
</div>
<label for="module_event_sale"/>
<div>
<field name="module_event_sale" widget="radio"/>
</div>
<label for="module_website_event_track"/>
<div>
<field name="module_website_event_track" widget="radio"/>
</div>
<label for="module_website_event_questions"/>
<div>
<field name="module_website_event_questions" widget="radio"/>
</div>
<label for="auto_confirmation"/>
<div>
<field name="auto_confirmation" widget="radio"/>
</div>
<label for="group_email_scheduling"/>
<div>
<field name="group_email_scheduling" widget="radio"/>
</div>
</group>
</form>
+1 -1
View File
@@ -4,7 +4,7 @@ class calendar_config_settings(osv.TransientModel):
_inherit = 'base.config.settings'
_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_secret': fields.char("Client_key"),
'server_uri': fields.char('URI for tuto')
+2 -2
View File
@@ -11,8 +11,8 @@
<div>
<div>
<label for="google_cal_sync"/>
<field name="google_cal_sync" class="oe_inline"/>
<div>
<field name="google_cal_sync"/>
<div>
<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>
<ul>
-5
View File
@@ -8,7 +8,6 @@ class HrEquipmentConfigSettings(models.TransientModel):
_name = 'hr.equipment.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')
alias_domain = fields.Char("Alias Domain")
@@ -41,7 +40,3 @@ class HrEquipmentConfigSettings(models.TransientModel):
pass
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">
<label for="id" string="Requests Alias"/>
<div>
<field name="alias_manage" class="oe_inline"/>
<label for="equipment_alias_prefix" class="oe_inline"/>
<div attrs="{'invisible': [('alias_manage', '=', False)]}">
<field name="equipment_alias_prefix" class="oe_inline" attrs="{'required': [('alias_manage', '=', True)]}"/>@
<div>
<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"/>
</div>
</div>
+57
View File
@@ -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>
<separator string="Recruitment"/>
<group>
<label for="id" string="Settings"/>
<label for="module_document"/>
<div>
<field name="module_document" class="oe_inline"/>
<label for="module_document"/>
<field name="module_document" widget="radio"/>
</div>
</group>
<group>
<div attrs="{'invisible': [('alias_domain', '=', False)]}">
<label string="Default job email address"/>
<field name="alias_prefix" class="oe_inline" attrs="{'required': [('alias_domain', '!=', False)]}"/>
@
<field name="alias_domain" class="oe_inline" readonly="1"/>
</div>
</group>
</form>
</field>
+4 -2
View File
@@ -8,8 +8,10 @@ class MassMailingConfiguration(osv.TransientModel):
_inherit = 'res.config.settings'
_columns = {
'group_mass_mailing_campaign': fields.boolean(
'Manage Mass Mailing using Campaign',
'group_mass_mailing_campaign': fields.selection([
(0, "Do not organize and schedule mail campaigns (easy)"),
(1, "Allow using marketing campaigns (advanced)")
], "Campaigns",
implied_group='mass_mailing.group_mass_mailing_campaign',
help="""Manage mass mailign using Campaigns"""),
}
+2 -3
View File
@@ -14,10 +14,9 @@
</header>
<separator string="Mass Mailing"/>
<group>
<label for="id" string="Settings"/>
<label for="group_mass_mailing_campaign"/>
<div>
<field name="group_mass_mailing_campaign" class="oe_inline"/>
<label for="group_mass_mailing_campaign"/>
<field name="group_mass_mailing_campaign" widget="radio"/>
</div>
</group>
</form>
+26 -8
View File
@@ -9,7 +9,16 @@ class mrp_config_settings(osv.osv_memory):
_inherit = 'res.config.settings'
_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'
'* Add/remove products in the reparation\n'
'* Impact for stocks\n'
@@ -18,23 +27,32 @@ class mrp_config_settings(osv.osv_memory):
'* Repair quotation report\n'
'* Notes for the technician and for the final customer.\n'
'-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'
'-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'
'Without this module: A + B + C -> D.\n'
'With this module: A + B + C -> D + E.\n'
'-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',
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 '
'that will define the required raw materials.'),
'group_mrp_properties': fields.boolean("Allow several bill of materials per products using properties",
implied_group='product.group_mrp_properties',
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."""),
'group_rounding_efficiency': fields.boolean("Manage rounding and efficiency of BoM components",
'group_rounding_efficiency': fields.selection([
(0, "No rounding and efficiency on bills of materials"),
(1, "Manage rounding and efficiency of bills of materials components")
], "Rounding efficiency",
implied_group='mrp.group_rounding_efficiency',
help="""Allow to manage product rounding on quantity and product efficiency during production process"""),
}
+22 -34
View File
@@ -25,48 +25,36 @@
</header>
<separator string="Manufacturing Order"/>
<group>
<label for="id" string="Order"/>
<label for="group_product_variant"/>
<div>
<div>
<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>
<field name="group_product_variant" widget="radio"/>
</div>
</group>
<group >
<label for="id" string="Planning"/>
<label for="module_mrp_byproduct"/>
<div>
<div>
<field name="group_mrp_routings" class="oe_inline"/>
<label for="group_mrp_routings"/>
</div>
<div>
<field name="module_mrp_operations" class="oe_inline"/>
<label for="module_mrp_operations" />
</div>
<field name="module_mrp_byproduct" widget="radio"/>
</div>
<label for="module_mrp_repair"/>
<div>
<field name="module_mrp_repair" widget="radio"/>
</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>
</group>
<separator string="Master Data"/>
<group >
<label for="id" string="Products"/>
<label for="group_rounding_efficiency"/>
<div>
<div>
<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>
<field name="group_rounding_efficiency" widget="radio"/>
</div>
</group>
</form>
-7
View File
@@ -157,13 +157,6 @@ class note_note(osv.osv):
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):
_name = 'res.users'
_inherit = ['res.users']
-21
View File
@@ -139,27 +139,6 @@
</field>
</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 -->
<record model="ir.actions.act_window" id="action_note_note">
<field name="name">Notes</field>
+1 -1
View File
@@ -25,5 +25,5 @@ Use for update your text memo in real time with the following user that you invi
],
'installable': True,
'application': False,
'auto_install': False,
'auto_install': True,
}
+12 -3
View File
@@ -5,10 +5,19 @@ class pos_configuration(osv.TransientModel):
_name = 'pos.config.settings'
_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'),
'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'),
'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'),
}
+12 -13
View File
@@ -13,20 +13,19 @@
</header>
<separator string="Point of Sale"/>
<group>
<label for="id" string="Extensions"/>
<label for="module_pos_restaurant"/>
<div>
<div>
<field name="module_pos_restaurant" class="oe_inline"/>
<label for="module_pos_restaurant"/>
</div>
<div>
<field name="module_pos_loyalty" class="oe_inline"/>
<label for="module_pos_loyalty"/>
</div>
<div>
<field name="module_pos_discount" class="oe_inline"/>
<label for="module_pos_discount"/>
</div>
<field name="module_pos_restaurant" widget="radio"/>
</div>
<label for="module_pos_loyalty"/>
<div>
<field name="module_pos_loyalty" widget="radio"/>
</div>
<label for="module_pos_discount"/>
<div>
<field name="module_pos_discount" widget="radio"/>
</div>
</group>
</form>
+1 -1
View File
@@ -27,5 +27,5 @@ In that case, you can not use priorities any more on the different picking.
'demo': [],
'test': ['test/procurement_jit.yml'],
'installable': True,
'auto_install': False,
'auto_install': True,
}
-9
View File
@@ -15,15 +15,6 @@
</div>
</div>
</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>
</record>
+30 -27
View File
@@ -9,52 +9,55 @@ class project_configuration(osv.osv_memory):
_inherit = 'res.config.settings'
_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. '
'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'
'-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 '
'(for example: http://ietherpad.com/).\n'
'-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 '
'the timesheet line entries for particular date and user, with the effect of creating, '
'editing and deleting either ways.\n'
'-This installs the module project_timesheet.'),
'module_project_issue': fields.boolean("Track issues and bugs",
help='Provides management of issues/bugs in projects.\n'
'-This installs the module project_issue.'),
'module_rating_project': fields.boolean('Allow customers to rate provided services',
'module_rating_project': fields.selection([
(0, "No customer rating"),
(1, 'Allow activating customer rating on projects, at issue completion')
], "Rating",
help="This allows customers to give rating on provided services"),
'time_unit': fields.many2one('product.uom', 'Working time unit', required=True,
help='This will set the unit of measure used in projects and tasks.\n'
'Changing the unit will only impact new entries.'),
'module_project_issue_sheet': fields.boolean("Invoice working time on issues",
'module_project_issue_sheet': fields.selection([
(0, "Do not track working hours on issues"),
(1, "Activate timesheets on issues")
], "Timesheets Invoicing",
help='Provides timesheet support for the issues/bugs management in project.\n'
'-This installs the module project_issue_sheet.'),
'group_tasks_work_on_tasks': fields.boolean("Log work activities on tasks",
implied_group='project.group_tasks_work_on_tasks',
help="Allows you to compute work on tasks."),
'group_time_work_estimation_tasks': fields.boolean("Manage time estimation on tasks",
'group_time_work_estimation_tasks': fields.selection([
(0, "Do not estimate working time on tasks"),
(1, "Manage time estimation on tasks")
], "Time Work Estimation",
implied_group='project.group_time_work_estimation_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."),
}
def get_default_time_unit(self, cr, uid, fields, context=None):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
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:
def onchange_time_estimation_project_timesheet(self, cr, uid, ids, group_time_work_estimation_tasks):
if group_time_work_estimation_tasks:
return {'value': {'group_tasks_work_on_tasks': True}}
return {}
+16 -49
View File
@@ -25,65 +25,32 @@
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
</header>
<separator string="Project Management"/>
<group>
<label for="id" string="Task"/>
<group name="project_management">
<label for="module_sale_service"/>
<div>
<div>
<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>
<field name="module_sale_service" widget="radio"/>
</div>
</group>
<group>
<label for="id" string="Planning"/>
<label for="module_pad"/>
<div>
<div>
<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>
<field name="module_pad" widget="radio"/>
</div>
</group>
<group>
<label for="id" string="Communication"/>
<label for="group_time_work_estimation_tasks"/>
<div>
<div>
<field name="generate_project_alias" class="oe_inline"/>
<label for="generate_project_alias" />
</div>
<field name="group_time_work_estimation_tasks" on_change="onchange_time_estimation_project_timesheet(group_time_work_estimation_tasks)" widget="radio"/>
</div>
</group>
<separator string="Helpdesk &amp; Support"/>
<group>
<label for="id" string="Support"/>
<label for="module_rating_project"/>
<div>
<div>
<field name="module_project_issue" class="oe_inline"/>
<label for="module_project_issue"/>
</div>
<div>
<field name="module_rating_project" class="oe_inline"/>
<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>
<field name="module_rating_project" widget="radio"/>
</div>
<label for="module_project_issue_sheet"/>
<div>
<field name="module_project_issue_sheet" widget="radio"/>
</div>
</group>
</form>
+1
View File
@@ -3,3 +3,4 @@
import project_timesheet
import report
import res_config
+2 -1
View File
@@ -16,13 +16,14 @@ with the effect of creating, editing and deleting either ways.
'author': 'OpenERP SA',
'website': 'https://www.odoo.com/page/project-management',
'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': [
'security/ir.model.access.csv',
'security/project_timesheet_security.xml',
'report/project_report_view.xml',
'project_timesheet_view.xml',
'project_dashboard.xml',
'res_config_view.xml',
],
'demo': ['project_timesheet_demo.xml'],
'test': [
+18
View File
@@ -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>
+33 -19
View File
@@ -9,40 +9,54 @@ class purchase_config_settings(osv.osv_memory):
_inherit = 'res.config.settings'
_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(
[('manual', 'Control vendor bill on purchase order line'),
('picking', 'Control vendor bill on incoming shipments'),
('order', 'Control vendor bill on a pregenerated draft invoice'),
], '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',
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.'),
'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',
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',
help="""Allows you to compute product cost price based on average cost."""),
'module_warning': fields.boolean("Alerts by products or vendor",
help='Allow to configure notification on products and trigger them when a user wants to purchase a given product or a given vendor.\n'
'Example: Product: this product is deprecated, do not purchase more than 5.\n'
'Vendor: don\'t forget to ask for an express delivery.'),
'module_purchase_double_validation': fields.boolean("Force two levels of approvals",
'module_purchase_double_validation': fields.selection([
(0, 'Confirm purchase orders in one step'),
(1, 'Get 2 levels of approvals to confirm a purchase order')
], "Levels of Approvals",
help='Provide a double validation mechanism for purchases exceeding minimum amount.\n'
'-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.
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."""),
'group_advance_purchase_requisition': fields.boolean("Choose from several bids in a call for tenders",
implied_group='purchase.group_advance_bidding',
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."""),
'group_analytic_account_for_purchases': fields.boolean('Analytic accounting for purchases',
implied_group='purchase.group_analytic_accounting',
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'
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."""),
'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'
'-This installs the module stock_dropshipping.'),
}
+27 -41
View File
@@ -32,55 +32,41 @@
</group>
<separator string="Purchase Order"/>
<group>
<label for="id" string="Vendor Features"/>
<label for="group_product_variant"/>
<div>
<div>
<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>
<field name="group_product_variant" widget="radio"/>
</div>
</group>
<group>
<label for="id" string="Purchase Order"/>
<label for="group_purchase_pricelist"/>
<div>
<div>
<field name="group_uom" class="oe_inline"/>
<label for="group_uom"/>
</div>
<div>
<field name="group_costing_method" class="oe_inline"/>
<label for="group_costing_method"/>
</div>
<div name="module_purchase_double_validation">
<field name="module_purchase_double_validation" class="oe_inline"/>
<label for="module_purchase_double_validation"/>
</div>
<div>
<field name="module_purchase_requisition" class="oe_inline"/>
<label for="module_purchase_requisition"/>
</div>
<div attrs="{'invisible': [('module_purchase_requisition', '=', False)]}">
<field name="group_advance_purchase_requisition" class="oe_inline"/>
<label for="group_advance_purchase_requisition"/>
</div>
<div>
<field name="group_analytic_account_for_purchases" class="oe_inline"/>
<label for="group_analytic_account_for_purchases"/>
</div>
<field name="group_purchase_pricelist" widget="radio"/>
</div>
<label for="group_uom"/>
<div>
<field name="group_uom" widget="radio"/>
</div>
<label for="group_costing_method"/>
<div>
<field name="group_costing_method" widget="radio"/>
</div>
<label for="module_purchase_double_validation"/>
<div name="module_purchase_double_validation">
<field name="module_purchase_double_validation" widget="radio"/>
</div>
<label for="module_purchase_requisition"/>
<div>
<field name="module_purchase_requisition" widget="radio"/>
</div>
</group>
<separator string="Location &amp; Warehouse"/>
<group>
<label for="id" string="Routes"/>
<label for="module_stock_dropshipping"/>
<div>
<div>
<field name="module_stock_dropshipping" class="oe_inline"/>
<label for="module_stock_dropshipping"/>
</div>
<field name="module_stock_dropshipping" widget="radio"/>
</div>
</group>
</form>
@@ -10,7 +10,7 @@
<div name="module_purchase_double_validation" position="inside">
<span class="oe_separate-from-text">
<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>
</div>
</field>
+45 -55
View File
@@ -13,77 +13,67 @@ class sale_configuration(osv.TransientModel):
_inherit = 'sale.config.settings'
_columns = {
'timesheet': fields.boolean('Prepare invoices based on timesheets',
help='For modifying account analytic view to show important data to project manager of services companies.'
'You can also view the report of account analytic summary user-wise as well as month wise.\n'
'-This installs the module sale_contract.'),
'module_sale_contract': fields.boolean('Use contracts management',
'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_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 '
'method (fixed price, on timesheet, advance invoice), the exact pricing '
'(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'
'-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',
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."""),
'group_uom':fields.boolean("Allow using different units of measure",
Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
'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',
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",
implied_group='sale.group_discount_per_so_line',
help="Allows you to apply some discount per sales order line."),
'group_display_incoterm':fields.boolean("Display incoterms on the printed sale orders and invoices reports",
'group_discount_per_so_line': fields.selection([
(0, 'No discount on sales order lines, global discount only'),
(1, 'Allow discounts on sales order lines')
], "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',
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",
help='Allow to configure notification on products and trigger them when a user wants to sell a given product or a given customer.\n'
'Example: Product: this product is deprecated, do not purchase more than 5.\n'
'Vendor: don\'t forget to ask for an express delivery.'),
'module_sale_margin': fields.boolean("Display margins on sales orders",
help='This adds the \'Margin\' on sales order.\n'
'This gives the profitability by calculating the difference between the Unit Price and Cost Price.\n'
'-This installs the module sale_margin.'),
'module_sale_layout': fields.boolean("Allow to categorize sale order lines",
help='Allows to create categories to structure lines in pdf reports.\n'
'-This installs the module sale_layout.'),
'module_website_quote': fields.boolean("Allow online quotations and templates",
help='This adds the online quotation'),
'module_sale_journal': fields.boolean("Allow batch invoicing of delivery orders through journals",
help='Allows you to categorize your sales and deliveries (picking lists) between different journals, '
'and perform batch operations on journals.\n'
'-This installs the module sale_journal.'),
'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."),
'module_sale_margin': fields.selection([
(0, 'Salespeople do not need to view margins when quoting'),
(1, 'Display margins on quotations and sales orders')
], "Margins"),
'module_website_sale_digital': fields.selection([
(0, 'No digital products'),
(1, 'Allows to sell downloadable content from the portal')
], "Digital Products"),
'module_website_quote': fields.selection([
(0, 'Print quotes or send by email'),
(1, 'Send online quotations based on templates (advanced)')
], "Online Quotations"),
'group_sale_delivery_address': fields.selection([
(0, "Invoicing and shipping addresses are always the same (Example: services companies)"),
(1, 'Have 3 fields on sales orders: customer, invoice address, delivery address')
], "Customer Addresses",
implied_group='sale.group_delivery_invoice_address'),
}
def set_sale_defaults(self, cr, uid, ids, context=None):
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):
_inherit = 'account.config.settings'
_columns = {
+44 -88
View File
@@ -6,102 +6,58 @@
<field name="model">sale.config.settings</field>
<field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
<field name="arch" type="xml">
<div name="customer feature" position="before">
<separator string="Invoicing Process"/>
<group>
<label for="id" string="Invoicing Process"/>
<div id="main" position="inside">
<group string="Products">
<label for="group_product_variant"/>
<div>
<div name="timesheet">
<field name="timesheet" class="oe_inline" on_change="onchange_timesheet(timesheet)"/>
<label for="timesheet"/>
</div>
<field name="group_product_variant" widget="radio"/>
</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>
</group>
<group name='default_options' invisible="1">
<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"/>
<group string="Quotations &amp; Sales" id="sale">
<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>
<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>
<field name="group_sale_pricelist" widget="radio"/>
</div>
</group>
</group>
<div name="Sale Features" position="inside">
<div name="module_website_quote">
<field name="module_website_quote" class="oe_inline"/>
<label for="group_sale_delivery_address"/>
<div>
<field name="group_sale_delivery_address" widget="radio"/>
</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"/>
</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>
<field name="module_sale_contract" on_change="onchange_timesheet(module_sale_contract)" class="oe_inline"/>
<label for="module_sale_contract"/>
</div>
<div name="module_analytic_user_function" attrs="{'invisible':[('module_sale_contract','=',False)]}">
<field name="module_analytic_user_function" class="oe_inline"/>
<label for="module_analytic_user_function"/>
</div>
<field name="module_website_quote" widget="radio"/>
</div>
<label for="module_sale_margin"/>
<div>
<field name="module_sale_margin" widget="radio"/>
</div>
</group>
<group string="Contracts" id="contract">
<label for="module_sale_contract"/>
<div>
<field name="module_sale_contract" widget="radio"/>
</div>
</group>
</div>
+5 -23
View File
@@ -9,27 +9,9 @@ class sale_configuration(osv.osv_memory):
_inherit = 'sale.config.settings'
_columns = {
'group_template_required': fields.boolean("Mandatory use of templates.",
implied_group='sale_contract.group_template_required',
help="Allows you to set the template field as required when creating an analytic account or a contract."),
'time_unit': fields.many2one('product.uom', 'The default working time unit.'),
'group_template_required': fields.selection([
(0, "Optional contract templates"),
(1, "Force setting a contract templates for every contract")
], "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="inherit_id" ref="sale.view_sales_config"/>
<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>
<field name="group_template_required" class="oe_inline"/>
<label for="group_template_required"/>
<field name="group_template_required" widget="radio"/>
</div>
</xpath>
</field>
+2 -2
View File
@@ -29,10 +29,10 @@ completed.
""",
'author': 'OpenERP SA',
'website': 'https://www.odoo.com/page/crm',
'depends': ['project', 'procurement', 'sale', 'procurement_jit'],
'depends': ['project', 'sale'],
'data': ['views/sale_service_view.xml'],
'demo': ['demo/sale_service_demo.xml'],
'test': ['test/project_task_procurement.yml'],
'installable': True,
'auto_install': False,
'auto_install': True,
}
+22 -35
View File
@@ -10,49 +10,40 @@ class sale_configuration(osv.osv_memory):
_inherit = 'sale.config.settings'
_columns = {
'group_invoice_deli_orders': fields.boolean('Generate invoices after and based on delivery orders',
implied_group='sale_stock.group_invoice_deli_orders',
help="To allow your salesman to make invoices for Delivery Orders using the menu 'Deliveries to Invoice'."),
'task_work': fields.boolean("Prepare invoices based on task's activities",
help='Lets you transfer the entries under tasks defined for Project Management to '
'the Timesheet line entries for particular date and particular user with the effect of creating, editing and deleting either ways '
'and to automatically creates project tasks from procurement lines.\n'
'-This installs the modules project_timesheet and sale_service.'),
'default_order_policy': fields.selection(
[('manual', 'Create invoice on sales order'), ('picking', 'Create invoice on deliveries')],
'The default invoicing method is', default_model='sale.order',
help="You can generate invoices based on sales orders or based on shippings."),
'module_delivery': fields.boolean('Allow adding shipping costs',
help='Allows you to add delivery methods in sales orders and delivery orders.\n'
'You can define your own carrier and delivery grids for prices.\n'
'-This installs the module delivery.'),
'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',
'default_order_policy': fields.selection([
('manual', 'Invoice based on sales order'),
('picking', 'Invoice based on delivery orders')],
'Invoicing Method', default_model='sale.order'),
'module_delivery': fields.selection([
(0, 'No shipping costs on sales orders'),
(1, 'Allow adding shipping costs')
], "Shipping"),
'default_picking_policy' : fields.selection([
(0, 'Ship products when some are available, and allow back orders'),
(1, 'Ship all products at once, without back orders')
], "Default Shipping Policy"),
'group_mrp_properties': fields.selection([
(0, "Don't use manufacturing properties (recommended as its easier)"),
(1, 'Allow setting manufacturing order properties per order line (avanced)')
], "Properties on SO Lines",
implied_group='sale.group_mrp_properties',
help="Allows you to tag sales order lines with properties."),
'module_project_timesheet': fields.boolean("Project Timesheet"),
'module_sale_service': fields.boolean("Sale Service"),
'group_route_so_lines': fields.boolean('Choose MTO, drop shipping,... on sales order lines',
implied_group='sale_stock.group_route_so_lines',
help="Allows you to choose a delivery route on sales order lines"),
'group_route_so_lines': fields.selection([
(0, 'No order specific routes like MTO or drop shipping'),
(1, 'Choose specific routes on sales order lines (advanced)')
], "Order Routing",
implied_group='sale_stock.group_route_so_lines'),
}
_defaults = {
'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):
ir_values = self.pool.get('ir.values')
default_picking_policy = ir_values.get_default(cr, uid, 'sale.order', 'picking_policy')
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):
@@ -66,7 +57,3 @@ class sale_configuration(osv.osv_memory):
res = super(sale_configuration, self).set_sale_defaults(cr, uid, ids, context)
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'}}
+22 -37
View File
@@ -7,48 +7,33 @@
<field name="inherit_id" ref="sale.view_sales_config"/>
<field name="arch" type="xml">
<data>
<xpath expr="//div[@name='timesheet']" position="before">
<div>
<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"/>
<xpath expr="//div[@id='main']" position="inside">
<group string="Shipping">
<label for="module_delivery"/>
</div>
</xpath>
<group name='default_options' position="after">
<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"/>
<div>
<field name="module_delivery" widget="radio"/>
</div>
<label for="default_picking_policy"/>
</div>
</div>
<div name='module_sale_journal' position="before">
<div name='default_picking_policy'>
<field name="default_picking_policy" widget="radio"/>
</div>
</group>
</xpath>
<xpath expr="//group[@id='sale']" position="inside">
<label for="default_order_policy"/>
<div>
<field name="group_mrp_properties" class="oe_inline"/>
<label for="group_mrp_properties"/>
<field name="default_order_policy" widget="radio"/>
</div>
</div>
<xpath expr="//div[@name='Sale Features']" position="inside">
<label for="group_route_so_lines"/>
<div>
<field name="group_route_so_lines" class="oe_inline"/>
<label for="group_route_so_lines"/>
<field name="group_route_so_lines" widget="radio"/>
</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>
</xpath>
</data>
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<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">
<field name="name">Enable Route on Sales Order Line</field>
<field name="category_id" ref="base.module_category_hidden"/>
+1 -1
View File
@@ -18,7 +18,7 @@
groups="base.group_sale_salesman"
parent="base.menu_base_partner" sequence="5" />
<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">
<field name="name">stock.location.route.form</field>
+1
View File
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import sales_team
+69 -20
View File
@@ -71,58 +71,107 @@ class stock_config_settings(osv.osv_memory):
return True
_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),
'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.
All procurement orders will be processed immediately, which could in some
cases entail a small performance impact.
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'
'-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.
The following dates can be tracked:
- end of life
- best before date
- removal date
- alert date.
This installs the module product_expiry."""),
'group_uom': fields.boolean("Manage different units of measure for products",
The following dates can be tracked:
- end of life
- best before date
- removal date
- alert date.
This installs the module product_expiry."""),
'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',
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',
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.'),
'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',
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',
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',
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',
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',
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",
implied_group='stock.group_single_location',
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',
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."),
'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'
'-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_calendar': fields.boolean('Manage minimum stock rules according to the purchase and delivery calendars',
'module_stock_picking_wave': fields.selection([
(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.'),
}
+74 -70
View File
@@ -24,89 +24,93 @@
</header>
<separator string="Traceability"/>
<group name="traceability">
<label for="id" string="Traceability"/>
<label for="group_stock_production_lot"/>
<div>
<div>
<field name="group_stock_production_lot" class="oe_inline"/>
<label for="group_stock_production_lot"/>
</div>
<div attrs="{'invisible': [('group_stock_production_lot','=',False)]}">
<field name="module_product_expiry" class="oe_inline"/>
<label for="module_product_expiry"/>
</div>
<div>
<field name="group_stock_tracking_lot" class="oe_inline"/>
<label for="group_stock_tracking_lot"/>
</div>
<div>
<field name="group_stock_tracking_owner" class="oe_inline"/>
<label for="group_stock_tracking_owner"/>
</div>
</div>
<field name="group_stock_production_lot" widget="radio"/>
</div>
<label for="module_product_expiry" attrs="{'invisible': [('group_stock_production_lot','=',0)]}"/>
<div attrs="{'invisible': [('group_stock_production_lot','=', 0)]}">
<field name="module_product_expiry" widget="radio"/>
</div>
<label for="group_stock_tracking_lot"/>
<div>
<field name="group_stock_tracking_lot" widget="radio"/>
</div>
<label for="group_stock_tracking_owner"/>
<div>
<field name="group_stock_tracking_owner" widget="radio"/>
</div>
</group>
<separator string="Location &amp; Warehouse"/>
<group>
<label for="id" string="Logistic"/>
<label for="group_product_variant"/>
<div>
<div>
<field name="module_procurement_jit" class="oe_inline"/>
<label for="module_procurement_jit"/>
</div>
<div>
<field name="group_stock_multiple_locations" class="oe_inline"/>
<label for="group_stock_multiple_locations"/>
</div>
<div>
<field name="group_stock_adv_location" class="oe_inline" on_change="onchange_adv_location(group_stock_adv_location)"/>
<label for="group_stock_adv_location"/>
</div>
<div attrs="{'invisible': [('group_stock_adv_location', '=', False)]}">
<label for="propagation_minimum_delta"/>
<field name="propagation_minimum_delta" class="oe_inline"/>
</div>
<field name="group_product_variant" widget="radio"/>
</div>
<label for="module_procurement_jit"/>
<div>
<field name="module_procurement_jit" widget="radio"/>
</div>
<label for="group_stock_multiple_locations"/>
<div>
<field name="group_stock_multiple_locations" widget="radio"/>
</div>
<label for="group_stock_adv_location"/>
<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>
</group>
<group>
<label for="id" string="Products"/>
<div>
<label for="id" string="Products" groups="base.group_no_one"/>
<div groups="base.group_no_one">
<div>
<field name="group_stock_packaging" class="oe_inline"/>
<label for="group_stock_packaging"/>
</div>
<div>
<label for="decimal_precision"/>
<field name="decimal_precision" class="oe_inline"/>
</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>
</group>
<group>
<label for="id" string="Additional Features"/>
<div>
<div>
<field name="module_claim_from_delivery" class="oe_inline"/>
<label for="module_claim_from_delivery"/>
</div>
<div>
<field name="module_stock_dropshipping" class="oe_inline"/>
<label for="module_stock_dropshipping"/>
</div>
<div>
<field name="module_stock_picking_wave" class="oe_inline"/>
<label for="module_stock_picking_wave"/>
</div>
<div>
<field name="module_stock_calendar" class="oe_inline"/>
<label for="module_stock_calendar"/>
</div>
</div>
<label for="group_stock_packaging"/>
<div>
<field name="group_stock_packaging" widget="radio"/>
</div>
<label for="group_uom"/>
<div>
<field name="group_uom" widget="radio"/>
</div>
<label for="group_uos"/>
<div>
<field name="group_uos" widget="radio"/>
</div>
<label for="module_claim_from_delivery"/>
<div>
<field name="module_claim_from_delivery" widget="radio"/>
</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>
</form>
</field>
+12 -3
View File
@@ -9,14 +9,23 @@ class stock_config_settings(osv.osv_memory):
_inherit = 'stock.config.settings'
_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',
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 '
'to be invoiced when you send or deliver goods.\n'
'-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."""),
}
+13 -14
View File
@@ -8,21 +8,20 @@
<xpath expr="//group[@name='traceability']" position="after">
<separator string="Accounting"/>
<group>
<label for="id" string="Accounting"/>
<label for="module_stock_landed_costs"/>
<div>
<div>
<field name="group_stock_inventory_valuation" class="oe_inline"/>
<label for="group_stock_inventory_valuation"/>
</div>
<div>
<field name="module_stock_invoice_directly" class="oe_inline"/>
<label for="module_stock_invoice_directly"/>
</div>
<div>
<field name="module_stock_landed_costs" on_change="onchange_landed_costs(module_stock_landed_costs)" class="oe_inline"/>
<label for="module_stock_landed_costs"/>
</div>
</div>
<field name="module_stock_landed_costs" widget="radio" on_change="onchange_landed_costs(module_stock_landed_costs)"/>
</div>
<label for="group_stock_inventory_valuation"/>
<div>
<field name="group_stock_inventory_valuation" widget="radio"/>
</div>
<label for="module_stock_invoice_directly"/>
<div>
<field name="module_stock_invoice_directly" widget="radio"/>
</div>
</group>
</xpath>
</field>
-8
View File
@@ -1,13 +1,5 @@
# -*- encoding: utf-8 -*-
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):
_inherit = 'website.config.settings'
-20
View File
@@ -1,25 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<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">
<field name="name">website.config.settings.form.inherit</field>
<field name="model">website.config.settings</field>
+7 -1
View File
@@ -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
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
that starts with 'set_'; such methods can be defined to implement the effect
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'):
field_groups = getattr(field, 'group', 'base.group_user').split(',')
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:])])
record = ir_module.browse(cr, uid, mod_ids[0], context) if mod_ids else None
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
for name, module in classified['module']:
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_'
for method in dir(self):