[Merge]: lp:~openerp-dev/openobject-addons/trunk-bugfixes-Ind.
authorrch-openerp <rch@tinyerp.com>
Wed, 20 Apr 2011 10:50:56 +0000 (16:20 +0530)
committerrch-openerp <rch@tinyerp.com>
Wed, 20 Apr 2011 10:50:56 +0000 (16:20 +0530)
bzr revid: rch@tinyerp.com-20110420105056-ixxjvf6o1rdy25op

45 files changed:
addons/account/account.py
addons/account/account_view.xml
addons/account/wizard/account_report_aged_partner_balance.py
addons/account/wizard/account_report_common.py
addons/account/wizard/account_report_common_account.py
addons/account/wizard/account_report_general_ledger.py
addons/account/wizard/account_report_partner_ledger.py
addons/account/wizard/account_report_print_journal.py
addons/account/wizard/account_vat.py
addons/account_budget/report/budget_report.py
addons/account_budget/report/crossovered_budget_report.py
addons/account_payment/account_payment.py
addons/account_voucher/account_voucher.py
addons/base_calendar/base_calendar.py
addons/base_calendar/wizard/base_calendar_invite_attendee.py
addons/base_module_doc_rst/report/report_proximity_graph.py
addons/caldav/wizard/caldav_browse_view.xml
addons/crm/crm.py
addons/crm/crm_meeting_view.xml
addons/crm/crm_opportunity_view.xml
addons/crm/crm_view.xml
addons/crm/wizard/crm_lead_to_opportunity.py
addons/crm/wizard/crm_opportunity_to_phonecall_view.xml
addons/crm/wizard/crm_partner_to_opportunity_view.xml
addons/crm/wizard/crm_phonecall_to_opportunity.py
addons/crm/wizard/crm_phonecall_to_phonecall_view.xml
addons/crm_claim/crm_claim_view.xml
addons/event/event.py
addons/hr_attendance/hr_attendance.py
addons/hr_contract/hr_contract_view.xml
addons/hr_evaluation/hr_evaluation_view.xml
addons/hr_holidays/hr_holidays.py
addons/hr_holidays/hr_holidays_view.xml
addons/hr_recruitment/hr_recruitment_view.xml
addons/idea/idea.py
addons/idea/idea_view.xml
addons/mrp/mrp_view.xml
addons/point_of_sale/point_of_sale.py
addons/point_of_sale/wizard/pos_box_out.py
addons/procurement/procurement.py
addons/project_scrum/project_scrum_view.xml
addons/purchase/purchase.py
addons/resource/resource_view.xml
addons/sale/sale.py
addons/stock/security/ir.model.access.csv

index c11d739..7504170 100644 (file)
@@ -2146,8 +2146,8 @@ class account_model_line(osv.osv):
     _description = "Account Model Entries"
     _columns = {
         'name': fields.char('Name', size=64, required=True),
-        'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the resources from lower sequences to higher ones"),
-        'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Account'), help="The optional quantity on entries"),
+        'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the resources from lower sequences to higher ones."),
+        'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Account'), help="The optional quantity on entries."),
         'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),
         'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),
         'account_id': fields.many2one('account.account', 'Account', required=True, ondelete="cascade"),
@@ -2156,7 +2156,7 @@ class account_model_line(osv.osv):
         'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency."),
         'currency_id': fields.many2one('res.currency', 'Currency'),
         'partner_id': fields.many2one('res.partner', 'Partner'),
