[MERGE] merged the dev team2 branch
bzr revid: qdp-launchpad@tinyerp.com-20101126161359-s02ik0bmz3l8lt9u
This commit is contained in:
commit
382779126a
|
@ -122,7 +122,7 @@ class account_payment_term_line(osv.osv):
|
|||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_percent, _('Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% '), ['value_amount']),
|
||||
(_check_percent, 'Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% ', ['value_amount']),
|
||||
]
|
||||
|
||||
account_payment_term_line()
|
||||
|
|
|
@ -246,7 +246,7 @@ class account_cash_statement(osv.osv):
|
|||
]
|
||||
open_jrnl = self.search(cr, uid, sql)
|
||||
if open_jrnl:
|
||||
raise osv.except_osv('Error', _('You can not have two open register for the same journal'))
|
||||
raise osv.except_osv(_('Error'), _('You can not have two open register for the same journal'))
|
||||
|
||||
if self.pool.get('account.journal').browse(cr, uid, vals['journal_id']).type == 'cash':
|
||||
open_close = self._get_cash_open_close_box_lines(cr, uid, context)
|
||||
|
|
|
@ -63,7 +63,9 @@
|
|||
<field domain="[('type','<>','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
|
||||
<newline/>
|
||||
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
|
||||
<field colspan="4" name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"/>
|
||||
<separator colspan="4" string="Taxes"/>
|
||||
<field colspan="4" name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"
|
||||
nolabel="1"/>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
|
|
|
@ -5697,6 +5697,7 @@ msgstr ""
|
|||
#: code:addons/account/invoice.py:0
|
||||
#: code:addons/account/wizard/account_invoice_refund.py:0
|
||||
#: code:addons/account/wizard/account_use_model.py:0
|
||||
#: code:addons/account/account_cash_statement.py:0
|
||||
#, python-format
|
||||
msgid "Error !"
|
||||
msgstr ""
|
||||
|
@ -6269,6 +6270,12 @@ msgstr ""
|
|||
msgid "You can not have two open register for the same journal"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: code:addons/account/account_cash_statement.py:0
|
||||
#, python-format
|
||||
msgid "You cannot create a bank or cash register without a journal!"
|
||||
msgstr ""
|
||||
|
||||
#. module: account
|
||||
#: view:account.payment.term.line:0
|
||||
msgid " day of the month= -1"
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field eval="[(4, ref('group_auction_user'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<!-- demo data for Account -->
|
||||
<record model="account.account.type" id="account.account_type_tax">
|
||||
<field name="name">Tax</field>
|
||||
|
|
|
@ -312,6 +312,54 @@ msgstr ""
|
|||
msgid "The Buyer \"%s\" has no Invoice Address."
|
||||
msgstr ""
|
||||
|
||||
#. module: auction
|
||||
#: code:addons/auction/wizard/auction_pay_buy.py:0
|
||||
#, python-format
|
||||
msgid "Payment aborted !"
|
||||
msgstr ""
|
||||
|
||||
#. module: auction
|
||||
#: code:addons/auction/wizard/auction_pay_buy.py:0
|
||||
#, python-format
|
||||
msgid "You should pay all the total: "%.2f" are missing to accomplish the payment."
|
||||
msgstr ""
|
||||
|
||||
#. module: auction
|
||||
#: code:addons/auction/wizard/auction_pay_buy.py:0
|
||||
#, python-format
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: auction
|
||||
#: code:addons/auction/wizard/auction_catalog_flagey_report.py:0
|
||||
#, python-format
|
||||
msgid "No Lots belong to this Auction Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: auction
|
||||
#: code:addons/auction/wizard/auction_lots_numerotate.py:0
|
||||
#, python-format
|
||||
msgid "This record does not exist !"
|
||||
msgstr ""
|
||||
|
||||
#. module: auction
|
||||
#: code:addons/auction/wizard/auction_lots_numerotate.py:0
|
||||
#, python-format
|
||||
msgid "This lot does not exist !"
|
||||
msgstr ""
|
||||
|
||||
#. module: auction
|
||||
#: code:addons/auction/wizard/auction_lots_buyer_map.py:0
|
||||
#, python-format
|
||||
msgid "No buyer is set for this lot."
|
||||
msgstr ""
|
||||
|
||||
#. module: auction
|
||||
#: code:addons/auction/wizard/auction_pay_buy.py:0
|
||||
#, python-format
|
||||
msgid "No auction date for "%s": Please set one."
|
||||
msgstr ""
|
||||
|
||||
#. module: auction
|
||||
#: view:auction.dates:0
|
||||
msgid "Commissions"
|
||||
|
@ -663,6 +711,7 @@ msgstr ""
|
|||
|
||||
#. module: auction
|
||||
#: code:addons/auction/wizard/auction_lots_invoice.py:0
|
||||
#: code:addons/auction/wizard/auction_lots_numerotate.py:0
|
||||
#, python-format
|
||||
msgid "UserError"
|
||||
msgstr ""
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
<record id="group_auction_user" model="res.groups">
|
||||
<field name="name">Auction / User</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
from osv import osv, fields
|
||||
import netsvc
|
||||
from tools.translate import _
|
||||
|
||||
class auction_catalog_flagey(osv.osv_memory):
|
||||
_name = 'auction.catalog.flagey'
|
||||
|
@ -57,7 +58,7 @@ class auction_catalog_flagey(osv.osv_memory):
|
|||
v_ids = lots_obj.browse(cr, uid, v_lots)
|
||||
for ab in v_ids:
|
||||
if not ab.auction_id :
|
||||
raise osv.except_osv('Error!','No Lots belong to this Auction Date')
|
||||
raise osv.except_osv(_('Error!'), _('No Lots belong to this Auction Date'))
|
||||
pass
|
||||
|
||||
def print_report(self, cr, uid, ids, context):
|
||||
|
|
|
@ -67,7 +67,7 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
|
|||
lots_obj = self.pool.get('auction.lots')
|
||||
for rec in lots_obj.browse(cr, uid, ids, context):
|
||||
if (len(ids)==1) and (not rec.ach_uid and not rec.ach_login):
|
||||
raise osv.except_osv('Error', 'No buyer is set for this lot.')
|
||||
raise osv.except_osv(_('Error'), _('No buyer is set for this lot.'))
|
||||
if not rec.ach_uid and rec.ach_login:
|
||||
return {'ach_login': rec.ach_login}
|
||||
return {}
|
||||
|
|
|
@ -99,7 +99,7 @@ class auction_lots_numerotate_per_lot(osv.osv_memory):
|
|||
('lot_num','=',int(datas['lot_num']))])
|
||||
found = [r for r in res if r in record_ids]
|
||||
if len(found)==0:
|
||||
raise osv.except_osv('UserError', 'This record does not exist !')
|
||||
raise osv.except_osv(_('UserError'), _('This record does not exist !'))
|
||||
lots_obj.write(cr, uid, found, {'obj_num':int(datas['obj_num'])} )
|
||||
view_id = data_obj._get_id(cr, uid, 'auction', 'view_auction_numerotate')
|
||||
if view_id:
|
||||
|
@ -125,7 +125,7 @@ class auction_lots_numerotate_per_lot(osv.osv_memory):
|
|||
('lot_num','=',int(datas['lot_num']))])
|
||||
found = [r for r in res if r in record_ids]
|
||||
if len(found)==0:
|
||||
raise osv.except_osv('UserError', 'This record does not exist !')
|
||||
raise osv.except_osv(_('UserError'), _('This record does not exist !'))
|
||||
lots_datas = lots_obj.read(cr, uid, found,
|
||||
['obj_num', 'name', 'lot_est1',
|
||||
'lot_est2', 'obj_desc'])
|
||||
|
@ -141,7 +141,7 @@ class auction_lots_numerotate_per_lot(osv.osv_memory):
|
|||
('lot_num','=',int(datas['lot_num']))])
|
||||
found = [r for r in res if r in record_ids]
|
||||
if len(found)==0:
|
||||
raise osv.except_osv('Error', 'This lot does not exist !')
|
||||
raise osv.except_osv(_('Error'), _('This lot does not exist !'))
|
||||
view_id = data_obj._get_id(cr, uid, 'auction', 'view_auction_lots_numerotate_second')
|
||||
if view_id:
|
||||
res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
|
||||
|
|
|
@ -76,14 +76,14 @@ class auction_pay_buy(osv.osv_memory):
|
|||
for datas in self.read(cr, uid, ids):
|
||||
if not abs(datas['total'] - (datas['amount'] + datas['amount2'] + datas['amount3'])) <0.01:
|
||||
rest = datas['total'] - (datas['amount'] + datas['amount2'] + datas['amount3'])
|
||||
raise osv.except_osv('Payment aborted !', 'You should pay all the total: "%.2f" are missing to accomplish the payment.' %(round(rest, 2)))
|
||||
raise osv.except_osv(_('Payment aborted !'), _('You should pay all the total: "%.2f" are missing to accomplish the payment.') %(round(rest, 2)))
|
||||
|
||||
lots = lot_obj.browse(cr, uid, context['active_ids'], context)
|
||||
for lot in lots:
|
||||
if datas['buyer_id']:
|
||||
lot_obj.write(cr, uid, [lot.id], {'ach_uid': datas['buyer_id']})
|
||||
if not lot.auction_id:
|
||||
raise osv.except_osv('Error !', 'No auction date for "%s": Please set one.'%(lot.name))
|
||||
raise osv.except_osv(_('Error!'), _('No auction date for "%s": Please set one.') % (lot.name))
|
||||
lot_obj.write(cr, uid, [lot.id], {'is_ok':True})
|
||||
|
||||
for st, stamount in [('statement_id1', 'amount'), ('statement_id2', 'amount2'), ('statement_id3', 'amount3')]:
|
||||
|
|
|
@ -1089,9 +1089,9 @@ class calendar_event(osv.osv):
|
|||
cr.execute("UPDATE %s set exrule=Null where id=%%s" % self._table,( event,))
|
||||
elif datas.get('rrule_type') == 'custom':
|
||||
if datas.get('interval', 0) < 0:
|
||||
raise osv.except_osv('Warning!', 'Interval can not be Negative')
|
||||
raise osv.except_osv(_('Warning!'), _('Interval can not be Negative'))
|
||||
if datas.get('count', 0) < 0:
|
||||
raise osv.except_osv('Warning!', 'Count can not be Negative')
|
||||
raise osv.except_osv(_('Warning!'), _('Count can not be Negative'))
|
||||
rrule_custom = self.compute_rule_string(cr, uid, datas, \
|
||||
context=context)
|
||||
result[event] = rrule_custom
|
||||
|
|
|
@ -146,6 +146,24 @@ msgstr ""
|
|||
msgid "Warning !"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_calendar
|
||||
#: code:addons/base_calendar/base_calendar.py:0
|
||||
#, python-format
|
||||
msgid "Warning!"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_calendar
|
||||
#: code:addons/base_calendar/base_calendar.py:0
|
||||
#, python-format
|
||||
msgid "Interval can not be Negative"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_calendar
|
||||
#: code:addons/base_calendar/base_calendar.py:0
|
||||
#, python-format
|
||||
msgid "Count can not be Negative"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_calendar
|
||||
#: selection:base.calendar.set.exrule,week_list:0
|
||||
#: selection:calendar.event,week_list:0
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field eval="[(4, ref('base.group_sale_salesman'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<!-- Create the contacts -->
|
||||
<record id="res_partner_contact_mortier0" model="res.partner.contact">
|
||||
<field eval=""""Benoit"""" name="first_name"/>
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
<record id="base.group_sale_manager" model="res.groups">
|
||||
<field name="name">Sales / Manager</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
'author': 'OpenERP SA',
|
||||
'depends': ['base'],
|
||||
'update_xml': ['security/board_security.xml','security/ir.model.access.csv', 'wizard/board_menu_create_view.xml', 'board_view.xml','board_administration_view.xml'],
|
||||
'demo_xml': [],
|
||||
'demo_xml': ['board_demo.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0076912305725',
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field eval="[(4, ref('base.group_sale_salesman'))]" name="groups_id"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -38,8 +38,7 @@ from tools.safe_eval import safe_eval as eval
|
|||
try:
|
||||
import vobject
|
||||
except ImportError:
|
||||
raise osv.except_osv('vobject Import Error!','Please install python-vobject \
|
||||
from http://vobject.skyhouseconsulting.com/')
|
||||
raise osv.except_osv(_('vobject Import Error!'), _('Please install python-vobject from http://vobject.skyhouseconsulting.com/'))
|
||||
|
||||
# O-1 Optional and can come only once
|
||||
# O-n Optional and can come more than once
|
||||
|
|
|
@ -5,6 +5,5 @@
|
|||
<field name="groups_id" eval="[(4,ref('base.group_sale_salesman'))]"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
id="report_shipping"
|
||||
model="stock.picking"
|
||||
name="sale.shipping"
|
||||
rml="delivery/report/shipping.rml"
|
||||
multi="True"
|
||||
rml="delivery/report/shipping.rml"
|
||||
string="Delivery order"/>
|
||||
|
||||
</data>
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
<!-- Delivery Carriers -->
|
||||
<menuitem id="menu_delivery" name="Delivery" parent="stock.menu_stock_configuration" sequence="4"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<record id="view_delivery_carrier_tree" model="ir.ui.view">
|
||||
<field name="name">delivery.carrier.tree</field>
|
||||
<field name="model">delivery.carrier</field>
|
||||
|
@ -128,7 +131,7 @@
|
|||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="logistic" position="inside">
|
||||
<group name="logistics" position="inside">
|
||||
<field name="id" invisible="True"/>
|
||||
<field name="carrier_id" context="{'order_id':active_id}"/>
|
||||
</group>
|
||||
|
@ -266,10 +269,23 @@
|
|||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page[@string='Sales Order']/group[1]/button[@name='button_dummy']" position="after">
|
||||
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-add" context="{'order_id':active_id}"/>
|
||||
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-add" context="{'order_id':active_id}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_delivery_order_inherit_stock" model="ir.ui.view">
|
||||
<field name="name">stock.picking.out.form</field>
|
||||
<field name="type">form</field>
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_out_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page[@string='Products']/group/button[@name='action_process']" position="after">
|
||||
<button name="%(report_shipping)d" string="Delivery Order" states="done,assigned" type="action" icon="gtk-print"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field eval="[(4, ref('base.group_document_user'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -27,14 +27,14 @@ from xml.dom.minicompat import StringTypes
|
|||
import urlparse
|
||||
import urllib
|
||||
from osv import osv
|
||||
from tools.translate import _
|
||||
|
||||
try:
|
||||
from DAV import utils
|
||||
from DAV.propfind import PROPFIND
|
||||
from DAV.report import REPORT
|
||||
except ImportError:
|
||||
raise osv.except_osv('PyWebDAV Import Error!','Please install PyWebDAV \
|
||||
from http://code.google.com/p/pywebdav/downloads/detail?name=PyWebDAV-0.9.4.tar.gz&can=2&q=/')
|
||||
raise osv.except_osv(_('PyWebDAV Import Error!'), _('Please install PyWebDAV from http://code.google.com/p/pywebdav/downloads/detail?name=PyWebDAV-0.9.4.tar.gz&can=2&q=/'))
|
||||
|
||||
import tools
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ This is useful for CRM leads for example"),
|
|||
}
|
||||
|
||||
_sql_constraints = [
|
||||
('name', 'unique (name)', _('The template name must be unique !'))
|
||||
('name', 'unique (name)','The template name must be unique !')
|
||||
]
|
||||
|
||||
def create_action(self, cr, uid, ids, context):
|
||||
|
|
|
@ -360,19 +360,19 @@ unless it is already specified in the From Email, e.g: John Doe <john@doe.com>",
|
|||
payload_part.attach(part)
|
||||
except Exception, error:
|
||||
logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed. Probable Reason:MIME Error\nDescription: %s") % (id, error))
|
||||
return {'error_msg': "Server Send Error\nDescription: %s"%error}
|
||||
return {'error_msg': _("Server Send Error\nDescription: %s")%error}
|
||||
try:
|
||||
serv.sendmail(payload_part['From'], addresses_l['all-recipients'], payload_part.as_string())
|
||||
except Exception, error:
|
||||
logging.getLogger('email_template').error("Mail from Account %s failed. Probable Reason: Server Send Error\n Description: %s", id, error, exc_info=True)
|
||||
return {'error_msg': "Server Send Error\nDescription: %s"%error}
|
||||
logging.getLogger('email_template').error(_("Mail from Account %s failed. Probable Reason: Server Send Error\n Description: %s"), id, error, exc_info=True)
|
||||
return {'error_msg': _("Server Send Error\nDescription: %s")%error}
|
||||
#The mail sending is complete
|
||||
serv.close()
|
||||
logger.notifyChannel(_("Email Template"), netsvc.LOG_INFO, _("Mail from Account %s successfully Sent.") % (id))
|
||||
return True
|
||||
else:
|
||||
logger.notifyChannel(_("Email Template"), netsvc.LOG_ERROR, _("Mail from Account %s failed. Probable Reason:Account not approved") % id)
|
||||
return {'error_msg':"Mail from Account %s failed. Probable Reason:Account not approved"% id}
|
||||
return {'nodestroy':True,'error_msg': _("Mail from Account %s failed. Probable Reason:Account not approved")% id}
|
||||
|
||||
def extracttime(self, time_as_string):
|
||||
"""
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<data>
|
||||
|
||||
<menuitem name="Marketing" icon="terp-crm" id="base.marketing_menu" sequence="17"
|
||||
groups="marketing.group_marketing_user"/>
|
||||
groups="marketing.group_marketing_user,marketing.group_marketing_manager"/>
|
||||
<menuitem name="Emails" id="base.menu_emails" parent="base.marketing_menu" sequence="5"/>
|
||||
<menuitem name="Email Template" id="menu_email_template" parent="base.menu_emails"/>
|
||||
|
||||
|
|
|
@ -5,3 +5,6 @@
|
|||
"access_email_template_account_system","email_template.account system","model_email_template_account","base.group_system",1,1,1,1
|
||||
"access_email_template_system","email.template system","model_email_template","base.group_system",1,1,1,1
|
||||
"access_email_template_mailbox_system","email_template.mailbox system","model_email_template_mailbox","base.group_system",1,0,0,0
|
||||
"access_email_template_account_manager","email_template.account","model_email_template_account","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_email_template_manager","email.template","model_email_template","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_email_template_mailbox_manager","email_template.mailbox","model_email_template_mailbox","marketing.group_marketing_manager",1,1,1,1
|
||||
|
|
|
|
@ -24,7 +24,7 @@
|
|||
'name': 'Event',
|
||||
'version': '0.1',
|
||||
'category': 'Generic Modules/Association',
|
||||
'description': """Oraganization and management of Event.
|
||||
'description': """Organization and management of Event.
|
||||
|
||||
This module allow you
|
||||
* to manage your events and their registrations
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
<field name="act_window_id" ref="action_report_event_registration"/>
|
||||
</record>
|
||||
|
||||
<menuitem parent="base.menu_report_association" action="action_report_event_registration" id="menu_report_event_registration" sequence="3" groups="base.group_marketing_manager"/>
|
||||
<menuitem parent="base.menu_report_association" action="action_report_event_registration" id="menu_report_event_registration" sequence="3" groups="marketing.group_marketing_manager"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="base.group_marketing_manager" model="res.groups">
|
||||
<record id="marketing.group_marketing_manager" model="res.groups">
|
||||
<field name="name">Marketing / Manager</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_event_type","event.type","model_event_type","marketing.group_marketing_user",1,0,0,0
|
||||
"access_event_type_manager","event.type manager","model_event_type","base.group_marketing_manager",1,1,1,1
|
||||
"access_event_type_manager","event.type manager","model_event_type","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_event_event","event.event","model_event_event","marketing.group_marketing_user",1,1,1,0
|
||||
"access_event_registration","event.registration","model_event_registration","marketing.group_marketing_user",1,1,1,0
|
||||
"access_report_event_registration","report.event.registration","model_report_event_registration","marketing.group_marketing_user",1,1,1,1
|
||||
"access_event_event_manager","event.event manager","model_event_event","base.group_marketing_manager",1,0,0,0
|
||||
"access_event_registration_manager","event.registration manager","model_event_registration","base.group_marketing_manager",1,0,0,0
|
||||
"access_crm_case_section_manager","crm.case.section manager","crm.model_crm_case_section","base.group_marketing_manager",1,1,1,1
|
||||
"access_product_product","product.product.product manager","product.model_product_product","base.group_marketing_manager",1,1,1,1
|
||||
"access_report_event_registration","report.event.registration","model_report_event_registration","base.group_marketing_manager",1,1,1,1
|
||||
"access_event_registration_badge_manager","event.registration.badge manager","model_event_registration_badge","base.group_marketing_manager",1,1,1,1
|
||||
"access_event_event_manager","event.event manager","model_event_event","marketing.group_marketing_manager",1,0,0,0
|
||||
"access_event_registration_manager","event.registration manager","model_event_registration","marketing.group_marketing_manager",1,0,0,0
|
||||
"access_crm_case_section_manager","crm.case.section manager","crm.model_crm_case_section","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_product_product","product.product.product manager","product.model_product_product","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_report_event_registration","report.event.registration","model_report_event_registration","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_event_registration_badge_manager","event.registration.badge manager","model_event_registration_badge","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_event_event_sale_salesman","event.event.sale","model_event_event","base.group_sale_salesman",1,0,0,0
|
||||
"access_account_account_invoice_manager","account.account.invoice","account.model_account_invoice","base.group_marketing_manager",1,0,0,0
|
||||
"access_account_account_invoice_manager","account.account.invoice","account.model_account_invoice","marketing.group_marketing_manager",1,0,0,0
|
||||
"access_event_registration_badge","event.registration.badge","model_event_registration_badge","marketing.group_marketing_user",1,0,0,0
|
||||
"access_event_registration_sale_user","event.registration.sale.user","model_event_registration","base.group_sale_salesman",1,0,0,0
|
||||
|
|
|
|
@ -463,9 +463,9 @@ def _create_dta(obj, cr, uid, data, context=None):
|
|||
v['partner_city']= ''
|
||||
v['partner_zip']= ''
|
||||
v['partner_country']= ''
|
||||
raise osv.except_osv('Error', 'No address defined \n' \
|
||||
'for the partner: ' + pline.partner_id.name + '\n' \
|
||||
'on line: ' + pline.name)
|
||||
raise osv.except_osv(_('Error'), _('No address defined \n' \
|
||||
'for the partner: %s \n' \
|
||||
'on line: %s') % (pline.partner_id.name,pline.name))
|
||||
|
||||
if pline.order_id.date_scheduled:
|
||||
date_value = datetime.strptime(pline.order_id.date_scheduled, '%Y-%m-%d')
|
||||
|
@ -612,4 +612,4 @@ class create_dta_wizard(osv.osv_memory):
|
|||
|
||||
create_dta_wizard()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
'security/ir.model.access.csv',
|
||||
'marketing_view.xml'
|
||||
],
|
||||
'demo_xml': [],
|
||||
'demo_xml': ['marketing_demo.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field eval="[(4, ref('marketing.group_marketing_user'))]" name="groups_id"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -2,7 +2,7 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<menuitem name="Marketing" icon="terp-crm" id="base.marketing_menu" sequence="17" groups="marketing.group_marketing_user"/>
|
||||
<menuitem name="Marketing" icon="terp-crm" id="base.marketing_menu" sequence="17" groups="marketing.group_marketing_user,marketing.group_marketing_manager"/>
|
||||
|
||||
<record id="view_marketing_installer" model="ir.ui.view">
|
||||
<field name="name">marketing.installer.view</field>
|
||||
|
|
|
@ -4,5 +4,10 @@
|
|||
<record id="marketing.group_marketing_user" model="res.groups">
|
||||
<field name="name">Marketing / User</field>
|
||||
</record>
|
||||
|
||||
<record id="marketing.group_marketing_manager" model="res.groups">
|
||||
<field name="name">Marketing / Manager</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -31,6 +31,18 @@ msgstr ""
|
|||
msgid "The current step for this item has no email or report to preview."
|
||||
msgstr ""
|
||||
|
||||
#. module: marketing_campaign
|
||||
#: code:addons/marketing_campaign/marketing_campaign.py:0
|
||||
#, python-format
|
||||
msgid "Operation not supported"
|
||||
msgstr ""
|
||||
|
||||
#. module: marketing_campaign
|
||||
#: code:addons/marketing_campaign/marketing_campaign.py:0
|
||||
#, python-format
|
||||
msgid "Sorry, campaign duplication is not supported at the moment."
|
||||
msgstr ""
|
||||
|
||||
#. module: marketing_campaign
|
||||
#: code:addons/marketing_campaign/marketing_campaign.py:0
|
||||
#, python-format
|
||||
|
|
|
@ -205,7 +205,7 @@ Normal - the campaign runs normally and automatically sends all emails and repor
|
|||
|
||||
# prevent duplication until the server properly duplicates several levels of nested o2m
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
raise osv.except_osv("Operation not supported", "Sorry, campaign duplication is not supported at the moment.")
|
||||
raise osv.except_osv(_("Operation not supported"), _("Sorry, campaign duplication is not supported at the moment."))
|
||||
|
||||
marketing_campaign()
|
||||
|
||||
|
@ -257,7 +257,7 @@ class marketing_campaign_segment(osv.osv):
|
|||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_model, _('Model of filter must be same as resource model of Campaign '), ['ir_filter_id,campaign_id']),
|
||||
(_check_model, 'Model of filter must be same as resource model of Campaign ', ['ir_filter_id,campaign_id']),
|
||||
]
|
||||
|
||||
def onchange_campaign_id(self, cr, uid, ids, campaign_id):
|
||||
|
@ -309,7 +309,7 @@ class marketing_campaign_segment(osv.osv):
|
|||
for segment in self.browse(cr, uid, segment_ids, context=context):
|
||||
if segment.campaign_id.state != 'running':
|
||||
continue
|
||||
|
||||
|
||||
campaigns.add(segment.campaign_id.id)
|
||||
act_ids = self.pool.get('marketing.campaign.activity').search(cr,
|
||||
uid, [('start', '=', True), ('campaign_id', '=', segment.campaign_id.id)], context=context)
|
||||
|
@ -377,7 +377,7 @@ class marketing_campaign_activity(osv.osv):
|
|||
help="Python expression to decide whether the activity can be executed, otherwise it will be deleted or cancelled."
|
||||
"The expression may use the following [browsable] variables:\n"
|
||||
" - activity: the campaign activity\n"
|
||||
" - workitem: the campaign workitem\n"
|
||||
" - workitem: the campaign workitem\n"
|
||||
" - resource: the resource object this campaign item represents\n"
|
||||
" - transitions: list of campaign transitions outgoing from this activity\n"
|
||||
"...- re: Python regular expression module"),
|
||||
|
@ -539,9 +539,9 @@ class marketing_campaign_transition(osv.osv):
|
|||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_campaign, _('The To/From Activity of transition must be of the same Campaign '), ['activity_from_id,activity_to_id']),
|
||||
(_check_campaign, 'The To/From Activity of transition must be of the same Campaign ', ['activity_from_id,activity_to_id']),
|
||||
]
|
||||
|
||||
|
||||
_sql_constraints = [
|
||||
('interval_positive', 'CHECK(interval_nbr >= 0)', 'The interval must be positive or zero')
|
||||
]
|
||||
|
@ -638,7 +638,7 @@ class marketing_campaign_workitem(osv.osv):
|
|||
'activity': activity,
|
||||
'workitem': workitem,
|
||||
'object': object_id,
|
||||
'resource': object_id,
|
||||
'resource': object_id,
|
||||
'transitions': activity.to_ids,
|
||||
're': re,
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
<field name="month" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="date" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="campaign_id" invisible="1"/>
|
||||
<field name="activity_id" invisible="1"/>
|
||||
<field name="segment_id" invisible="1"/>
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_marketing_campaign_admin","marketing.campaign","model_marketing_campaign","marketing.group_marketing_user",1,1,1,1
|
||||
"access_marketing_campaign_segment_campaignadmin","marketing.campaign.segment","model_marketing_campaign_segment","marketing.group_marketing_user",1,1,1,1
|
||||
"access_marketing_campaign_activity_campaignadmin","marketing.campaign.activity","model_marketing_campaign_activity","marketing.group_marketing_user",1,1,1,1
|
||||
"access_marketing_campaign_workitem_campaignadmin","marketing.campaign.workitem","model_marketing_campaign_workitem","marketing.group_marketing_user",1,1,1,1
|
||||
"access_marketing_campaign_transition_campaignadmin","marketing.campaign.transition","model_marketing_campaign_transition","marketing.group_marketing_user",1,1,1,1
|
||||
"access_marketing_campaign_analysis_campaignadmin","campaign.analysis","model_campaign_analysis","marketing.group_marketing_user",1,1,1,1
|
||||
"access_marketing_campaign_admin","marketing.campaign","model_marketing_campaign","marketing.group_marketing_user",1,1,0,0
|
||||
"access_marketing_campaign_segment_campaignadmin","marketing.campaign.segment","model_marketing_campaign_segment","marketing.group_marketing_user",1,1,0,0
|
||||
"access_marketing_campaign_activity_campaignadmin","marketing.campaign.activity","model_marketing_campaign_activity","marketing.group_marketing_user",1,1,0,0
|
||||
"access_marketing_campaign_workitem_campaignadmin","marketing.campaign.workitem","model_marketing_campaign_workitem","marketing.group_marketing_user",1,1,0,0
|
||||
"access_marketing_campaign_transition_campaignadmin","marketing.campaign.transition","model_marketing_campaign_transition","marketing.group_marketing_user",1,1,0,0
|
||||
"access_marketing_campaign_analysis_campaignadmin","campaign.analysis","model_campaign_analysis","marketing.group_marketing_user",1,1,0,0
|
||||
"access_marketing_campaign_workitem_all","marketing.campaign.workitem","model_marketing_campaign_workitem","base.group_user",1,0,0,0
|
||||
"access_email_template_user","email.template","model_email_template","marketing.group_marketing_user",1,1,1,1
|
||||
"access_email_template_account_user","email_template.account.user","email_template.model_email_template_account","marketing.group_marketing_user",1,1,1,1
|
||||
"access_email_template_user","email.template","model_email_template","marketing.group_marketing_user",1,1,0,0
|
||||
"access_email_template_account_user","email_template.account.user","email_template.model_email_template_account","marketing.group_marketing_user",1,1,0,0
|
||||
"access_marketing_campaign_system","marketing.campaign system","model_marketing_campaign","base.group_system",1,0,0,0
|
||||
"access_marketing_campaign_segment_system","marketing.campaign.segment system","model_marketing_campaign_segment","base.group_system",1,0,0,0
|
||||
"access_marketing_campaign_workitem_system","marketing.campaign.workitem system","model_marketing_campaign_workitem","base.group_system",1,0,0,0
|
||||
"access_marketing_campaign_manager","marketing.campaign","model_marketing_campaign","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_marketing_campaign_segment_campaign_manager","marketing.campaign.segment","model_marketing_campaign_segment","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_marketing_campaign_activity_campaign_manager","marketing.campaign.activity","model_marketing_campaign_activity","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_marketing_campaign_workitem_campaign_manager","marketing.campaign.workitem","model_marketing_campaign_workitem","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_marketing_campaign_transition_campaign_manager","marketing.campaign.transition","model_marketing_campaign_transition","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_marketing_campaign_analysis_campaign_manager","campaign.analysis","model_campaign_analysis","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_email_template_manager","email.template","model_email_template","marketing.group_marketing_manager",1,1,1,1
|
||||
"access_email_template_account_manager","email_template.account.manager","email_template.model_email_template_account","marketing.group_marketing_manager",1,1,1,1
|
||||
|
|
|
|
@ -2270,7 +2270,7 @@ msgstr ""
|
|||
#~ msgid "Product & Location"
|
||||
#~ msgstr "Producte & Ubicació"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "Planificador MRP & Logística"
|
||||
|
||||
#~ msgid ""
|
||||
|
|
|
@ -2508,7 +2508,7 @@ msgstr "Jahr"
|
|||
#~ msgid "Product & Location"
|
||||
#~ msgstr "Produkt & Lagerort"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "Fertigungs- und Beschaffungsplanung"
|
||||
|
||||
#~ msgid ""
|
||||
|
|
|
@ -2354,7 +2354,7 @@ msgstr ""
|
|||
#~ msgid "Best price (not yet active!)"
|
||||
#~ msgstr "Best price (not yet active!)"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "MRP & Προγραμματισμός Προμηθειών"
|
||||
|
||||
#~ msgid ""
|
||||
|
|
|
@ -2511,7 +2511,7 @@ msgstr "Año"
|
|||
#~ msgid "Product & Location"
|
||||
#~ msgstr "Producto & Ubicación"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "Planificador MRP & Logística"
|
||||
|
||||
#~ msgid ""
|
||||
|
|
|
@ -2385,7 +2385,7 @@ msgstr ""
|
|||
#~ "This is the days added to what you promise to customers for security purpose"
|
||||
#~ msgstr "Nämä päivät lisätään asiakkaalle luvattuun aikaan turvallisuussyistä"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "Tuotanto- ja logistiikka-aikataulut"
|
||||
|
||||
#~ msgid "A purchase order is created for a sub-contracting demand."
|
||||
|
|
|
@ -2501,7 +2501,7 @@ msgstr ""
|
|||
#~ "Questi sono i giorni aggiunti, per sicurezza, alla data che hai promesso ai "
|
||||
#~ "clienti."
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "MRP e Schedulatore Logistico"
|
||||
|
||||
#~ msgid "Automatic Procurements"
|
||||
|
|
|
@ -2246,7 +2246,7 @@ msgstr ""
|
|||
#~ msgid "Product name"
|
||||
#~ msgstr "제품 이름"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "MRP 및 물류 스케줄러"
|
||||
|
||||
#~ msgid "Ask New Products"
|
||||
|
|
|
@ -2464,7 +2464,7 @@ msgstr ""
|
|||
#~ "Dit is het aantal dagen dat als veiligheidsmarge wordt toegevoegd aan de "
|
||||
#~ "beloofde levertijd."
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "MRP & logistieke planning"
|
||||
|
||||
#~ msgid "Product & Location"
|
||||
|
|
|
@ -2283,7 +2283,7 @@ msgstr ""
|
|||
#~ msgid "Origin"
|
||||
#~ msgstr "Pochodzenie"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "MRP i planowanie logistyczne"
|
||||
|
||||
#~ msgid "Product & Location"
|
||||
|
|
|
@ -2500,7 +2500,7 @@ msgstr ""
|
|||
#~ "Estes são os dias adicionados aos que prometeu aos clientes para fins de "
|
||||
#~ "segurança"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "Planificador Logístico e de Produção"
|
||||
|
||||
#~ msgid "Automatic Procurements"
|
||||
|
|
|
@ -2516,7 +2516,7 @@ msgstr ""
|
|||
#~ msgid "Exceptions Procurements"
|
||||
#~ msgstr "Исключения поставок"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "ПМР и Логистическое планирование"
|
||||
|
||||
#~ msgid "Stockable Stock"
|
||||
|
|
|
@ -2230,7 +2230,7 @@ msgstr ""
|
|||
#~ msgid "Ask New Products"
|
||||
#~ msgstr "Opýtať sa na nový produkt"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "MRP a plánovač logistiky"
|
||||
|
||||
#~ msgid "Product & Location"
|
||||
|
|
|
@ -2241,7 +2241,7 @@ msgstr ""
|
|||
#~ msgid "Product & Location"
|
||||
#~ msgstr "Ürün & Lokasyon Bilgisi"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "MRP & Lojistik Planlaması"
|
||||
|
||||
#~ msgid "Ask New Products"
|
||||
|
|
|
@ -2544,7 +2544,7 @@ msgstr ""
|
|||
#~ msgid "Product & Location"
|
||||
#~ msgstr "产品&库位"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "MRP&物流调度"
|
||||
|
||||
#~ msgid ""
|
||||
|
|
|
@ -2255,7 +2255,7 @@ msgstr ""
|
|||
#~ "This is the days added to what you promise to customers for security purpose"
|
||||
#~ msgstr "這是你為了客人的保險而所承諾的天數"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "物料需求計劃 & 物流調度"
|
||||
|
||||
#~ msgid "Automatic Procurements"
|
||||
|
|
|
@ -2251,7 +2251,7 @@ msgstr ""
|
|||
#~ "This is the days added to what you promise to customers for security purpose"
|
||||
#~ msgstr "這是你為了客人的保險而所承諾的天數"
|
||||
|
||||
#~ msgid "MRP & Logistic Scheduler"
|
||||
#~ msgid "MRP & Logistics Scheduler"
|
||||
#~ msgstr "物料需求計劃 & 物流調度"
|
||||
|
||||
#~ msgid "Product & Location"
|
||||
|
|
|
@ -446,18 +446,18 @@ class mrp_production(osv.osv):
|
|||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.production', context=c),
|
||||
}
|
||||
_order = 'priority desc, date_planned asc';
|
||||
|
||||
|
||||
def _check_qty(self, cr, uid, ids):
|
||||
orders = self.browse(cr, uid, ids)
|
||||
for order in orders:
|
||||
if order.product_qty <= 0:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
_constraints = [
|
||||
(_check_qty, 'Order quantity cannot be negative or zero !', ['product_qty']),
|
||||
]
|
||||
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
productions = self.read(cr, uid, ids, ['state'])
|
||||
unlink_ids = []
|
||||
|
@ -639,16 +639,16 @@ class mrp_production(osv.osv):
|
|||
@param production_mode: specify production mode (consume/consume&produce).
|
||||
@return: True
|
||||
"""
|
||||
|
||||
|
||||
stock_mov_obj = self.pool.get('stock.move')
|
||||
production = self.browse(cr, uid, production_id)
|
||||
|
||||
|
||||
final_product_todo = []
|
||||
|
||||
produced_qty = 0
|
||||
if production_mode == 'consume_produce':
|
||||
produced_qty = production_qty
|
||||
|
||||
|
||||
for produced_product in production.move_created_ids2:
|
||||
if (produced_product.scrapped) or (produced_product.product_id.id<>production.product_id.id):
|
||||
continue
|
||||
|
@ -658,7 +658,7 @@ class mrp_production(osv.osv):
|
|||
consumed_products = {}
|
||||
check = {}
|
||||
scrapped = map(lambda x:x.scrapped,production.move_lines2).count(True)
|
||||
|
||||
|
||||
for consumed_product in production.move_lines2:
|
||||
consumed = consumed_product.product_qty
|
||||
if consumed_product.scrapped:
|
||||
|
@ -671,9 +671,9 @@ class mrp_production(osv.osv):
|
|||
if (len(production.move_lines2) - scrapped) > len(production.product_lines):
|
||||
check[consumed_product.product_id.id] += consumed_product.product_qty
|
||||
consumed = check[consumed_product.product_id.id]
|
||||
rest_consumed = produced_qty * f.product_qty / production.product_qty - consumed
|
||||
rest_consumed = produced_qty * f.product_qty / production.product_qty - consumed
|
||||
consumed_products[consumed_product.product_id.id] = rest_consumed
|
||||
|
||||
|
||||
for raw_product in production.move_lines:
|
||||
for f in production.product_lines:
|
||||
if f.product_id.id == raw_product.product_id.id:
|
||||
|
@ -712,7 +712,7 @@ class mrp_production(osv.osv):
|
|||
new_parent_ids.append(final_product.id)
|
||||
for new_parent_id in new_parent_ids:
|
||||
stock_mov_obj.write(cr, uid, [raw_product.id], {'move_history_ids': [(4,new_parent_id)]})
|
||||
|
||||
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'mrp.production', production_id, 'button_produce_done', cr)
|
||||
return True
|
||||
|
@ -750,7 +750,7 @@ class mrp_production(osv.osv):
|
|||
'account_id': account,
|
||||
'general_account_id': wc.costs_general_account_id.id,
|
||||
'journal_id': wc.costs_journal_id.id,
|
||||
'code': wc.code
|
||||
'code': wc.code,
|
||||
} )
|
||||
return amount
|
||||
|
||||
|
@ -827,7 +827,7 @@ class mrp_production(osv.osv):
|
|||
'company_id': production.company_id.id,
|
||||
}
|
||||
res_final_id = move_obj.create(cr, uid, data)
|
||||
|
||||
|
||||
self.write(cr, uid, [production.id], {'move_created_ids': [(6, 0, [res_final_id])]})
|
||||
moves = []
|
||||
for line in production.product_lines:
|
||||
|
@ -879,7 +879,7 @@ class mrp_production(osv.osv):
|
|||
'company_id': production.company_id.id,
|
||||
})
|
||||
wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr)
|
||||
proc_ids.append(proc_id)
|
||||
proc_ids.append(proc_id)
|
||||
wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
|
||||
self.write(cr, uid, [production.id], {'picking_id': picking_id, 'move_lines': [(6,0,moves)], 'state':'confirmed'})
|
||||
message = _("Manufacturing order '%s' is scheduled for the %s.") % (
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field eval="[(4, ref('group_mrp_user'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!--
|
||||
Resource: mrp.workcenter
|
||||
-->
|
||||
|
|
|
@ -585,8 +585,8 @@
|
|||
<page string="Consumed Products">
|
||||
<field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)"/>
|
||||
<field name="routing_id" groups="base.group_extended" select="1" widget="selection"/>
|
||||
<field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)" widget="selection"/>
|
||||
<field name="location_dest_id" domain="[('usage','=','internal')]" widget="selection"/>
|
||||
<field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
|
||||
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
|
||||
<separator string="" colspan="4"/>
|
||||
|
||||
<field colspan="2" name="move_lines" nolabel="1" widget="one2many_list"
|
||||
|
@ -595,7 +595,7 @@
|
|||
<field name="product_id" />
|
||||
<field name="product_qty" string="Qty"/>
|
||||
<field name="product_uom" string="UOM" widget="selection"/>
|
||||
<field name="location_id" string="Source Loc." widget="selection"/>
|
||||
<field name="location_id" string="Source Loc."/>
|
||||
<field name="state" invisible="1"/>
|
||||
<button name="%(stock.move_consume)d"
|
||||
string="Consume Products" type="action"
|
||||
|
@ -614,7 +614,7 @@
|
|||
<field name="product_id" readonly="1"/>
|
||||
<field name="product_qty" readonly="1" string="Qty"/>
|
||||
<field name="product_uom" readonly="1" string="UOM" widget="selection"/>
|
||||
<field name="location_dest_id" readonly="1" string="Destination Loc." widget="selection"/>
|
||||
<field name="location_dest_id" readonly="1" string="Destination Loc."/>
|
||||
<field name="prodlot_id" context="{'product_id': product_id}"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="scrapped" invisible="1"/>
|
||||
|
@ -649,7 +649,7 @@
|
|||
<field name="product_id" />
|
||||
<field name="product_qty" string="Qty"/>
|
||||
<field name="product_uom" string="UOM" widget="selection"/>
|
||||
<field name="location_id" string="Source Loc." widget="selection"/>
|
||||
<field name="location_id" string="Source Loc." />
|
||||
<field name="state" invisible="1"/>
|
||||
<button name="%(stock.action_partial_move)d"
|
||||
string="Partial"
|
||||
|
|
|
@ -67,3 +67,4 @@
|
|||
"access_stock_picking_mrp_manager","stock.picking mrp_manager","stock.model_stock_picking","mrp.group_mrp_manager",1,0,0,0
|
||||
"access_report_mrp_inout_user","report.mrp.inout user","model_report_mrp_inout","mrp.group_mrp_user",1,0,0,0
|
||||
"access_report_workcenter_load_user","report.workcenter.load.user","model_report_workcenter_load","mrp.group_mrp_user",1,0,0,0
|
||||
"access_mrp_bom","mrp.bom","model_mrp_bom","base.group_sale_salesman",1,0,0,0
|
||||
|
|
|
|
@ -9,7 +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"/>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
In order to test the flow of procurement orders. I will put some orders with
|
||||
different procurement methods. I have installed sale, mrp and purchase modules.
|
||||
-
|
||||
I am creating products.
|
||||
-
|
||||
I am creating products.
|
||||
-
|
||||
I create record for product Shirt.
|
||||
-
|
||||
-
|
||||
!record {model: product.product, id: product_product_shirt0}:
|
||||
categ_id: product.cat1
|
||||
cost_method: standard
|
||||
|
@ -26,9 +26,9 @@
|
|||
warranty: 0.0
|
||||
weight: 0.0
|
||||
weight_net: 0.0
|
||||
-
|
||||
-
|
||||
I create record for product Cloth.
|
||||
-
|
||||
-
|
||||
!record {model: product.product, id: product_product_cloth0}:
|
||||
categ_id: product.cat1
|
||||
cost_method: standard
|
||||
|
@ -52,9 +52,9 @@
|
|||
warranty: 0.0
|
||||
weight: 0.0
|
||||
weight_net: 0.0
|
||||
-
|
||||
-
|
||||
I create record for product Buttons.
|
||||
-
|
||||
-
|
||||
!record {model: product.product, id: product_product_buttons0}:
|
||||
categ_id: product.cat1
|
||||
cost_method: standard
|
||||
|
@ -79,10 +79,10 @@
|
|||
weight: 0.0
|
||||
weight_net: 0.0
|
||||
-
|
||||
I am creating bills of material for 'Shirt'.
|
||||
-
|
||||
I am creating bills of material for 'Shirt'.
|
||||
-
|
||||
I create bills of material for Shirt.
|
||||
-
|
||||
-
|
||||
!record {model: mrp.bom, id: mrp_bom_shirt0}:
|
||||
bom_lines:
|
||||
- company_id: base.main_company
|
||||
|
@ -99,7 +99,7 @@
|
|||
product_efficiency: 1.0
|
||||
product_id: product_product_buttons0
|
||||
product_qty: 8.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom: product.product_uom_kgm
|
||||
product_uos_qty: 0.0
|
||||
sequence: 0.0
|
||||
type: normal
|
||||
|
@ -123,7 +123,7 @@
|
|||
product_id: mrp.product_product_buttons0
|
||||
product_max_qty: 50.0
|
||||
product_min_qty: 10.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom: product.product_uom_kgm
|
||||
qty_multiple: 1
|
||||
warehouse_id: stock.warehouse0
|
||||
-
|
||||
|
@ -142,7 +142,7 @@
|
|||
-
|
||||
I run the procurement.
|
||||
-
|
||||
!workflow {model: procurement.order, action: button_check, ref: procurement_order_shirt0}
|
||||
!workflow {model: procurement.order, action: button_check, ref: procurement_order_shirt0}
|
||||
-
|
||||
I see that there is a manufacturing order for Shirt.
|
||||
-
|
||||
|
@ -210,7 +210,7 @@
|
|||
picking_ids = pick_obj.search(cr, uid, [('address_id.name','=','Wong'),('state','=','assigned')])
|
||||
partial = self.browse(cr, uid, 1, context)
|
||||
partial_datas = {
|
||||
'delivery_date' : partial.date
|
||||
'delivery_date' : partial.date
|
||||
}
|
||||
for pick in pick_obj.browse(cr, uid, picking_ids):
|
||||
for m in pick.move_lines:
|
||||
|
@ -219,8 +219,8 @@
|
|||
'product_qty' : m.product_qty,
|
||||
'product_uom' : m.product_uom.id
|
||||
}
|
||||
if (pick.type == 'in') and (m.product_id.cost_method == 'average'):
|
||||
partial_datas['move%s'%(m.id)].update({
|
||||
if (pick.type == 'in') and (m.product_id.cost_method == 'average'):
|
||||
partial_datas['move%s'%(m.id)].update({
|
||||
'product_price' : m.product_price,
|
||||
'product_currency': m.product_currency
|
||||
})
|
||||
|
@ -246,7 +246,7 @@
|
|||
picking_ids = pick_obj.search(cr, uid, [('address_id.name','=','Tang'),('state','=','assigned')])
|
||||
partial = self.browse(cr, uid, 1, context)
|
||||
partial_datas = {
|
||||
'delivery_date': partial.date
|
||||
'delivery_date': partial.date
|
||||
}
|
||||
for pick in pick_obj.browse(cr, uid, picking_ids):
|
||||
for m in pick.move_lines:
|
||||
|
@ -255,8 +255,8 @@
|
|||
'product_qty': m.product_qty,
|
||||
'product_uom': m.product_uom.id
|
||||
}
|
||||
if (pick.type == 'in') and (m.product_id.cost_method == 'average'):
|
||||
partial_datas['move%s'%(m.id)].update({
|
||||
if (pick.type == 'in') and (m.product_id.cost_method == 'average'):
|
||||
partial_datas['move%s'%(m.id)].update({
|
||||
'product_price': m.product_price,
|
||||
'product_currency': m.product_currency
|
||||
})
|
||||
|
@ -323,4 +323,4 @@
|
|||
prod_obj = self.pool.get('mrp.production')
|
||||
prod_ids = prod_obj.search(cr, uid, [('product_id.name','=','Shirt')])
|
||||
self.do_produce(cr, uid, [1], context={'active_ids': prod_ids})
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class mrp_product_produce(osv.osv_memory):
|
|||
_description = "Product Produce"
|
||||
|
||||
_columns = {
|
||||
'product_qty': fields.float('Quantity', required=True),
|
||||
'product_qty': fields.float('Select Quantity', required=True),
|
||||
'mode': fields.selection([('consume_produce', 'Consume & Produce'),
|
||||
('consume', 'Consume Only')], 'Mode', required=True,
|
||||
help="'Consume only' mode will only consume the products with the quantity selected.\n"
|
||||
|
|
|
@ -290,6 +290,12 @@ msgstr ""
|
|||
msgid "No valid pricelist line found !"
|
||||
msgstr ""
|
||||
|
||||
#. module: point_of_sale
|
||||
#: code:addons/point_of_sale/wizard/pos_discount.py:0
|
||||
#, python-format
|
||||
msgid "No Order Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: point_of_sale
|
||||
#: report:pos.details:0
|
||||
#: report:pos.lines:0
|
||||
|
@ -1732,6 +1738,7 @@ msgstr ""
|
|||
|
||||
#. module: point_of_sale
|
||||
#: code:addons/point_of_sale/wizard/pos_payment.py:0
|
||||
#: code:addons/point_of_sale/wizard/pos_discount.py:0
|
||||
#, python-format
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
|
|
|
@ -47,7 +47,7 @@ class pos_discount(osv.osv_memory):
|
|||
record_id = context and context.get('active_id', False) or False
|
||||
order = self.pool.get('pos.order').browse(cr, uid, record_id, context=context)
|
||||
if not order.lines:
|
||||
raise osv.except_osv('Error!','No Order Lines ')
|
||||
raise osv.except_osv(_('Error!'), _('No Order Lines'))
|
||||
True
|
||||
|
||||
def apply_discount(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<field name="inherit_id" ref="base.view_company_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Configuration" position="inside">
|
||||
<separator string="MRP & Logistic Scheduler" colspan="4"/>
|
||||
<separator string="MRP & Logistics Scheduler" colspan="4"/>
|
||||
<field name="schedule_range"/>
|
||||
</page>
|
||||
</field>
|
||||
|
|
|
@ -314,8 +314,8 @@ msgstr "If you encode manually a Procurement, you probably want to use a make to
|
|||
|
||||
#. module: procurement
|
||||
#: view:res.company:0
|
||||
msgid "MRP & Logistic Scheduler"
|
||||
msgstr "MRP & Logistic Scheduler"
|
||||
msgid "MRP & Logistics Scheduler"
|
||||
msgstr "MRP & Logistics Scheduler"
|
||||
|
||||
#. module: procurement
|
||||
#: view:procurement.order.compute.all:0
|
||||
|
|
|
@ -324,7 +324,7 @@ msgstr ""
|
|||
|
||||
#. module: procurement
|
||||
#: view:res.company:0
|
||||
msgid "MRP & Logistic Scheduler"
|
||||
msgid "MRP & Logistics Scheduler"
|
||||
msgstr ""
|
||||
|
||||
#. module: procurement
|
||||
|
|
|
@ -325,7 +325,7 @@ msgstr ""
|
|||
|
||||
#. module: procurement
|
||||
#: view:res.company:0
|
||||
msgid "MRP & Logistic Scheduler"
|
||||
msgid "MRP & Logistics Scheduler"
|
||||
msgstr ""
|
||||
|
||||
#. module: procurement
|
||||
|
|
|
@ -373,7 +373,7 @@ msgstr ""
|
|||
|
||||
#. module: procurement
|
||||
#: view:res.company:0
|
||||
msgid "MRP & Logistic Scheduler"
|
||||
msgid "MRP & Logistics Scheduler"
|
||||
msgstr "Үйлдвэрлэл & Логистик"
|
||||
|
||||
#. module: procurement
|
||||
|
|
|
@ -325,7 +325,7 @@ msgstr ""
|
|||
|
||||
#. module: procurement
|
||||
#: view:res.company:0
|
||||
msgid "MRP & Logistic Scheduler"
|
||||
msgid "MRP & Logistics Scheduler"
|
||||
msgstr ""
|
||||
|
||||
#. module: procurement
|
||||
|
|
|
@ -344,7 +344,7 @@ msgstr ""
|
|||
|
||||
#. module: procurement
|
||||
#: view:res.company:0
|
||||
msgid "MRP & Logistic Scheduler"
|
||||
msgid "MRP & Logistics Scheduler"
|
||||
msgstr "MRP i planowanie logistyczne"
|
||||
|
||||
#. module: procurement
|
||||
|
|
|
@ -332,7 +332,7 @@ msgstr ""
|
|||
|
||||
#. module: procurement
|
||||
#: view:res.company:0
|
||||
msgid "MRP & Logistic Scheduler"
|
||||
msgid "MRP & Logistics Scheduler"
|
||||
msgstr ""
|
||||
|
||||
#. module: procurement
|
||||
|
|
|
@ -342,7 +342,7 @@ msgstr ""
|
|||
|
||||
#. module: procurement
|
||||
#: view:res.company:0
|
||||
msgid "MRP & Logistic Scheduler"
|
||||
msgid "MRP & Logistics Scheduler"
|
||||
msgstr "ПМР и Логистическое планирование"
|
||||
|
||||
#. module: procurement
|
||||
|
|
|
@ -62,11 +62,11 @@ mrp_property()
|
|||
|
||||
class StockMove(osv.osv):
|
||||
_inherit = 'stock.move'
|
||||
|
||||
|
||||
_columns= {
|
||||
'procurements': fields.one2many('procurement.order', 'move_id', 'Procurements'),
|
||||
}
|
||||
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
default = default or {}
|
||||
default['procurements'] = []
|
||||
|
@ -134,7 +134,7 @@ class procurement_order(osv.osv):
|
|||
if s['state'] in ['draft','cancel']:
|
||||
unlink_ids.append(s['id'])
|
||||
else:
|
||||
raise osv.except_osv(_('Invalid action !'),
|
||||
raise osv.except_osv(_('Invalid action !'),
|
||||
_('Cannot delete Procurement Order(s) which are in %s State!') % \
|
||||
s['state'])
|
||||
return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
|
||||
|
@ -165,12 +165,13 @@ class procurement_order(osv.osv):
|
|||
"""
|
||||
return all(procurement.move_id.state == 'cancel' for procurement in self.browse(cr, uid, ids))
|
||||
|
||||
def check_move_done(self, cr, uid, ids, context={}):
|
||||
def check_move_done(self, cr, uid, ids, context=None):
|
||||
""" Checks if move is done or not.
|
||||
@return: True or False.
|
||||
"""
|
||||
return all(procurement.move_id.state == 'done' for procurement in self.browse(cr, uid, ids))
|
||||
|
||||
if not context:
|
||||
context = {}
|
||||
return all(not procurement.move_id or procurement.move_id.state == 'done' for procurement in self.browse(cr, uid, ids, context=context))
|
||||
#
|
||||
# This method may be overrided by objects that override procurement.order
|
||||
# for computing their own purpose
|
||||
|
@ -283,7 +284,7 @@ class procurement_order(osv.osv):
|
|||
if procurement.product_id.product_tmpl_id.supply_method <> 'buy':
|
||||
return False
|
||||
if not procurement.product_id.seller_ids:
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
(_('No supplier defined for this product !'), procurement.id))
|
||||
return False
|
||||
partner = procurement.product_id.seller_id #Taken Main Supplier of Product of Procurement.
|
||||
|
@ -293,7 +294,7 @@ class procurement_order(osv.osv):
|
|||
return False
|
||||
address_id = partner_obj.address_get(cr, uid, [partner.id], ['delivery'])['delivery']
|
||||
if not address_id:
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
(_('No address defined for the supplier'), procurement.id))
|
||||
return False
|
||||
return True
|
||||
|
@ -314,7 +315,7 @@ class procurement_order(osv.osv):
|
|||
move_obj = self.pool.get('stock.move')
|
||||
for procurement in self.browse(cr, uid, ids):
|
||||
if procurement.product_qty <= 0.00:
|
||||
raise osv.except_osv(_('Data Insufficient !'),
|
||||
raise osv.except_osv(_('Data Insufficient !'),
|
||||
_('Please check the Quantity in Procurement Order(s), it should not be less than 1!'))
|
||||
if procurement.product_id.type in ('product', 'consu'):
|
||||
if not procurement.move_id:
|
||||
|
@ -342,7 +343,7 @@ class procurement_order(osv.osv):
|
|||
""" Changes procurement state to Running and writes message.
|
||||
@return: True
|
||||
"""
|
||||
self.write(cr, uid, ids, {'state': 'running',
|
||||
self.write(cr, uid, ids, {'state': 'running',
|
||||
'message': _('from stock: products assigned.')})
|
||||
return True
|
||||
|
||||
|
@ -365,8 +366,8 @@ class procurement_order(osv.osv):
|
|||
ok = ok and self.pool.get('stock.move').action_assign(cr, uid, [id])
|
||||
cr.execute('select count(id) from stock_warehouse_orderpoint where product_id=%s', (procurement.product_id.id,))
|
||||
if not cr.fetchone()[0]:
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
(_('Not enough stock and no minimum orderpoint rule defined.'),
|
||||
cr.execute('update procurement_order set message=%s where id=%s',
|
||||
(_('Not enough stock and no minimum orderpoint rule defined.'),
|
||||
procurement.id))
|
||||
message = _("Procurement '%s' is in exception: not enough stock.") % \
|
||||
(procurement.name,)
|
||||
|
@ -479,7 +480,7 @@ class StockPicking(osv.osv):
|
|||
wf_service.trg_validate(user, 'procurement.order',
|
||||
procurement.id, 'button_check', cursor)
|
||||
return res
|
||||
|
||||
|
||||
StockPicking()
|
||||
|
||||
class stock_warehouse_orderpoint(osv.osv):
|
||||
|
@ -517,7 +518,7 @@ class stock_warehouse_orderpoint(osv.osv):
|
|||
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.warehouse.orderpoint', context=c)
|
||||
}
|
||||
_sql_constraints = [
|
||||
('qty_multiple_check', 'CHECK( qty_multiple > 0 )',
|
||||
('qty_multiple_check', 'CHECK( qty_multiple > 0 )',
|
||||
_('Qty Multiple must be greater than zero.')),
|
||||
]
|
||||
|
||||
|
@ -531,7 +532,7 @@ class stock_warehouse_orderpoint(osv.osv):
|
|||
v = {'location_id': w.lot_stock_id.id}
|
||||
return {'value': v}
|
||||
return {}
|
||||
|
||||
|
||||
def onchange_product_id(self, cr, uid, ids, product_id, context={}):
|
||||
""" Finds UoM for changed product.
|
||||
@param product_id: Changed id of product.
|
||||
|
@ -542,7 +543,7 @@ class stock_warehouse_orderpoint(osv.osv):
|
|||
v = {'product_uom': prod.uom_id.id}
|
||||
return {'value': v}
|
||||
return {}
|
||||
|
||||
|
||||
def copy(self, cr, uid, id, default=None,context={}):
|
||||
if not default:
|
||||
default = {}
|
||||
|
@ -550,6 +551,6 @@ class stock_warehouse_orderpoint(osv.osv):
|
|||
'name': self.pool.get('ir.sequence').get(cr, uid, 'stock.orderpoint') or '',
|
||||
})
|
||||
return super(stock_warehouse_orderpoint, self).copy(cr, uid, id, default, context)
|
||||
|
||||
|
||||
stock_warehouse_orderpoint()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -262,7 +262,7 @@
|
|||
src_model="procurement.order"/>
|
||||
|
||||
<!-- Procurements are located in Warehouse menu hierarchy, MRP users should come to Stock application to use it. -->
|
||||
<menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4" groups="base.group_extended"/>
|
||||
<menuitem id="menu_stock_sched" name="Schedulers" parent="stock.menu_stock_root" sequence="4"/>
|
||||
<menuitem action="action_compute_schedulers" id="menu_stock_proc_schedulers" parent="menu_stock_sched" sequence="20" groups="stock.group_stock_manager"/>
|
||||
<menuitem action="procurement_exceptions" id="menu_stock_procurement_action" parent="menu_stock_sched" sequence="50" groups="stock.group_stock_manager"/>
|
||||
<menuitem id="menu_stock_procurement" name="Automatic Procurements" parent="stock.menu_stock_root" sequence="5" groups="base.group_extended"/>
|
||||
|
|
|
@ -129,9 +129,9 @@ class product_pricelist(osv.osv):
|
|||
#def price_get_multi(self, cr, uid, product_ids, context=None):
|
||||
def price_get_multi(self, cr, uid, pricelist_ids, products_by_qty_by_partner, context=None):
|
||||
"""multi products 'price_get'.
|
||||
@param pricelist_ids:
|
||||
@param products_by_qty:
|
||||
@param partner:
|
||||
@param pricelist_ids:
|
||||
@param products_by_qty:
|
||||
@param partner:
|
||||
@param context: {
|
||||
'date': Date of the pricelist (%Y-%m-%d),}
|
||||
@return: a dict of dict with product_id as key and a dict 'price by pricelist' as value
|
||||
|
@ -234,7 +234,7 @@ class product_pricelist(osv.osv):
|
|||
else:
|
||||
price_tmp = self.price_get(cr, uid,
|
||||
[res['base_pricelist_id']], product_id,
|
||||
qty)[res['base_pricelist_id']]
|
||||
qty, context=context)[res['base_pricelist_id']]
|
||||
ptype_src = self.browse(cr, uid, res['base_pricelist_id']).currency_id.id
|
||||
price = currency_obj.compute(cr, uid, ptype_src, res['currency_id'], price_tmp, round=False)
|
||||
elif res['base'] == -2:
|
||||
|
@ -371,7 +371,7 @@ class product_pricelist(osv.osv):
|
|||
'ORDER BY sequence',
|
||||
(tmpl_id, prod_id, plversion['id'], qty))
|
||||
res1 = cr.dictfetchall()
|
||||
|
||||
|
||||
for res in res1:
|
||||
item_id = 0
|
||||
if res:
|
||||
|
@ -386,7 +386,7 @@ class product_pricelist(osv.osv):
|
|||
res['base_pricelist_id']).currency_id.id
|
||||
price = currency_obj.compute(cr, uid, ptype_src,
|
||||
res['currency_id'], price_tmp, round=False)
|
||||
break
|
||||
break
|
||||
elif res['base'] == -2:
|
||||
where = []
|
||||
if partner:
|
||||
|
@ -413,7 +413,7 @@ class product_pricelist(osv.osv):
|
|||
|
||||
if price:
|
||||
price_limit = price
|
||||
|
||||
|
||||
price = price * (1.0+(res['price_discount'] or 0.0))
|
||||
price = rounding(price, res['price_round'])
|
||||
price += (res['price_surcharge'] or 0.0)
|
||||
|
@ -422,14 +422,14 @@ class product_pricelist(osv.osv):
|
|||
if res['price_max_margin']:
|
||||
price = min(price, price_limit+res['price_max_margin'])
|
||||
item_id = res['id']
|
||||
break
|
||||
break
|
||||
|
||||
else:
|
||||
# False means no valid line found ! But we may not raise an
|
||||
# exception here because it breaks the search
|
||||
price = False
|
||||
result[id] = price
|
||||
result['item_id'] = {id: item_id}
|
||||
result['item_id'] = {id: item_id}
|
||||
if context and ('uom' in context):
|
||||
product = product_obj.browse(cr, uid, prod_id)
|
||||
uom = product.uos_id or product.uom_id
|
||||
|
@ -559,7 +559,7 @@ class product_pricelist_item(osv.osv):
|
|||
}
|
||||
|
||||
_constraints = [
|
||||
(_check_recursion, _('Error ! You cannot assign the Main Pricelist as Other Pricelist in PriceList Item!'), ['base_pricelist_id'])
|
||||
(_check_recursion, 'Error ! You cannot assign the Main Pricelist as Other Pricelist in PriceList Item!', ['base_pricelist_id'])
|
||||
]
|
||||
|
||||
def product_id_change(self, cr, uid, ids, product_id, context={}):
|
||||
|
|
|
@ -24,12 +24,40 @@ import decimal_precision as dp
|
|||
|
||||
import math
|
||||
from _common import rounding
|
||||
import re
|
||||
import re
|
||||
from tools.translate import _
|
||||
|
||||
def is_pair(x):
|
||||
return not x%2
|
||||
|
||||
def check_ean(eancode):
|
||||
if not eancode:
|
||||
return True
|
||||
if len(eancode) <> 13:
|
||||
return False
|
||||
try:
|
||||
int(eancode)
|
||||
except:
|
||||
return False
|
||||
oddsum=0
|
||||
evensum=0
|
||||
total=0
|
||||
eanvalue=eancode
|
||||
reversevalue = eanvalue[::-1]
|
||||
finalean=reversevalue[1:]
|
||||
|
||||
for i in range(len(finalean)):
|
||||
if is_pair(i):
|
||||
oddsum += int(finalean[i])
|
||||
else:
|
||||
evensum += int(finalean[i])
|
||||
total=(oddsum * 3) + evensum
|
||||
|
||||
check = int(10 - math.ceil(total % 10.0))
|
||||
|
||||
if check != int(eancode[-1]):
|
||||
return False
|
||||
return True
|
||||
#----------------------------------------------------------
|
||||
# UOM
|
||||
#----------------------------------------------------------
|
||||
|
@ -69,7 +97,7 @@ class product_uom(osv.osv):
|
|||
'name': fields.char('Name', size=64, required=True, translate=True),
|
||||
'category_id': fields.many2one('product.uom.categ', 'UoM Category', required=True, ondelete='cascade',
|
||||
help="Quantity conversions may happen automatically between Units of Measure in the same category, according to their respective ratios."),
|
||||
'factor': fields.float('Ratio', required=True,digits=(12, 6),
|
||||
'factor': fields.float('Ratio', required=True,digits=(12, 12),
|
||||
help='How many times this UoM is smaller than the reference UoM in this category:\n'\
|
||||
'1 * (reference unit) = ratio * (this unit)'),
|
||||
'factor_inv': fields.function(_factor_inv, digits_compute=dp.get_precision('Product UoM'),
|
||||
|
@ -106,9 +134,14 @@ class product_uom(osv.osv):
|
|||
from_unit, to_unit = uoms[-1], uoms[0]
|
||||
return self._compute_qty_obj(cr, uid, from_unit, qty, to_unit)
|
||||
|
||||
def _compute_qty_obj(self, cr, uid, from_unit, qty, to_unit, context={}):
|
||||
def _compute_qty_obj(self, cr, uid, from_unit, qty, to_unit, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if from_unit.category_id.id <> to_unit.category_id.id:
|
||||
return qty
|
||||
if context.get('raise-exception', True):
|
||||
raise osv.except_osv(_('Error !'), _('Conversion from Product UoM m to Default UoM PCE is not possible as they both belong to different Category!.'))
|
||||
else:
|
||||
return qty
|
||||
amount = qty / from_unit.factor
|
||||
if to_unit:
|
||||
amount = rounding(amount * to_unit.factor, to_unit.rounding)
|
||||
|
@ -342,7 +375,7 @@ class product_product(osv.osv):
|
|||
|
||||
def _product_price(self, cr, uid, ids, name, arg, context={}):
|
||||
res = {}
|
||||
quantity = context.get('quantity', 1)
|
||||
quantity = context.get('quantity') or 1.0
|
||||
pricelist = context.get('pricelist', False)
|
||||
if pricelist:
|
||||
for id in ids:
|
||||
|
@ -423,7 +456,7 @@ class product_product(osv.osv):
|
|||
'incoming_qty': fields.function(_product_incoming_qty, method=True, type='float', string='Incoming'),
|
||||
'outgoing_qty': fields.function(_product_outgoing_qty, method=True, type='float', string='Outgoing'),
|
||||
'price': fields.function(_product_price, method=True, type='float', string='Pricelist', digits_compute=dp.get_precision('Sale Price')),
|
||||
'lst_price' : fields.function(_product_lst_price, method=True, type='float', string='List Price', digits_compute=dp.get_precision('Sale Price')),
|
||||
'lst_price' : fields.function(_product_lst_price, method=True, type='float', string='Public Price', digits_compute=dp.get_precision('Sale Price')),
|
||||
'code': fields.function(_product_code, method=True, type='char', string='Reference'),
|
||||
'partner_ref' : fields.function(_product_partner_ref, method=True, type='char', string='Customer ref'),
|
||||
'default_code' : fields.char('Reference', size=64),
|
||||
|
@ -447,32 +480,18 @@ class product_product(osv.osv):
|
|||
return False
|
||||
|
||||
def _check_ean_key(self, cr, uid, ids):
|
||||
for partner in self.browse(cr, uid, ids):
|
||||
if not partner.ean13:
|
||||
continue
|
||||
if len(partner.ean13) <> 13:
|
||||
return False
|
||||
try:
|
||||
int(partner.ean13)
|
||||
except:
|
||||
return False
|
||||
sum=0
|
||||
for i in range(12):
|
||||
if is_pair(i):
|
||||
sum += int(partner.ean13[i])
|
||||
else:
|
||||
sum += 3 * int(partner.ean13[i])
|
||||
check = int(math.ceil(sum / 10.0) * 10 - sum)
|
||||
if check != int(partner.ean13[12]):
|
||||
return False
|
||||
return True
|
||||
for product in self.browse(cr, uid, ids):
|
||||
res = check_ean(product.ean13)
|
||||
return res
|
||||
|
||||
_constraints = [(_check_ean_key, 'Error: Invalid ean code', ['ean13'])]
|
||||
|
||||
def on_order(self, cr, uid, ids, orderline, quantity):
|
||||
pass
|
||||
|
||||
def name_get(self, cr, user, ids, context={}):
|
||||
def name_get(self, cr, user, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if not len(ids):
|
||||
return []
|
||||
def _name_get(d):
|
||||
|
@ -480,10 +499,26 @@ class product_product(osv.osv):
|
|||
code = d.get('default_code',False)
|
||||
if code:
|
||||
name = '[%s] %s' % (code,name)
|
||||
if d['variants']:
|
||||
if d.get('variants'):
|
||||
name = name + ' - %s' % (d['variants'],)
|
||||
return (d['id'], name)
|
||||
result = map(_name_get, self.read(cr, user, ids, ['variants','name','default_code'], context))
|
||||
|
||||
partner_id = context.get('partner_id', False)
|
||||
|
||||
result = []
|
||||
for product in self.browse(cr, user, ids, context=context):
|
||||
sellers = filter(lambda x: x.name.id == partner_id, product.seller_ids)
|
||||
if sellers:
|
||||
for s in sellers:
|
||||
mydict = {
|
||||
'id': product.id,
|
||||
'name': s.product_name or product.name,
|
||||
'default_code': s.product_code or product.default_code,
|
||||
'variants': product.variants
|
||||
}
|
||||
result.append(_name_get(mydict))
|
||||
else:
|
||||
result.append(_name_get(self.read(cr, user, product.id, ['variants','name','default_code'], context)))
|
||||
return result
|
||||
|
||||
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
|
||||
|
@ -595,6 +630,13 @@ class product_packaging(osv.osv):
|
|||
}
|
||||
|
||||
|
||||
def _check_ean_key(self, cr, uid, ids):
|
||||
for pack in self.browse(cr, uid, ids):
|
||||
res = check_ean(pack.ean)
|
||||
return res
|
||||
|
||||
_constraints = [(_check_ean_key, 'Error: Invalid ean code', ['ean'])]
|
||||
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
if not len(ids):
|
||||
return []
|
||||
|
@ -649,7 +691,7 @@ class product_supplierinfo(osv.osv):
|
|||
return res and res[0] or False
|
||||
|
||||
_columns = {
|
||||
'name' : fields.many2one('res.partner', 'Supplier', required=True, ondelete='cascade', help="Supplier of this product"),
|
||||
'name' : fields.many2one('res.partner', 'Supplier', required=True,domain = [('supplier','=',True)], ondelete='cascade', help="Supplier of this product"),
|
||||
'product_name': fields.char('Supplier Product Name', size=128, help="This supplier's product name will be used when printing a request for quotation. Keep empty to use the internal one."),
|
||||
'product_code': fields.char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."),
|
||||
'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."),
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<!--
|
||||
Resource: product.category
|
||||
-->
|
||||
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field eval="[(4, ref('base.group_sale_salesman'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: product.category
|
||||
-->
|
||||
|
||||
<record id="cat1" model="product.category">
|
||||
<field name="parent_id" ref="product.cat0"/>
|
||||
<field name="name">Sellable</field>
|
||||
|
@ -52,40 +57,40 @@
|
|||
|
||||
|
||||
|
||||
<record id="product_category_marketableproduct0" model="product.category">
|
||||
<field name="name">Marketable Products</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_shelves0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_marketableproduct0"/>
|
||||
<field name="name">Shelves</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_otherproducts0" model="product.category">
|
||||
<field name="name">Other Products</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_rawmaterial0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_otherproducts0"/>
|
||||
<field name="name">Raw Materials</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_services0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_marketableproduct0"/>
|
||||
<field name="name">Marketable Services</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_misc0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_otherproducts0"/>
|
||||
<field name="name">Misc</field>
|
||||
</record>
|
||||
<record id="product_category_marketableproduct0" model="product.category">
|
||||
<field name="name">Marketable Products</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_shelves0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_marketableproduct0"/>
|
||||
<field name="name">Shelves</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_otherproducts0" model="product.category">
|
||||
<field name="name">Other Products</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_rawmaterial0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_otherproducts0"/>
|
||||
<field name="name">Raw Materials</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_services0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_marketableproduct0"/>
|
||||
<field name="name">Marketable Services</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_category_misc0" model="product.category">
|
||||
<field name="parent_id" ref="product_category_otherproducts0"/>
|
||||
<field name="name">Misc</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record id="product_ul_box" model="product.ul">
|
||||
<field name="name">Box 20x20x40</field>
|
||||
<field name="type">box</field>
|
||||
|
@ -94,11 +99,11 @@
|
|||
<field name="name">Box 30x40x60</field>
|
||||
<field name="type">box</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!--
|
||||
Resource: product.product
|
||||
-->
|
||||
|
||||
|
||||
<record id="product_product_0" model="product.product">
|
||||
<field name="list_price">38.25</field>
|
||||
<field name="standard_price">25.5</field>
|
||||
|
@ -126,6 +131,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">2.0</field>
|
||||
<field name="name">Basic PC</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_pc"/>
|
||||
</record>
|
||||
<record id="product_product_pc2" model="product.product">
|
||||
|
@ -138,6 +144,7 @@
|
|||
<field name="procure_method">make_to_order</field>
|
||||
<field name="sale_delay">18.0</field>
|
||||
<field name="name">Basic+ PC (assembly on order)</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_pc"/>
|
||||
</record>
|
||||
<record id="product_product_pc3" model="product.product">
|
||||
|
@ -149,6 +156,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">3.0</field>
|
||||
<field name="name">Medium PC</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_pc"/>
|
||||
</record>
|
||||
<record id="product_product_pc4" model="product.product">
|
||||
|
@ -160,6 +168,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="name">Customizable PC</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_pc"/>
|
||||
<field name="state">end</field>
|
||||
</record>
|
||||
|
@ -171,6 +180,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">Mainboard ASUStek A7N8X</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_mb2" model="product.product">
|
||||
|
@ -181,6 +191,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">Mainboard ASUStek A7V8X-X</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
<field name="state">draft</field>
|
||||
</record>
|
||||
|
@ -192,6 +203,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">Processor AMD Athlon XP 1800+</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_cpu3" model="product.product">
|
||||
|
@ -202,6 +214,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">Processor AMD Athlon XP 2200+</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_hdd1" model="product.product">
|
||||
|
@ -212,6 +225,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">HDD Seagate 7200.8 80GB</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_hdd2" model="product.product">
|
||||
|
@ -222,6 +236,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">HDD Seagate 7200.8 120GB</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_hdd3" model="product.product">
|
||||
|
@ -233,6 +248,7 @@
|
|||
<field name="procure_method">make_to_order</field>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">HDD Seagate 7200.8 160GB</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_fan" model="product.product">
|
||||
|
@ -243,6 +259,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">Regular case fan 80mm</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_fan2" model="product.product">
|
||||
|
@ -253,6 +270,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">Silent fan</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="cat1"/>
|
||||
</record>
|
||||
<record id="product_product_cpu_gen" model="product.product">
|
||||
|
@ -265,6 +283,7 @@
|
|||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">Regular processor config</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_ram" model="product.product">
|
||||
|
@ -275,6 +294,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">DDR 256MB PC400</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_pc"/>
|
||||
</record>
|
||||
<record id="product_product_ram512" model="product.product">
|
||||
|
@ -285,6 +305,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">DDR 512MB PC400</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_cpu2" model="product.product">
|
||||
|
@ -297,6 +318,7 @@
|
|||
<field name="procure_method">make_to_order</field>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">High speed processor config</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_tow1" model="product.product">
|
||||
|
@ -307,6 +329,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">ATX Mid-size Tower</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_20" model="product.product">
|
||||
|
@ -319,6 +342,7 @@
|
|||
<field name="procure_method">make_to_order</field>
|
||||
<field name="sale_delay">1.0</field>
|
||||
<field name="name">HDD on demand</field>
|
||||
<field name="type">product</field>
|
||||
<field eval="False" name="sale_ok"/>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
|
@ -331,6 +355,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">RAM on demand</field>
|
||||
<field eval="False" name="sale_ok"/>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_22" model="product.product">
|
||||
|
@ -341,6 +366,7 @@
|
|||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Processor on demand</field>
|
||||
<field name="type">product</field>
|
||||
<field eval="False" name="sale_ok"/>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
|
@ -352,6 +378,7 @@
|
|||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Complete PC With Peripherals</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_24" model="product.product">
|
||||
|
@ -362,6 +389,7 @@
|
|||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Keyboard</field>
|
||||
<field name="variants">AZERTY</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_25" model="product.product">
|
||||
|
@ -371,6 +399,7 @@
|
|||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Mouse</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_10"/>
|
||||
</record>
|
||||
<record id="product_product_26" model="product.product">
|
||||
|
@ -381,6 +410,7 @@
|
|||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Kit Keyboard + Mouse</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_11"/>
|
||||
</record>
|
||||
|
||||
|
@ -388,213 +418,223 @@
|
|||
Resource: product.product NEW EVV
|
||||
-->
|
||||
|
||||
<record id="product_product_shelfofcm0" model="product.product">
|
||||
<record id="product_product_shelfofcm0" model="product.product">
|
||||
<field name="default_code">SHE100</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="list_price">130.0</field>
|
||||
<field name="standard_price">50.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Shelf of 100cm</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Shelf of 100cm</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_shelves0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_shelfofcm1" model="product.product">
|
||||
</record>
|
||||
|
||||
<record id="product_product_shelfofcm1" model="product.product">
|
||||
<field name="default_code">SHE200</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="list_price">210.0</field>
|
||||
<field name="standard_price">80.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Shelf of 200cm</field>
|
||||
<field name="categ_id" ref="product_category_shelves0"/>
|
||||
</record>
|
||||
<record id="product_product_woodmm0" model="product.product">
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Shelf of 200cm</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_shelves0"/>
|
||||
</record>
|
||||
<record id="product_product_woodmm0" model="product.product">
|
||||
<field name="default_code">WOOD002</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">5.0</field>
|
||||
<field name="uom_id" ref="product_uom_meter"/>
|
||||
<field name="uom_po_id" ref="product_uom_meter"/>
|
||||
<field name="name">Wood 2mm</field>
|
||||
<field eval="10" name="seller_delay"/>
|
||||
<field eval="7.0" name="sale_delay"/>
|
||||
<field name="categ_id" ref="product_category_rawmaterial0"/>
|
||||
</record>
|
||||
<field name="uom_id" ref="product_uom_meter"/>
|
||||
<field name="uom_po_id" ref="product_uom_meter"/>
|
||||
<field name="name">Wood 2mm</field>
|
||||
<field eval="10" name="seller_delay"/>
|
||||
<field eval="7.0" name="sale_delay"/>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_rawmaterial0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_kitchendesignproject0" model="product.product">
|
||||
<record id="product_product_kitchendesignproject0" model="product.product">
|
||||
<field name="default_code">PROJ</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="type">service</field>
|
||||
<field name="list_price">90.0</field>
|
||||
<field name="standard_price">20.0</field>
|
||||
<field name="uom_id" ref="uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom_hour"/>
|
||||
<field name="name">Kitchen Design Project</field>
|
||||
<field name="categ_id" ref="product_category_services0"/>
|
||||
</record>
|
||||
<field name="uom_id" ref="uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom_hour"/>
|
||||
<field name="name">Kitchen Design Project</field>
|
||||
<field name="categ_id" ref="product_category_services0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_employee0" model="product.product">
|
||||
<record id="product_product_employee0" model="product.product">
|
||||
<field name="default_code">EMPL</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="type">service</field>
|
||||
<field name="list_price">200.0</field>
|
||||
<field name="standard_price">50.0</field>
|
||||
<field name="uom_id" ref="uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom_hour"/>
|
||||
<field name="name">Employee</field>
|
||||
<field name="categ_id" ref="product_category_services0"/>
|
||||
</record>
|
||||
<field name="uom_id" ref="uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom_hour"/>
|
||||
<field name="name">Employee</field>
|
||||
<field name="categ_id" ref="product_category_services0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_restaurantexpenses0" model="product.product">
|
||||
<record id="product_product_restaurantexpenses0" model="product.product">
|
||||
<field name="default_code">REST</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="type">consu</field>
|
||||
<field name="list_price">1.0</field>
|
||||
<field name="standard_price">1.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Restaurant Expenses</field>
|
||||
<field name="categ_id" ref="product_category_otherproducts0"/>
|
||||
</record>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Restaurant Expenses</field>
|
||||
<field name="categ_id" ref="product_category_otherproducts0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_worker0" model="product.product">
|
||||
<field name="default_code">WORK</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="type">service</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field eval="1" name="purchase_ok"/>
|
||||
<field name="standard_price">20.0</field>
|
||||
<field name="uom_id" ref="uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom_hour"/>
|
||||
<field name="name">Worker</field>
|
||||
<field name="categ_id" ref="product_category_services0"/>
|
||||
</record>
|
||||
<record id="product_product_worker0" model="product.product">
|
||||
<field name="default_code">WORK</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="type">service</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field eval="1" name="purchase_ok"/>
|
||||
<field name="standard_price">20.0</field>
|
||||
<field name="uom_id" ref="uom_hour"/>
|
||||
<field name="uom_po_id" ref="uom_hour"/>
|
||||
<field name="name">Worker</field>
|
||||
<field name="categ_id" ref="product_category_services0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_rearpanelarm0" model="product.product">
|
||||
<record id="product_product_rearpanelarm0" model="product.product">
|
||||
<field name="default_code">RPAN100</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">10.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rear Panel SHE100</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rear Panel SHE100</field>
|
||||
<field eval="5" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_rearpanelarm1" model="product.product">
|
||||
<record id="product_product_rearpanelarm1" model="product.product">
|
||||
<field name="default_code">RPAN200</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">13.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rear Panel SHE200</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rear Panel SHE200</field>
|
||||
<field eval="5" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_sidepanel0" model="product.product">
|
||||
<record id="product_product_sidepanel0" model="product.product">
|
||||
<field name="default_code">SIDEPAN</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">3.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Side Panel</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Side Panel</field>
|
||||
<field eval="5" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_shelf0" model="product.product">
|
||||
<record id="product_product_shelf0" model="product.product">
|
||||
<field name="default_code">RCK100</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">5.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rack 100cm</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rack 100cm</field>
|
||||
<field eval="8" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_shelf1" model="product.product">
|
||||
<record id="product_product_shelf1" model="product.product">
|
||||
<field name="default_code">RCK200</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">4.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rack 200cm</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Rack 200cm</field>
|
||||
<field eval="8" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_product_assemblysection0" model="product.product">
|
||||
<record id="product_product_assemblysection0" model="product.product">
|
||||
<field name="default_code">PROFIL</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="list_price">1.0</field>
|
||||
<field name="standard_price">2.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Assembly Section</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Assembly Section</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="product_product_woodlintelm0" model="product.product">
|
||||
<record id="product_product_woodlintelm0" model="product.product">
|
||||
<field name="default_code">LIN40</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field name="standard_price">8.0</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Wood Lintel 4m</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Wood Lintel 4m</field>
|
||||
<field eval="10" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_metalcleats0" model="product.product">
|
||||
<record id="product_product_metalcleats0" model="product.product">
|
||||
<field name="default_code">METC000</field>
|
||||
<field name="supply_method">buy</field>
|
||||
<field eval="0" name="sale_ok"/>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Metal Cleats</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Metal Cleats</field>
|
||||
<field eval="20" name="seller_delay"/>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_hotelexpenses0" model="product.product">
|
||||
<record id="product_product_hotelexpenses0" model="product.product">
|
||||
<field name="default_code">HOT</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="type">consu</field>
|
||||
<field name="list_price">1.0</field>
|
||||
<field name="standard_price">1.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Hotel Expenses</field>
|
||||
<field name="categ_id" ref="product_category_otherproducts0"/>
|
||||
</record>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Hotel Expenses</field>
|
||||
<field name="categ_id" ref="product_category_otherproducts0"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_kitshelfofcm0" model="product.product">
|
||||
<record id="product_product_kitshelfofcm0" model="product.product">
|
||||
<field name="default_code">SHE100KIT</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_order'" name="procure_method"/>
|
||||
<field name="list_price">110.0</field>
|
||||
<field name="standard_price">48.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">KIT Shelf of 100cm</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">KIT Shelf of 100cm</field>
|
||||
<field eval="0" name="purchase_ok"/>
|
||||
<field name="categ_id" ref="product_category_shelves0"/>
|
||||
</record>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_shelves0"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Resource: product.supplierinfo
|
||||
|
@ -741,77 +781,76 @@
|
|||
Resource: product.supplierinfo NEW for training
|
||||
-->
|
||||
|
||||
<record id="product_supplierinfo_0" model="product.supplierinfo">
|
||||
<record id="product_supplierinfo_0" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_rearpanelarm0"/>
|
||||
<field name="delay">10</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_1" model="product.supplierinfo">
|
||||
<record id="product_supplierinfo_1" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_rearpanelarm0"/>
|
||||
<field name="delay">5</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_2" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_rearpanelarm1"/>
|
||||
<record id="product_supplierinfo_2" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_rearpanelarm1"/>
|
||||
<field name="delay">5</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_3" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_sidepanel0"/>
|
||||
<record id="product_supplierinfo_3" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_sidepanel0"/>
|
||||
<field name="delay">5</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_4" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_shelfofcm0"/>
|
||||
<record id="product_supplierinfo_4" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_shelfofcm0"/>
|
||||
<field name="delay">8</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_5" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_shelfofcm1"/>
|
||||
<record id="product_supplierinfo_5" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_shelfofcm1"/>
|
||||
<field name="delay">8</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_6" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_assemblysection0"/>
|
||||
<record id="product_supplierinfo_6" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_assemblysection0"/>
|
||||
<field name="delay">2</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_7" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_woodlintelm0"/>
|
||||
<record id="product_supplierinfo_7" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_woodlintelm0"/>
|
||||
<field name="delay">10</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_supplierinfo_8" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_metalcleats0"/>
|
||||
<record id="product_supplierinfo_8" model="product.supplierinfo">
|
||||
<field name="product_id" ref="product_product_metalcleats0"/>
|
||||
<field name="delay">20</field>
|
||||
<field name="min_qty">1</field>
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
<field name="name" ref="base.res_partner_woodywoodpecker0"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
|
|
|
@ -51,8 +51,8 @@
|
|||
<field name="qty_available"/>
|
||||
<field name="virtual_available"/>
|
||||
<field name="lst_price"/>
|
||||
<field name="standard_price"/>
|
||||
<field name="price" invisible="not context.get('pricelist',False)"/>
|
||||
<field name="standard_price"/>
|
||||
<field name="state" groups="base.group_extended"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
|
|
@ -45,19 +45,19 @@ class stock_production_lot(osv.osv):
|
|||
|
||||
_columns = {
|
||||
'life_date': fields.datetime('End of Life Date',
|
||||
help='The date the lot may become dangerous and should not be consumed.'),
|
||||
help='The date on which the lot may become dangerous and should not be consumed.'),
|
||||
'use_date': fields.datetime('Best before Date',
|
||||
help='The date the lot starts deteriorating without becoming dangerous.'),
|
||||
help='The date on which the lot starts deteriorating without becoming dangerous.'),
|
||||
'removal_date': fields.datetime('Removal Date',
|
||||
help='The date the lot should be removed.'),
|
||||
'alert_date': fields.datetime('Alert Date', help="The date signifying an alert to notify about the production lot."),
|
||||
help='The date on which the lot should be removed.'),
|
||||
'alert_date': fields.datetime('Alert Date', help="The date on which an alert should be notified about the production lot."),
|
||||
}
|
||||
# Assign dates according to products data
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
newid = super(stock_production_lot, self).create(cr, uid, vals, context=context)
|
||||
obj = self.browse(cr, uid, newid, context=context)
|
||||
towrite = []
|
||||
for f in ('life_date','use_date','removal_date','alert_date'):
|
||||
for f in ('life_date', 'use_date', 'removal_date', 'alert_date'):
|
||||
if not getattr(obj, f):
|
||||
towrite.append(f)
|
||||
context = context or {}
|
||||
|
@ -82,8 +82,7 @@ class product_product(osv.osv):
|
|||
help='The number of days before a production lot starts deteriorating without becoming dangerous.'),
|
||||
'removal_time': fields.integer('Product Removal Time',
|
||||
help='The number of days before a production lot should be removed.'),
|
||||
'alert_time': fields.integer('Product Alert Time', help="The number of days after which, needs an alert to notify about the production lot."),
|
||||
'alert_time': fields.integer('Product Alert Time', help="The number of days after which an alert should be notified about the production lot."),
|
||||
}
|
||||
product_product()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class sale_order_line(osv.osv):
|
|||
uom=False, qty_uos=0, uos=False, name='', partner_id=False,
|
||||
lang=False, update_tax=True,date_order=False,packaging=False,fiscal_position=False, flag=False):
|
||||
|
||||
def get_real_price(res_dict, product_id, pricelist):
|
||||
def get_real_price(res_dict, product_id, qty, uom, pricelist):
|
||||
item_obj = self.pool.get('product.pricelist.item')
|
||||
price_type_obj = self.pool.get('product.price.type')
|
||||
product_obj = self.pool.get('product.product')
|
||||
|
@ -56,10 +56,17 @@ class sale_order_line(osv.osv):
|
|||
if item_base > 0:
|
||||
field_name = price_type_obj.browse(cr, uid, item_base).field
|
||||
|
||||
product_tmpl_id = product_obj.browse(cr, uid, product_id, context).product_tmpl_id.id
|
||||
product = product_obj.browse(cr, uid, product_id, context)
|
||||
product_tmpl_id = product.product_tmpl_id.id
|
||||
|
||||
product_read = template_obj.read(cr, uid, product_tmpl_id, [field_name], context)
|
||||
return product_read[field_name]
|
||||
|
||||
factor = 1.0
|
||||
if uom and uom != product.uom_id.id:
|
||||
product_uom_obj = self.pool.get('product.uom')
|
||||
uom_data = product_uom_obj.browse(cr, uid, product.uom_id.id)
|
||||
factor = uom_data.factor
|
||||
return product_read[field_name] * factor
|
||||
|
||||
|
||||
res=super(sale_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty,
|
||||
|
@ -84,7 +91,7 @@ class sale_order_line(osv.osv):
|
|||
pricelists = pricelist_obj.read(cr,uid,[pricelist],['visible_discount'])
|
||||
|
||||
old_uom = product.uos_id or product.uom_id
|
||||
new_list_price = get_real_price(list_price, product.id, pricelist)
|
||||
new_list_price = get_real_price(list_price, product.id, qty, uom, pricelist)
|
||||
if(len(pricelists)>0 and pricelists[0]['visible_discount'] and list_price[pricelist] != 0):
|
||||
discount = (new_list_price - price) / new_list_price * 100
|
||||
result['price_unit'] = new_list_price
|
||||
|
@ -101,7 +108,7 @@ class account_invoice_line(osv.osv):
|
|||
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context={}):
|
||||
res = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context)
|
||||
|
||||
def get_real_price(res_dict, product_id, pricelist):
|
||||
def get_real_price(res_dict, product_id, qty, uom, pricelist):
|
||||
item_obj = self.pool.get('product.pricelist.item')
|
||||
price_type_obj = self.pool.get('product.price.type')
|
||||
product_obj = self.pool.get('product.product')
|
||||
|
@ -114,10 +121,17 @@ class account_invoice_line(osv.osv):
|
|||
if item_base > 0:
|
||||
field_name = price_type_obj.browse(cr, uid, item_base).field
|
||||
|
||||
product_tmpl_id = product_obj.browse(cr, uid, product_id, context).product_tmpl_id.id
|
||||
product = product_obj.browse(cr, uid, product_id, context)
|
||||
product_tmpl_id = product.product_tmpl_id.id
|
||||
|
||||
product_read = template_obj.read(cr, uid, product_tmpl_id, [field_name], context)
|
||||
return product_read[field_name]
|
||||
|
||||
factor = 1.0
|
||||
if uom and uom != product.uom_id.id:
|
||||
product_uom_obj = self.pool.get('product.uom')
|
||||
uom_data = product_uom_obj.browse(cr, uid, product.uom_id.id)
|
||||
factor = uom_data.factor
|
||||
return product_read[field_name] * factor
|
||||
|
||||
if product:
|
||||
pricelist_obj = self.pool.get('product.pricelist')
|
||||
|
@ -133,7 +147,7 @@ class account_invoice_line(osv.osv):
|
|||
raise osv.except_osv(_('No Purchase Pricelist Found !'),_("You must first define a pricelist for Supplier !"))
|
||||
price_unit_res = pricelist_obj.price_get(cr, uid, [pricelist], product.id, qty or 1.0, partner_id, {'uom': uom})[pricelist]
|
||||
price_unit = price_unit_res[pricelist]
|
||||
real_price = get_real_price(price_unit_res, product.id, pricelist)
|
||||
real_price = get_real_price(price_unit_res, product.id, qty, uom, pricelist)
|
||||
else:
|
||||
if partner_id:
|
||||
pricelist = partner_obj.browse(cr, uid, partner_id).property_product_pricelist.id
|
||||
|
@ -142,7 +156,7 @@ class account_invoice_line(osv.osv):
|
|||
price_unit_res = pricelist_obj.price_get(cr, uid, [pricelist], product.id, qty or 1.0, partner_id, {'uom': uom})
|
||||
price_unit = price_unit_res[pricelist]
|
||||
|
||||
real_price = get_real_price(price_unit_res, product.id, pricelist)
|
||||
real_price = get_real_price(price_unit_res, product.id, qty, uom, pricelist)
|
||||
if pricelist:
|
||||
pricelists=pricelist_obj.read(cr,uid,[pricelist],['visible_discount'])
|
||||
if(len(pricelists)>0 and pricelists[0]['visible_discount'] and real_price != 0):
|
||||
|
|
|
@ -86,7 +86,7 @@ class project(osv.osv):
|
|||
cr.execute('''SELECT
|
||||
project_id, sum(planned_hours), sum(total_hours), sum(effective_hours), SUM(remaining_hours)
|
||||
FROM
|
||||
project_task
|
||||
project_task
|
||||
WHERE
|
||||
project_id in %s AND
|
||||
state<>'cancelled'
|
||||
|
@ -476,7 +476,7 @@ class task(osv.osv):
|
|||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_recursion, _('Error ! You cannot create recursive tasks.'), ['parent_ids'])
|
||||
(_check_recursion, 'Error ! You cannot create recursive tasks.', ['parent_ids'])
|
||||
]
|
||||
#
|
||||
# Override view according to the company definition
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!-- Users -->
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field name="groups_id" eval="[(4,ref('group_project_user'))]"/>
|
||||
<field eval="[(4, ref('base.group_sale_salesman')),(4, ref('group_project_user'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="res_users_analyst" model="res.users">
|
||||
|
|
|
@ -131,7 +131,6 @@
|
|||
</child1>
|
||||
<child2>
|
||||
<action colspan="4" height="220" name="%(action_purchase_order_monthly_categ_graph)d" string="Monthly Purchase by Category" />
|
||||
<action colspan="4" height="220" name="%(action_negotiation_by_supplier)d" string="Negotiation by Supplier" />
|
||||
<!--
|
||||
<action colspan="4" height="220" name="%(purchase.action_purchase_by_supplier)d" string="Purchase by supplier" />
|
||||
<action colspan="4" height="220" name="%(purchase.action_total_price_by_product_by_state)d" string="Total price by product by state" />
|
||||
|
|
|
@ -646,6 +646,8 @@ class purchase_order_line(osv.osv):
|
|||
return {'value': {'price_unit': price_unit or 0.0, 'name': name or '',
|
||||
'notes': notes or'', 'product_uom' : uom or False}, 'domain':{'product_uom':[]}}
|
||||
prod= self.pool.get('product.product').browse(cr, uid, product)
|
||||
|
||||
|
||||
lang=False
|
||||
if partner_id:
|
||||
lang=self.pool.get('res.partner').read(cr, uid, partner_id, ['lang'])['lang']
|
||||
|
@ -660,6 +662,9 @@ class purchase_order_line(osv.osv):
|
|||
date_order = time.strftime('%Y-%m-%d')
|
||||
qty = qty or 1.0
|
||||
seller_delay = 0
|
||||
|
||||
prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id], context=context)[0][1]
|
||||
|
||||
for s in prod.seller_ids:
|
||||
if s.name.id == partner_id:
|
||||
seller_delay = s.delay
|
||||
|
@ -675,7 +680,6 @@ class purchase_order_line(osv.osv):
|
|||
'date': date_order,
|
||||
})[pricelist]
|
||||
dt = (datetime.now() + relativedelta(days=int(seller_delay) or 0.0)).strftime('%Y-%m-%d %H:%M:%S')
|
||||
prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id])[0][1]
|
||||
|
||||
|
||||
res = {'value': {'price_unit': price, 'name': name or prod_name,
|
||||
|
|
|
@ -2,20 +2,24 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field eval="[(4, ref('group_purchase_user'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<!--Resource: purchase.order-->
|
||||
|
||||
<record id="order_purchase1" model="purchase.order">
|
||||
<field model="stock.location" name="location_id" search="[]"/>
|
||||
<field name="location_id" ref="stock.stock_location_stock"/>
|
||||
<field model="product.pricelist" name="pricelist_id" search="[]"/>
|
||||
<field model="res.partner" name="partner_id" search="[('supplier','=','True')]" />
|
||||
<field model="res.partner.address" name="partner_address_id" search="[]"/>
|
||||
<field name="partner_id" ref="base.res_partner_asus"/>
|
||||
<field name="partner_address_id" ref="base.res_partner_address_tang"/>
|
||||
</record>
|
||||
|
||||
<record id="order_purchase2" model="purchase.order">
|
||||
<field model="stock.location" name="location_id" search="[]"/>
|
||||
<field name="location_id" ref="stock.stock_location_stock"/>
|
||||
<field model="product.pricelist" name="pricelist_id" search="[]"/>
|
||||
<field model="res.partner" name="partner_id" search="[('supplier','=','True')]" />
|
||||
<field model="res.partner.address" name="partner_address_id" search="[]"/>
|
||||
<field name="partner_id" ref="base.res_partner_3"/>
|
||||
<field name="partner_address_id" ref="base.res_partner_address_zen"/>
|
||||
</record>
|
||||
|
||||
<!--Resource: purchase.order.line-->
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
"access_stock_warehouse_purchase_user","stock.warehouse","stock.model_stock_warehouse","group_purchase_user",1,0,0,0
|
||||
"access_stock_picking_purchase_user","stock.picking","stock.model_stock_picking","group_purchase_user",1,1,1,1
|
||||
"access_stock_move_purchase_user","stock.move","stock.model_stock_move","group_purchase_user",1,1,1,1
|
||||
"access_purchase_order_stock_worker","purchase.order","model_purchase_order","stock.group_stock_user",1,0,0,0
|
||||
"access_purchase_order_line_stock_worker","purchase.order.line","model_purchase_order_line","stock.group_stock_user",1,0,0,0
|
||||
"access_purchase_order_stock_worker","purchase.order","model_purchase_order","stock.group_stock_user",1,1,1,0
|
||||
"access_purchase_order_line_stock_worker","purchase.order.line","model_purchase_order_line","stock.group_stock_user",1,0,1,0
|
||||
"access_account_tax_purchase_user","account.tax","account.model_account_tax","group_purchase_user",1,0,0,0
|
||||
"access_report_purchase_order","purchase.report","model_purchase_report","group_purchase_manager",1,1,1,1
|
||||
"access_report_purchase_order_user","purchase.report user","model_purchase_report","group_purchase_user",1,0,0,0
|
||||
|
@ -42,3 +42,5 @@
|
|||
"access_account_move_reconcile","account.move.reconcile","account.model_account_move_reconcile","group_purchase_user",1,1,1,1
|
||||
"access_report_stock_move","report.stock.move.manager","stock.model_report_stock_move","group_purchase_manager",1,1,1,1
|
||||
"access_report_stock_move_user","report.stock.move.user","stock.model_report_stock_move","group_purchase_user",1,0,0,0
|
||||
"access_stock_production_lot_user","stock.production.lot user","stock.model_stock_production_lot","group_purchase_user",1,0,1,0
|
||||
"access_stock_production_lot_revision","stock.production.lot.revision","stock.model_stock_production_lot_revision","group_purchase_user",1,0,1,0
|
||||
|
|
|
|
@ -9,7 +9,6 @@
|
|||
<field name="name">Purchase / User</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.rule" id="purchase_order_comp_rule">
|
||||
<field name="name">Purchase Order multi-company</field>
|
||||
<field name="model_id" ref="model_purchase_order"/>
|
||||
|
|
|
@ -37,7 +37,7 @@ class stock_move(osv.osv):
|
|||
"""
|
||||
reference_amount, reference_currency_id = super(stock_move, self)._get_reference_accounting_values_for_valuation(cr, uid, move, context=context)
|
||||
if move.product_id.cost_method != 'average' or not move.price_unit:
|
||||
# no average price costing or cost not specified during picking validation, we will
|
||||
# no average price costing or cost not specified during picking validation, we will
|
||||
# plug the purchase line values if they are found.
|
||||
if move.purchase_line_id and move.picking_id.purchase_id.pricelist_id:
|
||||
reference_amount, reference_currency_id = move.purchase_line_id.price_unit, move.picking_id.purchase_id.pricelist_id.currency_id.id
|
||||
|
@ -123,6 +123,8 @@ class stock_partial_picking(osv.osv_memory):
|
|||
for pick in pick_obj.browse(cr, uid, context.get('active_ids', [])):
|
||||
has_product_cost = (pick.type == 'in' and pick.purchase_id)
|
||||
for m in pick.move_lines:
|
||||
if m.state in ('done','cancel') :
|
||||
continue
|
||||
if has_product_cost and m.product_id.cost_method == 'average' and m.purchase_line_id:
|
||||
# We use the original PO unit purchase price as the basis for the cost, expressed
|
||||
# in the currency of the PO (i.e the PO's pricelist currency)
|
||||
|
|
|
@ -21,17 +21,16 @@
|
|||
warranty: 0.0
|
||||
weight: 0.0
|
||||
weight_net: 0.0
|
||||
-
|
||||
-
|
||||
In order to test the purchase flow,I create a new record where "invoice_method" is From Manual
|
||||
-
|
||||
I create purchase order for iPod.
|
||||
-
|
||||
-
|
||||
!record {model: purchase.order, id: purchase_order_po1}:
|
||||
company_id: base.main_company
|
||||
date_order: '2010-05-11'
|
||||
invoice_method: manual
|
||||
location_id: stock.stock_location_stock
|
||||
name: PO00010
|
||||
order_line:
|
||||
- date_planned: '2010-05-13'
|
||||
name: iPod
|
||||
|
@ -47,16 +46,16 @@
|
|||
Initially purchase order is in the draft state
|
||||
-
|
||||
!assert {model: purchase.order, id: purchase_order_po1}:
|
||||
- state == 'draft'
|
||||
- state == 'draft'
|
||||
-
|
||||
I confirm the purchase order.
|
||||
-
|
||||
!workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_po1}
|
||||
-
|
||||
-
|
||||
I check that the order which was initially in the draft state has transit to confirm state.
|
||||
-
|
||||
!assert {model: purchase.order, id: purchase_order_po1}:
|
||||
- state == 'approved'
|
||||
- state == 'approved'
|
||||
-
|
||||
I check that an entry gets created in the "Lines to Invoice" of Invoice Control on the basis of purchase order line
|
||||
-
|
||||
|
@ -68,7 +67,7 @@
|
|||
assert search_ids, _('Purchase order line is not created!')
|
||||
-
|
||||
To check that wizard "Create Invoices" gets opened
|
||||
-
|
||||
-
|
||||
I create purchase order line invoice entry.
|
||||
-
|
||||
!record {model: purchase.order.line_invoice, id: purchase_order_line_invoice_0}:
|
||||
|
@ -77,7 +76,7 @@
|
|||
I create invoice for products in the purchase order.
|
||||
-
|
||||
!python {model: purchase.order.line_invoice}: |
|
||||
pur_obj=self.pool.get('purchase.order')
|
||||
pur_obj=self.pool.get('purchase.order')
|
||||
ids = []
|
||||
pur_id1=pur_obj.browse(cr, uid, ref("purchase_order_po1"))
|
||||
for line in pur_id1.order_line:
|
||||
|
@ -99,13 +98,13 @@
|
|||
from tools.translate import _
|
||||
pur_id1=self.browse(cr, uid, ref("purchase_order_po1"))
|
||||
account_obj = self.pool.get('account.invoice')
|
||||
ids = account_obj.search(cr, uid, [('origin', '=', pur_id1.name)])
|
||||
ids = account_obj.search(cr, uid, [('origin', '=', 'PO-'+str(pur_id1.id))])
|
||||
assert ids, _('Pending Invoice is not created!')
|
||||
-
|
||||
I check that the order which was initially in the confirmed state has transit to approved state.
|
||||
-
|
||||
!assert {model: purchase.order, id: purchase_order_po1}:
|
||||
- state == 'approved'
|
||||
- state == 'approved'
|
||||
-
|
||||
I check that date_approve field of Delivery&Invoices gets bind with the date on which it has been approved.
|
||||
-
|
||||
|
|
|
@ -21,17 +21,16 @@
|
|||
warranty: 0.0
|
||||
weight: 0.0
|
||||
weight_net: 0.0
|
||||
-
|
||||
-
|
||||
In order to test the purchase flow,I create a new record where "invoice_method" is From Picking
|
||||
-
|
||||
I create purchase order for iPod.
|
||||
-
|
||||
-
|
||||
!record {model: purchase.order, id: purchase_order_po2}:
|
||||
company_id: base.main_company
|
||||
date_order: '2010-05-11'
|
||||
invoice_method: picking
|
||||
location_id: stock.stock_location_stock
|
||||
name: PO00008
|
||||
order_line:
|
||||
- date_planned: '2010-05-13'
|
||||
name: iPod
|
||||
|
@ -47,16 +46,16 @@
|
|||
Initially purchase order is in the draft state.
|
||||
-
|
||||
!assert {model: purchase.order, id: purchase_order_po2}:
|
||||
- state == 'draft'
|
||||
- state == 'draft'
|
||||
-
|
||||
I confirm the purchase order for iPod.
|
||||
-
|
||||
!workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_po2}
|
||||
-
|
||||
-
|
||||
I check that the order which was initially in the draft state has transit to confirm state.
|
||||
-
|
||||
!assert {model: purchase.order, id: purchase_order_po2}:
|
||||
- state == 'approved'
|
||||
- state == 'approved'
|
||||
-
|
||||
I check that an entry gets created in the "Lines to Invoice" of Invoice Control on the basis of purchase order line.
|
||||
-
|
||||
|
@ -68,7 +67,7 @@
|
|||
assert search_ids, _('Purchase order line is not created!')
|
||||
-
|
||||
To check that wizard "Create Invoices" gets opened.
|
||||
-
|
||||
-
|
||||
I create purchase order line invoice entry.
|
||||
-
|
||||
!record {model: purchase.order.line_invoice, id: purchase_order_line_invoice_0}:
|
||||
|
@ -77,7 +76,7 @@
|
|||
I create invoice for products in the purchase order.
|
||||
-
|
||||
!python {model: purchase.order.line_invoice}: |
|
||||
pur_obj=self.pool.get('purchase.order')
|
||||
pur_obj=self.pool.get('purchase.order')
|
||||
ids = []
|
||||
pur_id1=pur_obj.browse(cr, uid, ref("purchase_order_po2"))
|
||||
for line in pur_id1.order_line:
|
||||
|
@ -99,21 +98,21 @@
|
|||
from tools.translate import _
|
||||
pur_id1=self.browse(cr, uid, ref("purchase_order_po2"))
|
||||
account_obj = self.pool.get('account.invoice')
|
||||
ids = account_obj.search(cr, uid, [('origin', '=', pur_id1.name)])
|
||||
ids = account_obj.search(cr, uid, [('origin', '=', 'PO-'+str(pur_id1.id))])
|
||||
assert ids, _('Pending Invoice is not created!')
|
||||
-
|
||||
I check that the order which was initially in the confirmed state has transit to approved state.
|
||||
-
|
||||
!assert {model: purchase.order, id: purchase_order_po2}:
|
||||
- state == 'approved'
|
||||
- state == 'approved'
|
||||
-
|
||||
I check that date_approve field of Delivery&Invoices gets bind with the date on which it has been approved.
|
||||
I check that date_approve field of Delivery&Invoices gets bind with the date on which it has been approved.
|
||||
-
|
||||
!python {model: purchase.order}: |
|
||||
pur_id=self.browse(cr, uid, ref("purchase_order_po2"))
|
||||
assert(pur_id.date_approve)
|
||||
-
|
||||
I check that an entry gets created in the stock.picking.
|
||||
I check that an entry gets created in the stock.picking.
|
||||
-
|
||||
!python {model: purchase.order}: |
|
||||
pur_id=self.browse(cr, uid, ref("purchase_order_po2"))
|
||||
|
@ -130,15 +129,15 @@
|
|||
search_id = move_obj.search(cr, uid, [('picking_id', '=', pick_id.name)])
|
||||
assert search_id, 'No Incoming Product!'
|
||||
-
|
||||
Then I create an invoice from picking by clicking on "Create Invoice" wizard
|
||||
-
|
||||
Then I create an invoice from picking by clicking on "Create Invoice" wizard
|
||||
-
|
||||
!python {model: stock.invoice.onshipping}: |
|
||||
pur_obj=self.pool.get('purchase.order')
|
||||
pur_id1=pur_obj.browse(cr, uid, ref("purchase_order_po2"))
|
||||
pick_ids = [x.id for x in pur_id1.picking_ids]
|
||||
id = self.create(cr, uid, {'invoice_date': '2010-05-11', 'journal_id': ref('account.expenses_journal')},
|
||||
{'active_ids': pick_ids})
|
||||
self.create_invoice(cr, uid, [id], {"active_ids": pick_ids})
|
||||
self.create_invoice(cr, uid, [id], {"active_ids": pick_ids, "active_id": pick_ids[0]})
|
||||
-
|
||||
I check that an invoice_id field of Delivery&Invoices gets bind with the value.
|
||||
-
|
||||
|
|
|
@ -398,3 +398,14 @@ msgstr ""
|
|||
msgid "Purchase Orders"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_requisition
|
||||
#: code:addons/purchase_requisition/wizard/purchase_requisition_partner.py:0
|
||||
#, python-format
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_requisition
|
||||
#: code:addons/purchase_requisition/wizard/purchase_requisition_partner.py:0
|
||||
#, python-format
|
||||
msgid "No Product in Tender"
|
||||
msgstr ""
|
||||
|
|
|
@ -1,27 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field eval="[(4, ref('group_purchase_requisition_user'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<!--Resource: purchase.requisition-->
|
||||
|
||||
|
||||
<record id="order_purchase_requisition1" model="purchase.requisition">
|
||||
<field name="name">TE0001</field>
|
||||
<field name="user_id" model="res.users"/>
|
||||
<field name="exclusive">multiple</field>
|
||||
<field name="date_start">2010/09/16 15:56:14</field>
|
||||
<field name="warehouse_id" model="stock.warehouse"/>
|
||||
<field name="warehouse_id" ref="stock.stock_warehouse_shop0"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!--Resource: purchase.requisition.line-->
|
||||
|
||||
|
||||
<record id="line_purchase_requisition1" model="purchase.requisition.line">
|
||||
<field name="requisition_id" ref="order_purchase_requisition1"/>
|
||||
<field name="product_id" ref="product.product_product_pc3"/>
|
||||
<field name="product_id" ref="product.product_product_pc3"/>
|
||||
<field name="product_uom_id" model="product.uom" search="[]"/>
|
||||
<field name="product_qty">5</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
@ -3,3 +3,5 @@
|
|||
"access_purchase_requisition_line","purchase.requisition.line","model_purchase_requisition_line","purchase.group_purchase_user",1,1,1,1
|
||||
"access_purchase_requisition_manager","purchase.requisition manager","model_purchase_requisition","purchase.group_purchase_manager",1,0,0,0
|
||||
"access_purchase_requisition_line_manager","purchase.requisition.line manager","model_purchase_requisition_line","purchase.group_purchase_manager",1,0,0,0
|
||||
"access_purchase_requisition","purchase.requisition","model_purchase_requisition","stock.group_stock_manager",1,0,1,0
|
||||
"access_purchase_requisition_line","purchase.requisition.line","model_purchase_requisition_line","stock.group_stock_manager",1,0,1,0
|
||||
|
|
|
|
@ -5,6 +5,7 @@
|
|||
<record id="group_purchase_requisition_manager" model="res.groups">
|
||||
<field name="name">Purchase Requisition / Manager</field>
|
||||
</record>
|
||||
|
||||
<record id="group_purchase_requisition_user" model="res.groups">
|
||||
<field name="name">Purchase Requisition / User</field>
|
||||
</record>
|
||||
|
|
|
@ -24,6 +24,7 @@ from datetime import datetime
|
|||
from dateutil.relativedelta import relativedelta
|
||||
from osv import fields, osv
|
||||
from osv.orm import browse_record, browse_null
|
||||
from tools.translate import _
|
||||
|
||||
class purchase_requisition_partner(osv.osv_memory):
|
||||
_name = "purchase.requisition.partner"
|
||||
|
@ -38,7 +39,7 @@ class purchase_requisition_partner(osv.osv_memory):
|
|||
record_id = context and context.get('active_id', False) or False
|
||||
tender = self.pool.get('purchase.requisition').browse(cr, uid, record_id)
|
||||
if not tender.line_ids:
|
||||
raise osv.except_osv('Error!','No Product in Tender')
|
||||
raise osv.except_osv(_('Error!'), _('No Product in Tender'))
|
||||
True
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, partner_id):
|
||||
|
|
|
@ -1453,7 +1453,7 @@ msgstr ""
|
|||
|
||||
#. module: sale
|
||||
#: view:sale.order:0
|
||||
msgid "Logistic"
|
||||
msgid "Logistics"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
|
|
|
@ -1460,7 +1460,7 @@ msgstr ""
|
|||
|
||||
#. module: sale
|
||||
#: view:sale.order:0
|
||||
msgid "Logistic"
|
||||
msgid "Logistics"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
|
@ -2114,7 +2114,7 @@ msgstr "Фактура базирана на доставки"
|
|||
#~ msgid "My sales in shipping exception"
|
||||
#~ msgstr "Моите продажби с грешка при доставка"
|
||||
|
||||
#~ msgid "Configure Sale Order Logistic"
|
||||
#~ msgid "Configure Sale Order Logistics"
|
||||
#~ msgstr "Конфигуриране на реда на доставка при продажба"
|
||||
|
||||
#~ msgid "Sales Configuration"
|
||||
|
|
|
@ -1457,7 +1457,7 @@ msgstr ""
|
|||
|
||||
#. module: sale
|
||||
#: view:sale.order:0
|
||||
msgid "Logistic"
|
||||
msgid "Logistics"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
|
@ -2215,7 +2215,7 @@ msgstr "Račun sa referencom na isporuku"
|
|||
#~ "Ovaj korak pri konfiguraciji se koristi da bi se definisalo podrazumjevanje "
|
||||
#~ "opcija izbora u toku kreiranja naloga za prodaju"
|
||||
|
||||
#~ msgid "Configure Sale Order Logistic"
|
||||
#~ msgid "Configure Sale Order Logistics"
|
||||
#~ msgstr "Konfigurisanje logistike prodajnog naloga"
|
||||
|
||||
#~ msgid "Sales Configuration"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue