[MERGE] Merged with addons/trunk.

bzr revid: tde@openerp.com-20120917160657-3zjj4evb1ezgo94a
This commit is contained in:
Thibault Delavallée
2012-09-17 18:06:57 +02:00
17 changed files with 101 additions and 57 deletions
+1 -1
View File
@@ -304,7 +304,7 @@ class account_bank_statement(osv.osv):
'date': st_line.date,
'ref': st_line.ref,
'move_id': move_id,
'partner_id': partner_id,
'partner_id': par_id,
'account_id': acc_id,
'credit': credit,
'debit': debit,
+1 -1
View File
@@ -2537,7 +2537,7 @@ action = pool.get('res.config').next(cr, uid, [], context)
<header>
<button name="button_confirm_cash" states="open" string="Close CashBox" type="object" class="oe_highlight"/>
<button name="button_open" states="draft" string="Open CashBox" type="object" class="oe_highlight"/>
<button name="button_cancel" states="confirm,open" string="Cancel" type="object" groups="base.group_extended"/>
<button name="button_cancel" states="confirm,open" string="Cancel" type="object"/>
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</header>
<sheet string="Statement">
@@ -92,14 +92,14 @@ class account_move_journal(osv.osv_memory):
journal = False
if journal_id:
journal = journal_pool.read(cr, uid, [journal_id], ['name'])[0]['name']
journal = journal_pool.read(cr, uid, journal_id, ['name'], context=context).name
journal_string = _("Journal: %s") % tools.ustr(journal)
else:
journal_string = _("Journal: All")
period = False
if period_id:
period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name']
period = period_pool.browse(cr, uid, period_id, context=context).name
period_string = _("Period: %s") % tools.ustr(period)
open_string = _("Open")
+9 -2
View File
@@ -64,11 +64,13 @@ class ir_model_fields_anonymization(osv.osv):
state = 'anonymized' # all fields are anonymized
else:
state = 'unstable' # fields are mixed: this should be fixed
return state
def _check_write(self, cr, uid, context=None):
# check that the field is created from the menu and not from an database update
# otherwise the database update can crash:
if context.get('manual'):
global_state = self._get_global_state(cr, uid, context=context)
if global_state == 'anonymized':
@@ -100,12 +102,16 @@ class ir_model_fields_anonymization(osv.osv):
# check field state: all should be clear before we can add a new field to anonymize:
self._check_write(cr, uid, context=context)
global_state = self._get_global_state(cr, uid, context=context)
if 'field_name' in vals and vals['field_name'] and 'model_name' in vals and vals['model_name']:
vals['model_id'], vals['field_id'] = self._get_model_and_field_ids(cr, uid, vals, context=context)
# check not existing fields:
if not vals.get('field_id'):
vals['state'] = 'not_existing'
else:
vals['state'] = global_state
res = super(ir_model_fields_anonymization, self).create(cr, uid, vals, context=context)
@@ -340,8 +346,9 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
# remove the placeholer:
eview.remove(placeholder)
else:
# unstable ?
raise
msg = "The database anonymization is currently in an unstable state. Some fields are anonymized," + \
" while some fields are not anonymized. You should try to solve this problem before trying to do anything else."
raise osv.except_osv('Error !', msg)
res['arch'] = etree.tostring(eview)
+2 -2
View File
@@ -101,7 +101,7 @@
<field name="arch" type="xml">
<form string="Events" version="7.0">
<header>
<span groups="base.user_group">
<span groups="base.group_user">
<button string="Confirm Event" name="button_confirm" states="draft" type="object" class="oe_highlight"/>
<button string="Event Ended" name="button_done" states="confirm" type="object" class="oe_highlight"/>
<button string="Set To Draft" name="button_draft" states="cancel,done" type="object" />
@@ -166,7 +166,7 @@
<field name="nb_register" />
<field name="state"/>
<button name="registration_open" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
<button name="button_reg_close" string="Attented the Event" states="open" type="object" icon="gtk-jump-to"/>
<button name="button_reg_close" string="Attended the Event" states="open" type="object" icon="gtk-jump-to"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
</tree>
<form string="Registration">
+1 -1
View File
@@ -55,7 +55,7 @@ class hr_attendance(osv.osv):
'name': fields.datetime('Date', required=True, select=1),
'action': fields.selection([('sign_in', 'Sign In'), ('sign_out', 'Sign Out'), ('action','Action')], 'Action', required=True),
'action_desc': fields.many2one("hr.action.reason", "Action Reason", domain="[('action_type', '=', action)]", help='Specifies the reason for Signing In/Signing Out in case of extra hours.'),
'employee_id': fields.many2one('hr.employee', "Employee's Name", required=True, select=True),
'employee_id': fields.many2one('hr.employee', "Employee", required=True, select=True),
'day': fields.function(_day_compute, type='char', string='Day', store=True, select=1, size=32),
}
_defaults = {
@@ -13,7 +13,7 @@
product_id: product.product_product_consultant
journal_id: hr_timesheet.analytic_journal
-
I create my current timesheet for employee "Quentin Paolinon".
I create a timesheet for employee "Quentin Paolinon".
-
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
date_current: !eval time.strftime('%Y-%m-%d')
@@ -23,13 +23,17 @@
user_id: base.user_demo
employee_id: 'hr.employee_qdp'
-
Now, at the time of login, I create Attendances and perform "Sign In" action.
Quentin "Sign In" at around 9am.
-
!python {model: hr_timesheet_sheet.sheet}: |
self.attendance_action_change(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')], {})
task_work = self.search(cr, uid, [("name","=","Quentin Paolinon")],context)[0]
task_ids = self.browse(cr, uid, task_work, context)
assert task_ids.state == "draft", "I State In Timesheet"
!record {model: hr.attendance, id: hr_attendance_1}:
action: sign_in
employee_id: 'hr.employee_qdp'
name: !eval datetime.now().strftime('%Y-%m-%d 09:%M:%S')
-
I test that Quentin in signed in
-
!assert {model: hr.employee, id: hr.employee_qdp}:
- state == 'present'
-
I want to check attendance and work of yesterday. I click on <- button.
-
@@ -57,10 +61,10 @@
-
At the time of logout, I create attendance and perform "Sign Out".
-
!record {model: hr.attendance, id: hr_attendance_1}:
!record {model: hr.attendance, id: hr_attendance_2}:
action: sign_out
employee_id: 'hr.employee_qdp'
name: !eval (datetime.now() + timedelta(minutes=1)).strftime('%Y-%m-%d %H:%M:%S')
name: !eval datetime.now().strftime('%Y-%m-%d 17:30:00')
-
I create Timesheet Entry for time spend on today work.
-
@@ -103,10 +107,10 @@
general_account_id: account.a_expense
journal_id: hr_timesheet.analytic_journal
-
I set an allowed difference of 25 hours
I set an allowed difference of 1 hour
-
!record {model: res.company, id: base.main_company}:
timesheet_max_difference: 25.00
timesheet_max_difference: 1.00
-
I tried again to confirm the timesheet after modification.
-
+1 -1
View File
@@ -27,7 +27,7 @@ This is the base module to manage the accounting chart for Ecuador in OpenERP.
Accounting chart and localization for Ecuador.
""",
'author': 'OpenERP SA',
'author': 'Gnuthink Co.Ltd.',
'depends': [
'account',
'base_vat',
+1 -1
View File
@@ -7,7 +7,7 @@
<field name="description">Discussion about best sales practices and deals.</field>
</record>
<record model="mail.group" id="group_all_employees">
<field name="name">All Employees</field>
<field name="name">Whole Company</field>
<field name="group_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="description">Discussion about best sales practices and deals.</field>
</record>
+9 -2
View File
@@ -958,9 +958,16 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='procure_method']" position="after">
<field name="supply_method" groups="base.group_user"/>
<xpath expr="//field[@name='supply_method']" position="attributes">
<attribute name="invisible">False</attribute>
</xpath>
<group name="procurement_help" position="inside">
<p attrs="{'invisible': [('type','=','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','produce')]}">
When you sell this product, OpenERP will trigger <b>a manufacturing
order</b> using the bill of materials assigned to this product.
The delivery order will be ready once the production is done.
</p>
</group>
</field>
</record>
+6 -2
View File
@@ -314,9 +314,13 @@ class pos_session(osv.osv):
# define some cash journal if no payment method exists
if not pos_config.journal_ids:
cashids = self.pool.get('account.journal').search(cr, uid, [('journal_user', '=', True), ('type','=','cash')], context=context)
journal_proxy = self.pool.get('account.journal')
cashids = journal_proxy.search(cr, uid, [('journal_user', '=', True), ('type','=','cash')], context=context)
if not cashids:
cashids = self.pool.get('account.journal').search(cr, uid, [('journal_user','=',True)], context=context)
cashids = journal_proxy.search(cr, uid, [('type', '=', 'cash')], context=context)
if not cashids:
cashids = journal_proxy.search(cr, uid, [('journal_user','=',True)], context=context)
jobj.write(cr, uid, [pos_config.id], {'journal_ids': [(6,0, cashids)]})
+7 -6
View File
@@ -896,8 +896,8 @@
<field name="stop_at" attrs="{'invisible' : [('state', '!=', 'closed')]}"/>
</group>
<newline/>
<group string="Opening Cash Control" attrs="{'invisible' : ['|', ('cash_control', '=', False),('state', 'in', ('opened', 'closing_control'))]}">
<group string="Opening Cash Control" attrs="{'invisible' : [ '&amp;' ,'!', '&amp;', ('state', '=', 'opening_control'), ('cash_control', '=', True), ('state', '!=',
'closed')] }" >
<field name="opening_details_ids" nolabel="1" colspan="2" attrs="{'readonly' : [('state', 'not in', ('opening_control',))]}">
<tree string="Opening Cashbox Lines" editable="bottom">
<field name="pieces" readonly="1" />
@@ -906,7 +906,8 @@
</tree>
</field>
</group>
<group string="Closing Cash Control" attrs="{'invisible': ['|', ('cash_control', '=', False), ('state', 'in', ('opening_control', 'opened'))]}">
<group string="Closing Cash Control" attrs="{'invisible' : [ '&amp;' ,'!', '&amp;', ('state', '=', 'closing_control'), ('cash_control', '=', True), ('state', '!=',
'closed')] }" >
<field name="details_ids" nolabel="1" colspan="2">
<tree string="Cashbox Lines" editable="bottom">
<field name="pieces" readonly="1" />
@@ -916,7 +917,7 @@
</field>
</group>
<div attrs="{'invisible' : ['|', ('cash_control', '=', False),('state', 'in', ('opened', 'closing_control'))]}">
<div attrs="{'invisible' : [('state', '!=', 'closed')]}">
<group class="oe_subtotal_footer oe_right">
<field name="cash_register_balance_start" readonly="1" string="Opening Balance" class="oe_subtotal_footer_separator"/>
<field name="cash_register_total_entry_encoding" attrs="{'invisible' : [('state', '=', 'opening_control')]}" string="+ Transactions"/>
@@ -933,7 +934,7 @@
</div>
<group class="oe_subtotal_footer oe_right" attrs="{'invisible': ['|', ('cash_control', '=', False), ('state', 'in', ('opening_control', 'opened'))]}">
<group class="oe_subtotal_footer oe_right" attrs="{'invisible': [('state', '!=', 'closed')]}">
<field name="cash_register_balance_end_real" class="oe_subtotal_footer_separator"/>
<field name="cash_register_difference" class="oe_subtotal_footer_separator"/>
</group>
@@ -1035,7 +1036,7 @@
<filter icon="gtk-convert" string="Posted" domain="[('state','=','done')]"/>
<field name="user_id"/>
<field name="session_id"/>
<group expand="0" string="Group By..." groups="base.group_extended">
<group expand="0" string="Group By...">
<filter string="Customer" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Session" icon="terp-personal" domain="[]" context="{'group_by':'session_id'}"/>
+22 -2
View File
@@ -106,11 +106,31 @@
<group name="procurement">
<group>
<field name="procure_method" groups="base.group_user"/>
<field name="supply_method" groups="base.group_user" invisible="1"/>
<field name="cost_method" groups="product.group_costing_method"/>
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
</group>
<group>
<field name="uom_po_id" groups="product.group_uom"/>
<group name="procurement_help" class="oe_grey" col="1">
<p attrs="{'invisible': [('type','&lt;&gt;','service'),('procure_method','&lt;&gt;','make_to_stock')]}">
When you sell this service, nothing special will be trigered
to deliver the customer.
</p>
<p attrs="{'invisible': [('type','&lt;&gt;','product'),('procure_method','&lt;&gt;','make_to_stock')]}">
When you sell this product, OpenERP will <b>use the available inventory</b>
for the delivery order.
<br/>
If there are not enough quantities available, the delivery order
will wait for new products. You should create others rules
(orderpoints, manual purchase orders) to fulfill the inventory.
</p>
<p attrs="{'invisible': [('type','&lt;&gt;','consu'),('procure_method','&lt;&gt;','make_to_stock')]}">
When you sell this product, a delivery order will be created.
OpenERP will consider that the <b>required quantities are always
available</b> as it's a consumable (the stock on hand may become negative).
</p>
</group>
<group groups="product.group_uom">
<field name="uom_po_id"/>
</group>
</group>
<separator string="Notes for Suppliers"/>
+9 -2
View File
@@ -36,9 +36,16 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='procure_method']" position="after">
<field name="supply_method" groups="base.group_user"/>
<xpath expr="//field[@name='supply_method']" position="attributes">
<attribute name="invisible">False</attribute>
</xpath>
<group name="procurement_help" position="inside">
<p attrs="{'invisible': [('type','&lt;&gt;','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','produce')]}">
When you sell this service to a customer, <b>a task</b> will be
created to follow up the job to do. This task will appear
in the project related to the contract of the sale order.
</p>
</group>
</field>
</record>
</data>
@@ -1,20 +0,0 @@
<?xml version="1.0" ?>
<openerp>
<data noupdate="1">
<!-- <record id="base.menu_project_management_time_tracking" model="ir.ui.menu">
<field name="name">Time Tracking</field>
<field eval="5" name="sequence"/>
<field name="parent_id" ref="base.menu_main_pm"/>
</record>
<record id="menu_act_project_management_timesheet_sheet_form" model="ir.ui.menu">
<field name="name">My Timesheet</field>
<field eval="5" name="sequence"/>
<field name="parent_id" ref="base.menu_project_management_time_tracking"/>
<field name="icon">STOCK_JUSTIFY_FILL</field>
<field name="action" ref="hr_timesheet_sheet.ir_actions_server_timsheet_sheet"/>
</record> -->
</data>
</openerp>
+14
View File
@@ -573,6 +573,20 @@
<separator string="Suppliers"/>
<field name="seller_ids" context="{'uom_id': uom_id}"/>
</group>
<group name="procurement_help" position="inside">
<p attrs="{'invisible': [('type','&lt;&gt;','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','buy')]}">
When you sell this service to a customer, <b>a draft purchase order</b>
will be created in order to subcontract the job
<i attrs="{'invisible': [('seller_id','=',False)]}">to
<field name="seller_id" class="oe_inline"/></i>.
</p>
<p attrs="{'invisible': [('type','=','service'),('procure_method','&lt;&gt;','make_to_order'),('supply_method','&lt;&gt;','buy')]}">
When you sell this product, OpenERP will trigger <b>a draft
purchase order</b> to buy the required quantities to the supplier.
The delivery order will be ready after having received the
products.
</p>
</group>
</field>
</record>
</data>
@@ -72,7 +72,7 @@
<filter string="Product" name="group_product_id" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<filter string="Category" name="group_category_id" icon="terp-stock_symbol-selection" context="{'group_by':'category_id'}"/>
<filter string="Reference Unit of Measure" name="group_product_uom" icon="terp-mrp" context="{'group_by':'product_uom'}"/>
<filter string="Warehouse" icon="terp-go-home" context="{'group_by':'warehouse_id'}" groups="base.group_extended"/>
<filter string="Warehouse" icon="terp-go-home" context="{'group_by':'warehouse_id'}"/>
<filter string="Reference UOM" name="group_product_uom" icon="terp-mrp" context="{'group_by':'product_uom'}"/>
<filter string="Warehouse" icon="terp-go-home" context="{'group_by':'warehouse_id'}"/>
<filter string="Destination" icon="terp-gtk-jump-to-ltr" context="{'group_by':'location_id'}"/>