-        'date_maturity': fields.selection([('today','Date of the day'), ('partner','Partner Payment Term')], 'Maturity date', help="The maturity date of the generated entries for this model. You can choose between the creation date or the creation date of the entries plus the partner payment terms."),
+        'date_maturity': fields.selection([('today','Date of the day'), ('partner','Partner Payment Term')], 'Maturity Date', help="The maturity date of the generated entries for this model. You can choose between the creation date or the creation date of the entries plus the partner payment terms."),
     }
     _order = 'sequence'
     _sql_constraints = [
index bab2f43..e0a355c 100644 (file)
                             </group>
                             <group colspan="2" col="2" groups="base.group_extended">
                                 <separator string="Sequence" colspan="4"/>
-                                <field name="sequence_id" required="0"/>
+                                <field name="sequence_id"/>
                             </group>
                         </page>
                         <page string="Entry Controls" groups="base.group_extended">
index 59784e6..4e6c6de 100644 (file)
@@ -31,7 +31,7 @@ class account_aged_trial_balance(osv.osv_memory):
     _description = 'Account Aged Trial balance Report'
 
     _columns = {
-        'period_length':fields.integer('Period length (days)', required=True),
+        'period_length':fields.integer('Period Length (days)', required=True),
         'direction_selection': fields.selection([('past','Past'),
                                                  ('future','Future')],
                                                  'Analysis Direction', required=True),
index 7a8a036..42153c0 100644 (file)
@@ -30,11 +30,11 @@ class account_common_report(osv.osv_memory):
     _description = "Account Common Report"
 
     _columns = {
-        'chart_account_id': fields.many2one('account.account', 'Chart of account', help='Select Charts of Accounts', required=True, domain = [('parent_id','=',False)]),
-        'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal year', help='Keep empty for all open fiscal year'),
+        'chart_account_id': fields.many2one('account.account', 'Chart of Account', help='Select Charts of Accounts', required=True, domain = [('parent_id','=',False)]),
+        'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', help='Keep empty for all open fiscal year'),
         'filter': fields.selection([('filter_no', 'No Filters'), ('filter_date', 'Date'), ('filter_period', 'Periods')], "Filter by", required=True),
-        'period_from': fields.many2one('account.period', 'Start period'),
-        'period_to': fields.many2one('account.period', 'End period'),
+        'period_from': fields.many2one('account.period', 'Start Period'),
+        'period_to': fields.many2one('account.period', 'End Period'),
         'journal_ids': fields.many2many('account.journal', 'account_common_journal_rel', 'account_id', 'journal_id', 'Journals', required=True),
         'date_from': fields.date("Start Date"),
         'date_to': fields.date("End Date"),
index 7205a9e..0040d56 100644 (file)
@@ -28,7 +28,7 @@ class account_common_account_report(osv.osv_memory):
     _columns = {
         'display_account': fields.selection([('bal_all','All'), ('bal_movement','With movements'),
                                             ('bal_solde','With balance is not equal to 0'),
-                                            ],'Display accounts', required=True),
+                                            ],'Display Accounts', required=True),
 
     }
     _defaults = {
index c08894b..1e17a66 100644 (file)
@@ -28,10 +28,10 @@ class account_report_general_ledger(osv.osv_memory):
 
     _columns = {
         'landscape': fields.boolean("Landscape Mode"),
-        'initial_balance': fields.boolean("Include initial balances",
+        'initial_balance': fields.boolean("Include Initial Balances",
                                           help='It adds initial balance row on report which display previous sum amount of debit/credit/balance'),
         'amount_currency': fields.boolean("With Currency", help="It adds the currency column if the currency is different then the company currency"),
-        'sortby': fields.selection([('sort_date', 'Date'), ('sort_journal_partner', 'Journal & Partner')], 'Sort By', required=True),
+        'sortby': fields.selection([('sort_date', 'Date'), ('sort_journal_partner', 'Journal & Partner')], 'Sort by', required=True),
     }
     _defaults = {
         'landscape': True,
index 1a09a63..590ba80 100644 (file)
@@ -30,10 +30,10 @@ class account_partner_ledger(osv.osv_memory):
     _description = 'Account Partner Ledger'
 
     _columns = {
-        'initial_balance': fields.boolean('Include initial balances',
+        'initial_balance': fields.boolean('Include Initial Balances',
                                     help='It adds initial balance row on report which display previous sum amount of debit/credit/balance'),
         'reconcil': fields.boolean('Include Reconciled Entries', help='Consider reconciled entries'),
-        'page_split': fields.boolean('One Partner Per Page', help='Display Ledger Report with One partner per page'),
+        'page_split': fields.boolean('One Partner per Page', help='Display Ledger Report with One partner per page'),
         'amount_currency': fields.boolean("With Currency", help="It adds the currency column if the currency is different then the company currency"),
 
     }
index b1ca30d..f4a5fca 100644 (file)
@@ -29,7 +29,7 @@ class account_print_journal(osv.osv_memory):
     _columns = {
         'sort_selection': fields.selection([('date', 'Date'),
                                             ('ref', 'Reference Number'),],
-                                            'Entries Sorted By', required=True),
+                                            'Entries Sorted by', required=True),
     }
     _defaults = {
         'sort_selection': 'date',
index 3aecfb0..186f79c 100644 (file)
@@ -28,7 +28,7 @@ class account_vat_declaration(osv.osv_memory):
     _columns = {
         'based_on': fields.selection([('invoices', 'Invoices'),
                                       ('payments', 'Payments'),],
-                                      'Based On', required=True),
+                                      'Based on', required=True),
         'chart_tax_id': fields.many2one('account.tax.code', 'Chart of Tax', help='Select Charts of Taxes', required=True, domain = [('parent_id','=', False)]),
     }
 
index 8b98b06..7681f92 100644 (file)
@@ -67,6 +67,8 @@ class budget_report(report_sxw.rml_parse):
 
             context = {'wizard_date_from': d_from, 'wizard_date_to': d_to}
             for i in range(0, len(an_ids)):
+                if not an_ids[i][0]:
+                    continue
                 analytic_name = acc_analytic_obj.browse(self.cr, self.uid, [an_ids[i][0]])
                 res={
                     'b_id': '-1',
index 8a3b745..b70b7da 100644 (file)
@@ -72,6 +72,8 @@ class budget_report(report_sxw.rml_parse):
 
             context = {'wizard_date_from': d_from, 'wizard_date_to': d_to}
             for i in range(0, len(an_ids)):
+                if not an_ids[i][0]:
+                    continue
                 analytic_name = acc_analytic_obj.browse(self.cr, self.uid, [an_ids[i][0]])
                 res={
                     'b_id': '-1',
index f3259f8..8437622 100644 (file)
@@ -328,7 +328,7 @@ class payment_line(osv.osv):
             required=True, help='Payment amount in the partner currency'),
         'currency': fields.many2one('res.currency','Partner Currency', required=True),
         'company_currency': fields.many2one('res.currency', 'Company Currency', readonly=True),
-        'bank_id': fields.many2one('res.partner.bank', 'Destination Bank account'),
+        'bank_id': fields.many2one('res.partner.bank', 'Destination Bank Account'),
         'order_id': fields.many2one('payment.order', 'Order', required=True,
             ondelete='cascade', select=True),
         'partner_id': fields.many2one('res.partner', string="Partner", required=True, help='The Ordering Customer'),
index 9bfee8b..b4422cd 100644 (file)
@@ -379,6 +379,8 @@ class account_voucher(osv.osv):
             account_id = partner.property_account_payable.id
             tr_type = 'purchase'
         else:
+            if not journal.default_credit_account_id or not journal.default_debit_account_id:
+                raise osv.except_osv(_('Error !'), _('Please define default credit/debit account on the %s !') % (journal.name))
             account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
             tr_type = 'receipt'
 
index 9693a0d..095a165 100644 (file)
@@ -1296,7 +1296,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
                         if name == "UNTIL":
                             is_until = True
                             value = parser.parse(value)
-                            rrule_until_date = parser.parse(value.strftime("%Y-%m-%d"))
+                            rrule_until_date = parser.parse(value.strftime("%Y-%m-%d %H:%M:%S"))
                             if until_date and until_date >= rrule_until_date:
                                 until_date = rrule_until_date
                             if until_date:
index ea4d5ac..59bde61 100644 (file)
@@ -140,7 +140,7 @@ send an Email to Invited Person')
                 if not mail_to:
                     name =  map(lambda x: x[1], filter(lambda x: type==x[0], \
                                        self._columns['type'].selection))
-                    raise osv.except_osv(_('Error!'), ("%s must have an email  Address to send mail") %(name[0]))
+                    raise osv.except_osv(_('Error!'), ("%s must have an email  address to send mail") %(name[0]))
                 att_obj._send_mail(cr, uid, attendees, mail_to, \
                        email_from = current_user.user_email or tools.config.get('email_from', False))
 
index 2d3704f..d14d709 100644 (file)
@@ -48,7 +48,7 @@ class report_graph(report.interface.report_int):
                     if id:
                         get_dpend_module(id[0].id)
         get_dpend_module(module_id)
-        graph = pydot.Dot(graph_type='digraph',fontsize='10', label="\\nProximity Graph. \\n\\nGray Color:Official Modules, Red  Color:Extra Addons Modules, Blue Color:Community Modules, Purple Color:Unknow Modules"
+        graph = pydot.Dot(graph_type='digraph',fontsize='10', label="\\nProximity Graph. \\n\\nGray Color-Official Modules, Red  Color-Extra Addons Modules, Blue Color-Community Modules, Purple Color-Unknow Modules"
                                      , center='1')
         for node in nodes:
             if node[1] == "official":
index 0a7e626..53af602 100644 (file)
                         <separator string="Description" colspan="4"/>
                         <field name="description"  colspan="4"  nolabel="1"/>
                         <separator colspan="4"/>
-                       
-                        
+                      <group col="4" colspan="4">
+                        <label string="" colspan="2"/>
+                        <button special="cancel" string="_Close" icon="gtk-close"/>
+                      </group>
                     </group>
                 </form>
             </field>
index f25e4c1..7014fd7 100644 (file)
@@ -199,6 +199,13 @@ class crm_case(object):
         user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
         return user.context_section_id.id or False
 
+    def unlink(self, cr, uid, ids, context={}):
+        for case in self.browse(cr, uid, ids, context):
+            if (not case.section_id.allow_unlink) and (case.state <> 'draft'):
+                raise osv.except_osv(_('Warning !'),
+                    _('You can not delete this case. You should better cancel it.'))
+        return super(crm_case, self).unlink(cr, uid, ids, context)
+
     def _find_next_stage(self, cr, uid, stage_list, index, current_seq, stage_pool, context=None):
         if index + 1 == len(stage_list):
             return False
index aba6988..baa022a 100644 (file)
@@ -44,7 +44,7 @@
                     <field name="alarm_id" string="Reminder"
                         widget="selection" />
                     <group colspan="2" col="4" attrs="{'readonly': ['|', ('recurrent_uid','!=',False), ('state','=','done')]}">
-                           <field name="recurrency"/>
+                           <field name="recurrency" help="Is Meeting is occurring frequently or repeatedly?"/>
                            <field name="edit_all" attrs="{'invisible':[('recurrency','=', False)]}"
                                 on_change="onchange_edit_all(rrule_type,edit_all)"/>
                     </group>
                             <tree string="Invitation details" editable="top">
                                 <field name="sent_by_uid" string="From"/>
                                 <field name="user_id" string="To"/>
-                                <field name="email" string="Mail TO"/>
+                                <field name="email" string="Mail To"/>
                                 <field name="role" select="1" />
                                 <field name="state" />
                                 <button name="do_tentative"
                                 <field name="count" attrs="{'invisible' : [('end_type', '!=', 'count')] }"/>
                                 <label string=" " colspan="2" />
                                 <newline />
-                                <field name="end_date" attrs="{'invisible' : [('end_type', '!=', 'end_date')] }"/>
+                                <field name="end_date" attrs="{'invisible' : [('end_type', '!=', 'end_date')], 'required': [('end_type', '=', 'end_date')]}"/>
                                 <newline />
                            
                       
index b49edb8..0ab4c10 100644 (file)
                             </group>
                         </page>
 
+                                               <page string="Extra Info" groups="base.group_extended">
+                            <group col="2" colspan="2">
+                                <separator string="Dates" colspan="2"/>
+                                <field name="create_date"/>
+                                <field name="write_date"/>
+                                <field name="date_closed"/>
+                                <field name="date_open"/>
+                            </group>
+                            <group col="2" colspan="2">
+                                <separator string="Misc" colspan="2"/>
+                                <field name="active"/>
+                                <field name="day_open"/>
+                                <field name="day_close"/>
+                                <field name="referred"/>
+                            </group>
+                            <separator colspan="4" string="References"/>
+                            <field name="ref"/>
+                            <field name="ref2"/>
+                        </page>
+
                         <page string="Communication &amp; History" groups="base.group_extended">
                             <group colspan="4">
                                 <field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/>
                                 context="{'mail':'new', 'model': 'crm.lead'}"
                                 icon="terp-mail-message-new" type="action" />
                         </page>
-                        <page string="Extra Info" groups="base.group_extended">
-                            <group col="2" colspan="2">
-                                <separator string="Dates" colspan="2"/>
-                                <field name="create_date"/>
-                                <field name="write_date"/>
-                                <field name="date_closed"/>
-                                <field name="date_open"/>
-                            </group>
-                            <group col="2" colspan="2">
-                                <separator string="Misc" colspan="2"/>
-                                <field name="active"/>
-                                <field name="day_open"/>
-                                <field name="day_close"/>
-                                <field name="referred"/>
-                            </group>
-                            <separator colspan="4" string="References"/>
-                            <field name="ref"/>
-                            <field name="ref2"/>
-                        </page>
+
                         </notebook>
                     </form>
                 </field>
                         <button name="case_close" string="Won"
                             states="open,draft,pending" type="object"
                             icon="gtk-apply" />
+                        <button name="case_cancel" string="Lost"
+                            states="open,draft,pending" type="object"
+                            icon="gtk-cancel" />
                     </tree>
                 </field>
             </record>
index 685019a..cc9005d 100644 (file)
@@ -3,7 +3,7 @@
     <data>
 
         <menuitem icon="terp-partner" id="base.menu_base_partner" name="Sales" sequence="0" 
-            groups="base.group_sale_manager,base.group_sale_salesman,base.group_partner_manager"/>
+            groups="base.group_sale_manager,base.group_sale_salesman"/>
 
         <menuitem id="base.menu_crm_config_lead" name="Leads &amp; Opportunities"
             parent="base.menu_base_config" sequence="1" groups="base.group_sale_manager"/>
index 33ec426..4b6e047 100644 (file)
@@ -105,7 +105,7 @@ class crm_lead2opportunity_partner(osv.osv_memory):
 
         for lead in lead_obj.browse(cr, uid, context.get('active_ids', []), context=context):
             if lead.state in ['done', 'cancel']:
-                raise osv.except_osv(_("Warning !"), _("Closed/Cancelled Leads Could not convert into Opportunity"))
+                raise osv.except_osv(_("Warning !"), _("Closed/Cancelled Leads can not be converted into Opportunity"))
         return False
 
     def _convert(self, cr, uid, ids, lead, partner_id, stage_ids, context=None):
index 23ddaad..9a623d2 100644 (file)
@@ -16,7 +16,7 @@
                     <newline/>
                     <field name="user_id" />
                     <field name="section_id" widget="selection" />
-                    <field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
+                    <field name="categ_id" string="Type" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
                     <separator string="" colspan="4"/>
                     <group colspan="4">
                         <label string ="" colspan="2"/>
index 7ceb9bc..762303f 100644 (file)
@@ -8,7 +8,7 @@
           <field name="model">crm.partner2opportunity</field>
           <field name="type">form</field>
           <field name="arch" type="xml">
-              <form string="Convert To Opportunity">
+              <form string="Create Opportunity">
             <field name="name"/>
             <field name="partner_id"/>
             <newline/>
index 98e3c97..32810d2 100644 (file)
@@ -55,7 +55,7 @@ class crm_phonecall2opportunity(osv.osv_memory):
         case = phonecall_obj.browse(cr, uid, record_id, context=context)
         if case.state in ['done', 'cancel']:
                 raise osv.except_osv(_("Warning"), _("Closed/Cancelled Phone \
-Call Could not convert into Opportunity"))
+Call can not be converted into Opportunity"))
 
 
     def action_apply(self, cr, uid, ids, context=None):
index 34a0d2c..82c3191 100644 (file)
@@ -15,7 +15,7 @@
                         <field name="date" string="Planned Date"/>
                         <field name="user_id" />
                         <field name="section_id"/>
-                        <field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
+                        <field name="categ_id" string="Type" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
                         <separator string=" " colspan="4"/>
                         <group colspan="4" col="3" >
                             <label string=" " />
index 63df2c3..00d7128 100644 (file)
                                 <group colspan="4">
                                     <field colspan="4" name="email_cc" string="Global CC" widget="char"/>
                                 </group>
-                                <field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
+                                <field name="message_ids" colspan="4" nolabel="1" mode="tree,form" readonly="1">
                                     <tree string="History">
                                         <field name="display_text" string="History Information"/>
+                                        <field name="history" invisible="1"/>
                                         <button
                                             string="Reply"
                                             name="%(crm.action_crm_send_mail)d"
index f4f7c49..4d39268 100644 (file)
@@ -205,12 +205,12 @@ class event_event(osv.osv):
         'child_ids': fields.one2many('event.event', 'parent_id', 'Child Events', readonly=False, states={'done': [('readonly', True)]}),
         'reply_to': fields.char('Reply-To', size=64, readonly=False, states={'done': [('readonly', True)]}, help="The email address put in the 'Reply-To' of all emails sent by OpenERP"),
         'type': fields.many2one('event.type', 'Type', help="Type of Event like Seminar, Exhibition, Conference, Training.", readonly=False, states={'done': [('readonly', True)]}),
-        'register_max': fields.integer('Maximum Registrations', help="Provide Maximun Number of Registrations", readonly=True, states={'draft': [('readonly', False)]}),
-        'register_min': fields.integer('Minimum Registrations', help="Providee Minimum Number of Registrations", readonly=True, states={'draft': [('readonly', False)]}),
+        'register_max': fields.integer('Maximum Registrations', help="Provide Maximum Number of Registrations", readonly=True, states={'draft': [('readonly', False)]}),
+        'register_min': fields.integer('Minimum Registrations', help="Provide Minimum Number of Registrations", readonly=True, states={'draft': [('readonly', False)]}),
         'register_current': fields.function(_get_register, method=True, string='Confirmed Registrations', multi='register_current',
             help="Total of Open and Done Registrations"),
         'register_prospect': fields.function(_get_register, method=True, string='Unconfirmed Registrations', multi='register_prospect',
-            help="Total of Prospect Registrati./event/event.py:41:ons"),
+            help="Total of Prospect Registrations"),
         'registration_ids': fields.one2many('event.registration', 'event_id', 'Registrations', readonly=False, states={'done': [('readonly', True)]}),
         'date_begin': fields.datetime('Beginning date', required=True, help="Beginning Date of Event", readonly=True, states={'draft': [('readonly', False)]}),
         'date_end': fields.datetime('Closing date', required=True, help="Closing Date of Event", readonly=True, states={'draft': [('readonly', False)]}),
@@ -221,15 +221,15 @@ class event_event(osv.osv):
             ('cancel', 'Cancelled')],
             'State', readonly=True, required=True,
             help='If event is created, the state is \'Draft\'.If event is confirmed for the particular dates the state is set to \'Confirmed\'. If the event is over, the state is set to \'Done\'.If event is cancelled the state is set to \'Cancelled\'.'),
-        'mail_auto_registr': fields.boolean('Mail Auto Register', readonly=False, states={'done': [('readonly', True)]}, help='Check this box if you want to use the automatic mailing for new registration'),
-        'mail_auto_confirm': fields.boolean('Mail Auto Confirm', readonly=False, states={'done': [('readonly', True)]}, help='Check this box if you want ot use the automatic confirmation emailing or the reminder'),
+        'mail_auto_registr': fields.boolean('Mail Auto Register', readonly=False, states={'done': [('readonly', True)]}, help='Check this box if you want to use automatic emailing for new registration.'),
+        'mail_auto_confirm': fields.boolean('Mail Auto Confirm', readonly=False, states={'done': [('readonly', True)]}, help='Check this box if you want to use automatic confirmation emailing or reminder.'),
         'mail_registr': fields.text('Registration Email', readonly=False, states={'done': [('readonly', True)]}, help='This email will be sent when someone subscribes to the event.'),
-        'mail_confirm': fields.text('Confirmation Email', readonly=False, states={'done': [('readonly', True)]}, help="This email will be sent when the event gets confimed or when someone subscribes to a confirmed event. This is also the email sent to remind someone about the event."),
+        'mail_confirm': fields.text('Confirmation Email', readonly=False, states={'done': [('readonly', True)]}, help="This email will be sent when the event gets confirmed or when someone subscribes to a confirmed event. This is also the email sent to remind someone about the event."),
         'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="The invoices of this event registration will be created with this Product. Thus it allows you to set the default label and the accounting info you want by default on these invoices."),
         'note': fields.text('Notes', help="Description or Summary of Event", readonly=False, states={'done': [('readonly', True)]}),
         'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', readonly=True, states={'draft': [('readonly', False)]}, help="Pricelist version for current event."),
-        'unit_price': fields.related('product_id', 'list_price', type='float', string='Registration Cost', readonly=True, states={'draft':[('readonly',False)]}, help="This will be the default price used as registration cost when invoicing this event. Note that you can specify for each registration a specific amount if you want to", digits_compute=dp.get_precision('Sale Price')),
-        'main_speaker_id': fields.many2one('res.partner','Main Speaker', readonly=False, states={'done': [('readonly', True)]}, help="Speaker who are giving speech on event."),
+        'unit_price': fields.related('product_id', 'list_price', type='float', string='Registration Cost', readonly=True, states={'draft':[('readonly',False)]}, help="This will be the default price used as registration cost when invoicing this event. Note that you can specify a specific amount for each registration.", digits_compute=dp.get_precision('Sale Price')),
+        'main_speaker_id': fields.many2one('res.partner','Main Speaker', readonly=False, states={'done': [('readonly', True)]}, help="Speaker who will be giving speech at the event."),
         'speaker_ids': fields.many2many('res.partner', 'event_speaker_rel', 'speaker_id', 'partner_id', 'Other Speakers', readonly=False, states={'done': [('readonly', True)]}),
         'address_id': fields.many2one('res.partner.address','Location Address', readonly=False, states={'done': [('readonly', True)]}),
         'speaker_confirmed': fields.boolean('Speaker Confirmed', readonly=False, states={'done': [('readonly', True)]}),
index 7699e74..8c5648a 100644 (file)
@@ -29,7 +29,7 @@ class hr_action_reason(osv.osv):
     _description = "Action Reason"
     _columns = {
         'name': fields.char('Reason', size=64, required=True, help='Specifies the reason for Signing In/Signing Out.'),
-        'action_type': fields.selection([('sign_in', 'Sign in'), ('sign_out', 'Sign out')], "Action's type"),
+        'action_type': fields.selection([('sign_in', 'Sign in'), ('sign_out', 'Sign out')], "Action Type"),
     }
     _defaults = {
         'action_type': 'sign_in',
@@ -137,7 +137,7 @@ class hr_employee(osv.osv):
 
             res = {'action': type, 'employee_id': emp['id']}
             if dt:
-                res['name'] = dt   
+                res['name'] = dt
         id = obj_attendance.create(cr, uid, res, context=context)
 
         if type != 'action':
index 67607af..524ef5f 100644 (file)
                         <separator colspan="2" string="Advantages"/>
                         <field name="advantages_net"/>
                         <field name="advantages_gross"/>
+                        <separator colspan="2" string="Advantages Notes"/>
                         <field name="advantages" nolabel="1" colspan="2"/>
                         </group>
                         <separator colspan="4" string="Notes"/>
index 27b3ba5..46d5cf5 100644 (file)
             <field name="arch" type="xml">
                 <search string="Search Evaluation">
                    <group col='10' colspan='4'>
-                    <filter icon="terp-check" string="Current" domain="[('state','=','wait'))]" help="Evaluations that are in waiting state"/>
+                    <filter icon="terp-check" string="Current" domain="[('state','=','wait')]" help="Evaluations that are in waiting state"/>
                     <filter icon="terp-camera_test" string="In progress" domain="[('state','=','progress')]" help="Evaluations that are in progress state"/>
                     <separator orientation="vertical"/>
                     <filter icon="terp-go-week" string="7 Days" help="Evaluations to close within the next 7 days"
index 131d38d..340aea6 100644 (file)
@@ -113,16 +113,18 @@ class hr_holidays(osv.osv):
         'name': fields.char('Description', required=True, size=64),
         'state': fields.selection([('draft', 'Draft'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
             ('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')],
-            'State', readonly=True, help='When the holiday request is created the state is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the state is \'Waiting Approval\'.\
-            If the admin accepts it, the state is \'Approved\'. If it is refused, the state is \'Refused\'.'),
+            'State', readonly=True, help='The state is set to \'Draft\', when a holiday request is created.\
+            \nThe state is \'Waiting Approval\', when holiday request is confirmed by user.\
+            \nThe state is \'Refused\', when holiday request is refused by manager.\
+            \nThe state is \'Approved\', when holiday request is approved by manager.'),
         'user_id':fields.related('employee_id', 'user_id', type='many2one', relation='res.users', string='User', store=True),
         'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}),
         'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)]}),
         'holiday_status_id': fields.many2one("hr.holidays.status", "Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}),
         'employee_id': fields.many2one('hr.employee', "Employee", select=True, invisible=False, readonly=True, states={'draft':[('readonly',False)]}, help='Leave Manager can let this field empty if this leave request/allocation is for every employee'),
-        #'manager_id': fields.many2one('hr.employee', 'Leave Manager', invisible=False, readonly=True, help='This area is automaticly filled by the user who validate the leave'),
+        #'manager_id': fields.many2one('hr.employee', 'Leave Manager', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'),
         #'notes': fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}),
-        'manager_id': fields.many2one('hr.employee', 'First Approval', invisible=False, readonly=True, help='This area is automaticly filled by the user who validate the leave'),
+        'manager_id': fields.many2one('hr.employee', 'First Approval', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'),
         'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)]}),
         'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)]}),
         'number_of_days': fields.function(_compute_number_of_days, method=True, string='Number of Days', store=True),
@@ -133,7 +135,7 @@ class hr_holidays(osv.osv):
         'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
         'category_id': fields.many2one('hr.employee.category', "Category", help='Category of Employee'),
         'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Category')], 'Allocation Type', help='By Employee: Allocation/Request for individual Employee, By Employee Category: Allocation/Request for group of employees in category', required=True),
-        'manager_id2': fields.many2one('hr.employee', 'Second Approval', readonly=True, help='This area is automaticly filled by the user who validate the leave with second level (If Leave type need second validation)')
+        'manager_id2': fields.many2one('hr.employee', 'Second Approval', readonly=True, help='This area is automatically filled by the user who validate the leave with second level (If Leave type need second validation)')
     }
     _defaults = {
         'employee_id': _employee_get,
@@ -144,8 +146,8 @@ class hr_holidays(osv.osv):
     }
     _sql_constraints = [
         ('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "You have to select an employee or a category"),
-        ('date_check', "CHECK ( number_of_days_temp > 0 )", "The number of days must be greater than 0 !"),
-        ('date_check2', "CHECK ( (type='add') OR (date_from < date_to))", "The start date must be before the end date !")
+        ('date_check2', "CHECK ( (type='add') OR (date_from <= date_to))", "The start date must be before the end date !"),
+        ('date_check', "CHECK ( number_of_days_temp >= 0 )", "The number of days must be greater than 0 !"),
     ]
 
     def _create_resource_leave(self, cr, uid, vals, context=None):
@@ -217,6 +219,7 @@ class hr_holidays(osv.osv):
         })
         wf_service = netsvc.LocalService("workflow")
         for id in ids:
