Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
[FIN] 'integrated_trade_base';
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Jan 21, 2015
1 parent 42f71c1 commit c19b8d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
11 changes: 9 additions & 2 deletions integrated_trade_base/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@
'description': """
Module for Integrated Trade for Base Module
===========================================
Features :
----------
* Add a New Model Integrated Trade that define that two company can realize
purchases and sales between them;
* Add a New Model Integrated trade that define that two company can realize
purchases and sales between them with:
* a supplier company;
* a customer company;
* Add a new field 'integrated_trade' in 'res.partner' model;
* Add new groups to manage integrated trade;
* When we set a new integrated trade, OpenERP create a supplier in the
customer company and a customer in the supplier company;
Demo Data:
----------
Expand Down
9 changes: 5 additions & 4 deletions integrated_trade_base/model/res_integrated_trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
##############################################################################


from openerp.osv import osv
from openerp.osv import fields
from openerp.osv.orm import Model
from openerp.osv.osv import except_osv
from openerp.tools.translate import _


Expand Down Expand Up @@ -144,9 +144,10 @@ def write(self, cr, uid, ids, vals, context=None):
vals.pop('customer_company_id')
vals.pop('supplier_company_id')
else:
raise osv.except_osv(_("Error!"),
raise except_osv(
_("Error!"),
_("""You can not change customer or supplier company."""
"""If you want to do so, please disable this integrated"""
""" trade and create a new one."""))
"""If you want to do so, please disable this"""
""" integrated trade and create a new one."""))
return super(res_integrated_trade, self).write(
cr, uid, ids, vals, context=context)

0 comments on commit c19b8d9

Please sign in to comment.