openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #01940
[Merge] lp:~xrg/openobject-addons/trunk-patch24 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3
xrg has proposed merging lp:~xrg/openobject-addons/trunk-patch24 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~xrg/openobject-addons/trunk-patch24/+merge/45246
--
https://code.launchpad.net/~xrg/openobject-addons/trunk-patch24/+merge/45246
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~xrg/openobject-addons/trunk-patch24 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
=== modified file 'account/account_report.xml'
--- account/account_report.xml 2010-12-30 09:58:09 +0000
+++ account/account_report.xml 2011-01-05 14:47:08 +0000
@@ -2,6 +2,7 @@
<openerp>
<data>
<report auto="False" id="account_general_ledger" menu="False" model="account.account" name="account.general.ledger" rml="account/report/account_general_ledger.rml" string="General Ledger"/>
+ <report auto="False" id="account_general_ledger_landscape" menu="False" model="account.account" name="account.general.ledger_landscape" rml="account/report/account_general_ledger.rml" string="General Ledger"/>
<report auto="False" id="account_3rdparty_ledger" menu="False" model="res.partner" name="account.third_party_ledger" rml="account/report/account_partner_ledger.rml" string="Partner Ledger"/>
<report auto="False" id="account_3rdparty_ledger_other" menu="False" model="res.partner" name="account.third_party_ledger_other" rml="account/report/account_partner_ledger_other.rml" string="Partner Ledger"/>
<report auto="False" id="account_account_balance" menu="False" model="account.account" name="account.account.balance" rml="account/report/account_balance.rml" string="Trial Balance"/>
=== modified file 'account/account_view.xml'
--- account/account_view.xml 2011-01-05 07:20:08 +0000
+++ account/account_view.xml 2011-01-05 14:47:08 +0000
@@ -179,6 +179,7 @@
<separator string="Reconcile" colspan="2"/>
<field name="reconcile"/>
</group>
+ <field name="active" groups="base.group_extended" />
<separator string="Default Taxes" colspan="4"/>
<field colspan="4" name="tax_ids" nolabel="1" domain="[('parent_id','=',False)]"/>
<separator string="Consolidated Children" colspan="4"/>
=== modified file 'account/invoice.py'
--- account/invoice.py 2010-12-30 09:58:09 +0000
+++ account/invoice.py 2011-01-05 14:47:08 +0000
@@ -1009,15 +1009,13 @@
return True
def action_cancel(self, cr, uid, ids, *args):
+ context = {} # TODO in v6.1
account_move_obj = self.pool.get('account.move')
invoices = self.read(cr, uid, ids, ['move_id', 'payment_ids'])
+ move_ids = [] # ones that we will need to remove
for i in invoices:
if i['move_id']:
- account_move_obj.button_cancel(cr, uid, [i['move_id'][0]])
- # delete the move this invoice was pointing to
- # Note that the corresponding move_lines and move_reconciles
- # will be automatically deleted too
- account_move_obj.unlink(cr, uid, [i['move_id'][0]])
+ move_ids.append(i['move_id'][0])
if i['payment_ids']:
account_move_line_obj = self.pool.get('account.move.line')
pay_ids = account_move_line_obj.browse(cr, uid, i['payment_ids'])
@@ -1025,7 +1023,15 @@
if move_line.reconcile_partial_id and move_line.reconcile_partial_id.line_partial_ids:
raise osv.except_osv(_('Error !'), _('You cannot cancel the Invoice which is Partially Paid! You need to unreconcile concerned payment entries!'))
+ # First, set the invoices as cancelled and detach the move ids
self.write(cr, uid, ids, {'state':'cancel', 'move_id':False})
+ if move_ids:
+ # second, invalidate the move(s)
+ account_move_obj.button_cancel(cr, uid, move_ids, context=context)
+ # delete the move this invoice was pointing to
+ # Note that the corresponding move_lines and move_reconciles
+ # will be automatically deleted too
+ account_move_obj.unlink(cr, uid, move_ids, context=context)
self._log_event(cr, uid, ids, -1.0, 'Cancel Invoice')
return True
=== modified file 'mrp/security/mrp_security.xml'
--- mrp/security/mrp_security.xml 2011-01-04 13:28:53 +0000
+++ mrp/security/mrp_security.xml 2011-01-05 14:47:08 +0000
@@ -9,11 +9,6 @@
<field name="name">Manufacturing / User</field>
</record>
- <!-- restrict access to menu -->
- <record model='ir.ui.menu' id="mrp_Sched_all">
- <field eval="[(6,0,[ref('group_mrp_manager')])]" name="groups_id"/>
- </record>
-
<!-- Multi -->
<record model="ir.rule" id="mrp_production_rule">
<field name="name">mrp_production multi-company</field>