+            wf_service.trg_delete(uid, 'hr.holidays', id, cr)
             wf_service.trg_create(uid, 'hr.holidays', id, cr)
         return True
 
index 7740470..ed062a3 100644 (file)
@@ -93,7 +93,7 @@
                             <newline/>
                             <field name="state" colspan="2"/>
                             <group colspan="2" col="6">
-                                <button string="Refuse" name="refuse" states="confirm" type="workflow" icon="gtk-no" groups="base.group_hr_user,base.group_hr_manager"/>
+                                <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user,base.group_hr_manager"/>
                                 <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
                                 <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/>
                                 <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/>
index ee7c9d6..a9a05a4 100644 (file)
                     <page string="Job Info">
                         <group col="3" colspan="2">
                             <separator colspan="3" string="Contact"/>
-                            <field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" />
+                            <field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" attrs="{'readonly':[('state','not in','done')]}"/>
                             <button string="Create Partner"
                                     name="%(action_hr_recruitment_partner_create)d"
-                                    icon="gtk-index" type="action" attrs="{'readonly':[('partner_id','!=',False)]}" groups="base.group_partner_manager"/>
+                                    icon="gtk-index" type="action" attrs="{'readonly':['!',('partner_id','!=',False),('state','not in','done')]}" groups="base.group_partner_manager"/>
                             <newline/>
-                            <field name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="3"/>
-                            <field name="email_from" colspan="3"/>
-                            <field name="partner_phone" colspan="3"/>
-                            <field name="partner_mobile" colspan="3"/>
+                            <field name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="3" attrs="{'readonly':[('state','not in','done')]}"/>
+                            <field name="email_from" colspan="3" attrs="{'readonly':[('state','not in','done')]}"/>
+                            <field name="partner_phone" colspan="3" attrs="{'readonly':[('state','not in','done')]}"/>
+                            <field name="partner_mobile" colspan="3" attrs="{'readonly':[('state','not in','done')]}"/>
                         </group>
                         <group col="2" colspan="2">
                             <separator colspan="2" string="Contract Data"/>
                         <separator colspan="4" string="Status"/>
                         <group col="8" colspan="4">
                             <field name="state"/>
-                            <button name="case_cancel" string="Refused" states="draft,open,pending" type="object" icon="gtk-cancel"/>
+                            <button name="case_cancel" string="Refuse" states="draft,open,pending" type="object" icon="gtk-cancel"/>
                             <button name="case_open" string="In Progress" states="draft,pending" type="object" icon="gtk-go-forward"/>
                             <button name="case_pending" string="Pending" states="open" type="object" icon="gtk-media-pause"/>
-                            <button name="%(action_hr_recruitment_hired_employee)d" string="Hired" states="open,pending" type="action" icon="terp-partner"/>
+                            <button name="%(action_hr_recruitment_hired_employee)d" string="Hire" states="open,pending" type="action" icon="terp-partner"/>
                             <button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/>
                         </group>
                    </page>
index deda3ab..04ae4df 100644 (file)
@@ -31,11 +31,28 @@ DefaultVoteValue = '50'
 class idea_category(osv.osv):
     """ Category of Idea """
 
+    def name_get(self, cr, uid, ids, context=None):
+        if not len(ids):
+            return []
+        reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
+        res = []
+        for record in reads:
+            name = record['name']
+            if record['parent_id']:
+                name = record['parent_id'][1]+' / '+name
+            res.append((record['id'], name))
+        return res
+
+    def _categ_name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
+        res = self.name_get(cr, uid, ids, context=context)
+        return dict(res)
+
     _name = "idea.category"
     _description = "Idea Category"
 
     _columns = {
         'name': fields.char('Category', size=64, required=True),
+        'complete_name': fields.function(_categ_name_get_fnc, method=True, type="char", string='Name'),
         'summary': fields.text('Summary'),
         'parent_id': fields.many2one('idea.category', 'Parent Categories', ondelete='set null'),
         'child_ids': fields.one2many('idea.category', 'parent_id', 'Child Categories'),
@@ -46,6 +63,10 @@ class idea_category(osv.osv):
     ]
     _order = 'parent_id,name asc'
 
+    _constraints = [
+        (osv.osv._check_recursion, 'Error ! You can not create recursive categories.', ['parent_id'])
+    ]
+
 idea_category()
 
 class idea_idea(osv.osv):
index 493fda2..e4cfa4e 100644 (file)
@@ -46,7 +46,7 @@
             <field name="field_parent">child_ids</field>
             <field name="arch" type="xml">
                 <tree string="Category of ideas">
-                    <field name="name"/>
+                    <field name="complete_name"/>
                     <field name="parent_id" invisible="1"/>
                 </tree>
             </field>
                         <field name="count_votes" />
                     </group>
                     <field name="stat_vote_ids" colspan="4" mode="graph,tree" nolabel="1">
-                        <graph string="Vots Statistics" type="bar">
+                        <graph string="Votes Statistics" type="bar">
                             <field name="score"/>
                             <field name="nbr"/>
                         </graph>
-                        <tree string="Vots Statistics">
+                        <tree string="Votes Statistics">
                             <field name="score"/>
                             <field name="nbr"/>
                         </tree>
index 1ac1170..48c136d 100644 (file)
                         <field name="date_planned"/>
                         <field name="origin"/>
                         <newline/>
-                        <field name="product_id" on_change="product_id_change(product_id)"/>
+                        <field name="product_id" on_change="product_id_change(product_id)" domain="[('type','=','product')]"/>
                         <field name="product_qty"/>
                         <field name="product_uom"/>
                         <button type="action"
index a2123cb..78ff3de 100644 (file)
@@ -267,7 +267,7 @@ class pos_order(osv.osv):
         'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True),
         'price_type': fields.selection([
                                 ('tax_excluded','Tax excluded')],
-                                 'Price method', required=True),
+                                 'Price Method', required=True),
         'statement_ids': fields.one2many('account.bank.statement.line', 'pos_statement_id', 'Payments', states={'draft': [('readonly', False)]}, readonly=True),
         'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),
         'partner_id': fields.many2one('res.partner', 'Customer', change_default=True, select=1, states={'draft': [('readonly', False)], 'paid': [('readonly', False)]}),
@@ -427,11 +427,13 @@ class pos_order(osv.osv):
         pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out')
         orders = self.browse(cr, uid, ids, context=context)
         for order in orders:
+            addr = self.pool.get('res.partner').address_get(cr, uid, [order.partner_id.id], ['delivery'])
             if not order.picking_id:
                 new = True
                 picking_id = picking_obj.create(cr, uid, {
                     'name': pick_name,
                     'origin': order.name,
+                    'address_id': addr.get('delivery',False),
                     'type': 'out',
                     'state': 'draft',
                     'move_type': 'direct',
index a05c5f5..f5a7078 100644 (file)
@@ -94,9 +94,9 @@ class pos_box_out(osv.osv_memory):
                 val = (res_obj.browse(cr, uid, uid).company_id.max_diff or 0.0) + am
                 raise osv.except_osv(_('Error !'), _('The maximum value you can still withdraw is exceeded. \n Remaining value is equal to %d ')%(val))
 
-            acc_id = product_obj.browse(cr, uid, data['product_id'], context=context).property_account_income
+            acc_id = productp_obj.browse(cr, uid, data['product_id'], context=context).property_account_income
             if not acc_id:
-                raise osv.except_osv(_('Error !'), _('please check that account is set to %s')%(product_obj.browse(cr, uid, data['product_id'], context=context).name))
+                raise osv.except_osv(_('Error !'), _('please check that account is set to %s')%(productp_obj.browse(cr, uid, data['product_id'], context=context).name))
             if not statement_id:
                 raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox'))
             if statement_id:
@@ -119,7 +119,7 @@ class pos_box_out(osv.osv_memory):
             if productp_obj.browse(cr, uid, data['product_id'], context=context).am_out:
                 vals['am_out'] = True
             vals['ref'] = data['ref'] or ''
-            vals['name'] = "%s: %s " % (product_obj.browse(cr, uid, data['product_id'], context=context).name, data['name'].decode('utf8'))
+            vals['name'] = "%s: %s " % (productp_obj.browse(cr, uid, data['product_id'], context=context).name, data['name'].decode('utf8'))
             address_u = res_obj.browse(cr, uid, uid, context=context).address_id
             if address_u:
                 vals['partner_id'] = address_u.partner_id and address_u.partner_id.id or None
index 3257f0a..1f808f2 100644 (file)
@@ -512,13 +512,13 @@ class stock_warehouse_orderpoint(osv.osv):
         'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type','=','product')]),
         'product_uom': fields.many2one('product.uom', 'Product UOM', required=True),
         'product_min_qty': fields.float('Min Quantity', required=True,
-            help="When the virtual stock goes belong the Min Quantity, OpenERP generates "\
+            help="When the virtual stock goes below the Min Quantity specified for this field, OpenERP generates "\
             "a procurement to bring the virtual stock to the Max Quantity."),
         'product_max_qty': fields.float('Max Quantity', required=True,
-            help="When the virtual stock goes belong the Max Quantity, OpenERP generates "\
-            "a procurement to bring the virtual stock to the Max Quantity."),
+            help="When the virtual stock goes below the Min Quantity, OpenERP generates "\
+            "a procurement to bring the virtual stock to the Quantity specified as Max Quantity."),
         'qty_multiple': fields.integer('Qty Multiple', required=True,
-            help="The procurement quantity will by rounded up to this multiple."),
+            help="The procurement quantity will be rounded up to this multiple."),
         'procurement_id': fields.many2one('procurement.order', 'Latest procurement', ondelete="set null"),
         'company_id': fields.many2one('res.company','Company',required=True),
         'procurement_draft_ids': fields.function(_get_draft_procurements, method=True, type='many2many', relation="procurement.order", \
index 82c19c0..99b7415 100644 (file)
@@ -63,7 +63,7 @@
                         <field domain="[('project_id','=',project_id), ('state','in', ['draft','open'])]" name="sprint_id" select="1"/>
                                        <button name="%(action_postpone_wizard)d" string="Postpone" type="action"
                                                        help="Postpone backlog" colspan="2"
-                         icon="gtk-convert"  attrs="{'invisible':[('state','=','done')]}"/>
+                         icon="gtk-convert"  attrs="{'invisible':[('state','in',['done', 'cancel'])]}"/>
                         <field name="user_id" select="1"/>
                         <field name="sequence" groups="base.group_extended"/>
                         <field name="create_date"/>
index 6f6ab0c..324fe13 100644 (file)
@@ -98,7 +98,7 @@ class purchase_order(osv.osv):
             tot = 0.0
             for invoice in purchase.invoice_ids:
                 if invoice.state not in ('draft','cancel'):
-                    tot += invoice.amount_untaxed
+                    tot += (invoice.amount_untaxed - invoice.residual)
             if purchase.amount_untaxed:
                 res[purchase.id] = tot * 100.0 / purchase.amount_untaxed
             else:
index 7663a5a..424955d 100644 (file)
                        </group>
                        <group colspan="2" col="2">
                            <field name="date_from"/>
-                           <field name="calendar_id" string="Working Period" readonly='1'/>
+                           <field name="calendar_id" string="Working Period"/>
                            <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                        </group>
                        <group colspan="2" col="2">
index f80d610..4bb8bc7 100644 (file)
@@ -1180,12 +1180,14 @@ class sale_config_picking_policy(osv.osv_memory):
         'picking_policy': fields.selection([
             ('direct', 'Direct Delivery'),
             ('one', 'All at Once')
-        ], 'Picking Default Policy', required=True, help="The Shipping Policy is used to configure per order if you want to deliver as soon as possible when one product is available or you wait that all products are available.."),
+        ], 'Picking Default Policy', required=True, help="If you are sure that you have enough stock to send complete order at once please select 'All at Once'. If you want to send the order in the partial shipments please select 'Direct Delivery'..."),
         'order_policy': fields.selection([
             ('manual', 'Invoice Based on Sales Orders'),
             ('picking', 'Invoice Based on Deliveries'),
         ], 'Shipping Default Policy', required=True,
-           help="You can generate invoices based on sales orders or based on shippings."),
+           help="""The Shipping Policy is used to synchronise invoice and delivery operations.
+        - The "Invoice Based on Sales Orders" choice will create the picking order directly and wait for the user to manually click on the 'Invoice' button to generate the draft invoice.  
+        - The "Invoice Based on Deliveries" choice is used to create an invoice during the picking process."""),
         'step': fields.selection([
             ('one', 'Delivery Order Only'),
             ('two', 'Picking List & Delivery Order')
index 8c7c53e..68a210e 100644 (file)
@@ -3,6 +3,7 @@
 "access_stock_incoterms_manager","stock.incoterms manager","model_stock_incoterms","stock.group_stock_manager",1,1,1,1
 "access_stock_warehouse_manager","stock.warehouse.manager","model_stock_warehouse","stock.group_stock_manager",1,1,1,1
 "access_stock_warehouse_user","stock.warehouse.user","model_stock_warehouse","base.group_user",1,0,0,0
+"access_stock_location__partner_manager","stock.location.partner.manager","model_stock_location","base.group_partner_manager",1,1,1,1
 "access_stock_location_manager","stock.location.manager","model_stock_location","stock.group_stock_manager",1,1,1,1
 "access_stock_location_user","stock.location.user","model_stock_location","base.group_user",1,0,0,0
 "access_stock_journal_user","stock.journal.user","model_stock_journal","base.group_user",1,0,0,0