[MERGE] merged with trunk developement branch.
bzr revid: hmo@tinyerp.com-20111222105411-t4hffrgst3bhv8jy
|
@ -169,7 +169,7 @@ class account_account_type(osv.osv):
|
|||
|
||||
_columns = {
|
||||
'name': fields.char('Account Type', size=64, required=True, translate=True),
|
||||
'code': fields.char('Code', size=32, required=True),
|
||||
'code': fields.char('Code', size=32, required=True, select=True),
|
||||
'close_method': fields.selection([('none', 'None'), ('balance', 'Balance'), ('detail', 'Detail'), ('unreconciled', 'Unreconciled')], 'Deferral Method', required=True, help="""Set here the method that will be used to generate the end of year journal entries for all the accounts of this type.
|
||||
|
||||
'None' means that nothing will be done.
|
||||
|
@ -3422,7 +3422,15 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
|
||||
# Create Bank journals
|
||||
self._create_bank_journals_from_o2m(cr, uid, obj_wizard, company_id, acc_template_ref, context=context)
|
||||
return {'type' : 'ir.actions.act_window_close'}
|
||||
action = {
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'board.board',
|
||||
'view_id': self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'board_account_form')[1],
|
||||
'menu_id': self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'menu_finance')[1]
|
||||
}
|
||||
return action
|
||||
|
||||
def _prepare_bank_journal(self, cr, uid, line, current_num, default_account_id, company_id, context=None):
|
||||
'''
|
||||
|
|
|
@ -127,8 +127,8 @@ class account_bank_statement(osv.osv):
|
|||
_name = "account.bank.statement"
|
||||
_description = "Bank Statement"
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='If you enter a statement name other than /, its created accounting entries move name will be the statement name appended with /1, /2, /3, etc. This allows statement entries to have a reference to the bank statement they appeared on.'), # readonly for account_cash_statement
|
||||
'date': fields.date('Date', required=True, states={'confirm': [('readonly', True)]}),
|
||||
'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'), # readonly for account_cash_statement
|
||||
'date': fields.date('Date', required=True, states={'confirm': [('readonly', True)]}, select=True),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True,
|
||||
readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'period_id': fields.many2one('account.period', 'Period', required=True,
|
||||
|
@ -308,7 +308,7 @@ class account_bank_statement(osv.osv):
|
|||
|
||||
def balance_check(self, cr, uid, st_id, journal_type='bank', context=None):
|
||||
st = self.browse(cr, uid, st_id, context=context)
|
||||
if not (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001):
|
||||
if not ((abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001) or (abs((st.balance_end or 0.0) - st.balance_end_cash) < 0.0001)):
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('The statement balance is incorrect !\nThe expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end))
|
||||
return True
|
||||
|
@ -358,7 +358,10 @@ class account_bank_statement(osv.osv):
|
|||
st_line_number = self.get_next_st_line_number(cr, uid, st_number, st_line, context)
|
||||
self.create_move_from_st_line(cr, uid, st_line.id, company_currency_id, st_line_number, context)
|
||||
|
||||
self.write(cr, uid, [st.id], {'name': st_number}, context=context)
|
||||
self.write(cr, uid, [st.id], {
|
||||
'name': st_number,
|
||||
'balance_end_real': st.balance_end
|
||||
}, context=context)
|
||||
self.log(cr, uid, st.id, _('Statement %s is confirmed, journal items are created.') % (st_number,))
|
||||
return self.write(cr, uid, ids, {'state':'confirm'}, context=context)
|
||||
|
||||
|
@ -471,7 +474,7 @@ class account_bank_statement_line(osv.osv):
|
|||
'Moves'),
|
||||
'ref': fields.char('Reference', size=32),
|
||||
'note': fields.text('Notes'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bank statement lines."),
|
||||
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of bank statement lines."),
|
||||
'company_id': fields.related('statement_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
|
|
|
@ -477,7 +477,7 @@
|
|||
<separator string="Company" colspan="4"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="user_id" groups="base.group_extended"/>
|
||||
<field name="currency"/>
|
||||
<field name="currency" groups="base.group_extended"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" groups="base.group_extended">
|
||||
<separator string="Validations" colspan="4"/>
|
||||
|
|
|
@ -219,7 +219,7 @@
|
|||
<para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang((line['date_maturity'] < time.strftime('%Y-%m-%d'))) and formatLang(line['debit'] - line['credit'], currency_obj=company.currency_id) ]</para>
|
||||
<para style="terp_default_Right_9">[[ time.strftime('%Y-%m-%d') > formatLang((line['date_maturity'])) and formatLang(line['debit'] - line['credit']) ]] [[ company.currency_id.symbol ]] </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ line['blocked'] and 'X' or '' ]]</para>
|
||||
|
|
|
@ -247,7 +247,7 @@ class report_account_sales(osv.osv):
|
|||
_description = "Report of the Sales by Account"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'name': fields.char('Year', size=64, required=False, readonly=True),
|
||||
'name': fields.char('Year', size=64, required=False, readonly=True, select=True),
|
||||
'period_id': fields.many2one('account.period', 'Force Period', readonly=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', readonly=True),
|
||||
'quantity': fields.float('Quantity', readonly=True),
|
||||
|
@ -257,7 +257,7 @@ class report_account_sales(osv.osv):
|
|||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
|
||||
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
|
||||
}
|
||||
_order = 'name desc,amount_total desc'
|
||||
_order = 'name desc'
|
||||
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'report_account_sales')
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
class account_period_close(osv.osv_memory):
|
||||
"""
|
||||
|
@ -39,11 +40,16 @@ class account_period_close(osv.osv_memory):
|
|||
@param ids: account period close’s ID or list of IDs
|
||||
"""
|
||||
period_pool = self.pool.get('account.period')
|
||||
account_move_obj = self.pool.get('account.move')
|
||||
|
||||
mode = 'done'
|
||||
for form in self.read(cr, uid, ids, context=context):
|
||||
if form['sure']:
|
||||
for id in context['active_ids']:
|
||||
account_move_ids = account_move_obj.search(cr, uid, [('period_id', '=', id), ('state', '=', "draft")], context=context)
|
||||
if account_move_ids:
|
||||
raise osv.except_osv(_('Invalid action !'), _('In order to close a period, you must first post related journal entries.'))
|
||||
|
||||
cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id))
|
||||
cr.execute('update account_period set state=%s where id=%s', (mode, id))
|
||||
|
||||
|
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -0,0 +1,109 @@
|
|||
# Croatian translation for openobject-addons
|
||||
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
|
||||
"PO-Revision-Date: 2011-12-21 14:52+0000\n"
|
||||
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
|
||||
"Language-Team: Croatian <hr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2011-12-22 05:27+0000\n"
|
||||
"X-Generator: Launchpad (build 14560)\n"
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: view:product.category:0
|
||||
msgid " Accounting Property"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: sql_constraint:purchase.order:0
|
||||
msgid "Order Reference must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: constraint:product.category:0
|
||||
msgid "Error ! You can not create recursive categories."
|
||||
msgstr "Greška ! Ne možete stvoriti rekurzivne grupe."
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: constraint:product.template:0
|
||||
msgid ""
|
||||
"Error: The default UOM and the purchase UOM must be in the same category."
|
||||
msgstr ""
|
||||
"Greška: Zadana jedinica mjere i jedinica mjere nabave moraju biti iz iste "
|
||||
"kategorije jedinica mjera."
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: model:ir.model,name:account_anglo_saxon.model_account_invoice_line
|
||||
msgid "Invoice Line"
|
||||
msgstr "Stavka računa"
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: model:ir.model,name:account_anglo_saxon.model_purchase_order
|
||||
msgid "Purchase Order"
|
||||
msgstr "Nalog za nabavu"
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: model:ir.model,name:account_anglo_saxon.model_product_template
|
||||
msgid "Product Template"
|
||||
msgstr "Predložak proizvoda"
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: model:ir.model,name:account_anglo_saxon.model_product_category
|
||||
msgid "Product Category"
|
||||
msgstr "Grupa proizvoda"
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
|
||||
msgid "Stock Accounting for Anglo Saxon countries"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: field:product.category,property_account_creditor_price_difference_categ:0
|
||||
#: field:product.template,property_account_creditor_price_difference:0
|
||||
msgid "Price Difference Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: model:ir.model,name:account_anglo_saxon.model_account_invoice
|
||||
msgid "Invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: model:ir.model,name:account_anglo_saxon.model_stock_picking
|
||||
msgid "Picking List"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
|
||||
msgid ""
|
||||
"This module will support the Anglo-Saxons accounting methodology by\n"
|
||||
" changing the accounting logic with stock transactions. The difference "
|
||||
"between the Anglo-Saxon accounting countries\n"
|
||||
" and the Rhine or also called Continental accounting countries is the "
|
||||
"moment of taking the Cost of Goods Sold versus Cost of Sales.\n"
|
||||
" Anglo-Saxons accounting does take the cost when sales invoice is "
|
||||
"created, Continental accounting will take the cost at the moment the goods "
|
||||
"are shipped.\n"
|
||||
" This module will add this functionality by using a interim account, to "
|
||||
"store the value of shipped goods and will contra book this interim account\n"
|
||||
" when the invoice is created to transfer this amount to the debtor or "
|
||||
"creditor account.\n"
|
||||
" Secondly, price differences between actual purchase price and fixed "
|
||||
"product standard price are booked on a separate account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_anglo_saxon
|
||||
#: help:product.category,property_account_creditor_price_difference_categ:0
|
||||
#: help:product.template,property_account_creditor_price_difference:0
|
||||
msgid ""
|
||||
"This account will be used to value price difference between purchase price "
|
||||
"and cost price."
|
||||
msgstr ""
|
|
@ -184,6 +184,9 @@ class account_asset_asset(osv.osv):
|
|||
def set_to_close(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'close'}, context=context)
|
||||
|
||||
def set_to_draft(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
|
||||
|
||||
def _amount_residual(self, cr, uid, ids, name, args, context=None):
|
||||
cr.execute("""SELECT
|
||||
l.asset_id as id, round(SUM(abs(l.debit-l.credit))) AS amount
|
||||
|
|
|
@ -114,8 +114,9 @@
|
|||
<newline/>
|
||||
<separator string="" colspan="4"/>
|
||||
<field name="state" readonly="1" colspan="2"/>
|
||||
<group colspan="2" col="2">
|
||||
<group colspan="2" col="4">
|
||||
<button name="validate" states="draft" string="Confirm Asset" type="object" icon="terp-camera_test"/>
|
||||
<button name="set_to_draft" states="open" string="Set to Draft" type="object" icon="gtk-convert"/>
|
||||
<button name="set_to_close" states="open" string="Set to Close" type="object" icon="gtk-close"/>
|
||||
</group>
|
||||
</page>
|
||||
|
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 6.2 KiB |
|
@ -160,7 +160,7 @@ class account_invoice_line(osv.osv):
|
|||
('line','Separator Line'),
|
||||
('break','Page Break'),]
|
||||
,'Type', select=True, required=True),
|
||||
'sequence': fields.integer('Sequence Number', help="Gives the sequence order when displaying a list of invoice lines."),
|
||||
'sequence': fields.integer('Sequence Number', select=True, help="Gives the sequence order when displaying a list of invoice lines."),
|
||||
'functional_field': fields.function(_fnct, arg=None, fnct_inv=None, fnct_inv_arg=None, type='char', fnct_search=None, obj=None, store=False, string="Source Account"),
|
||||
}
|
||||
|
||||
|
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 9.1 KiB |
|
@ -367,7 +367,7 @@ class auction_lots(osv.osv):
|
|||
'important':fields.boolean('To be Emphatized'),
|
||||
'product_id':fields.many2one('product.product', 'Product', required=True),
|
||||
'obj_desc': fields.text('Object Description'),
|
||||
'obj_num': fields.integer('Catalog Number'),
|
||||
'obj_num': fields.integer('Catalog Number', select=True),
|
||||
'obj_ret': fields.float('Price retired', help="Object Ret"),
|
||||
'obj_comm': fields.boolean('Commission'),
|
||||
'obj_price': fields.float('Adjudication price', help="Object Price"),
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button icon="gtk-ok" string="OK" name="process" type="object" />
|
||||
</group>
|
||||
</form>
|
||||
|
|
|
@ -35,7 +35,7 @@ class res_partner_contact(osv.osv):
|
|||
return result
|
||||
|
||||
_columns = {
|
||||
'name': fields.function(_name_get_full, string='Name', size=64, type="char", store=True),
|
||||
'name': fields.function(_name_get_full, string='Name', size=64, type="char", store=True, select=True),
|
||||
'last_name': fields.char('Last Name', size=64, required=True),
|
||||
'first_name': fields.char('First Name', size=64),
|
||||
'mobile': fields.char('Mobile', size=64),
|
||||
|
@ -65,7 +65,7 @@ class res_partner_contact(osv.osv):
|
|||
'active' : lambda *a: True,
|
||||
}
|
||||
|
||||
_order = "name,first_name"
|
||||
_order = "name"
|
||||
|
||||
def name_search(self, cr, uid, name='', args=None, operator='ilike', context=None, limit=None):
|
||||
if not args:
|
||||
|
|
|
@ -545,7 +545,7 @@ class report_creator_field(osv.osv):
|
|||
_rec_name = 'field_id'
|
||||
_order = "sequence,id"
|
||||
_columns = {
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of fields."),
|
||||
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of fields."),
|
||||
'field_id': fields.many2one('ir.model.fields', 'Field'),
|
||||
'report_id': fields.many2one('base_report_creator.report', 'Report', on_delete='cascade'),
|
||||
'group_method': fields.selection([('group', 'Grouped'),
|
||||
|
|
|
@ -178,13 +178,13 @@ class board_line(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Title', size=64, required=True),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order\
|
||||
when displaying a list of board lines."),
|
||||
when displaying a list of board lines.", select=True),
|
||||
'height': fields.integer('Height'),
|
||||
'width': fields.integer('Width'),
|
||||
'board_id': fields.many2one('board.board', 'Dashboard', required=True, ondelete='cascade'),
|
||||
'action_id': fields.many2one('ir.actions.act_window', 'Action', required=True),
|
||||
'position': fields.selection([('left','Left'),
|
||||
('right','Right')], 'Position', required=True)
|
||||
('right','Right')], 'Position', required=True, select=True)
|
||||
}
|
||||
_defaults = {
|
||||
'position': lambda *args: 'left'
|
||||
|
|
|
@ -0,0 +1,818 @@
|
|||
# Romanian translation for openobject-addons
|
||||
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
|
||||
"PO-Revision-Date: 2011-12-21 10:59+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Romanian <ro@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2011-12-22 05:27+0000\n"
|
||||
"X-Generator: Launchpad (build 14560)\n"
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "Value Mapping"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:caldav.browse,url:0
|
||||
msgid "Url of the caldav server, use for synchronization"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.alias,name:0
|
||||
msgid "Filename"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_calendar_event_export
|
||||
msgid "Event Export"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.subscribe:0
|
||||
msgid "Provide path for Remote Calendar"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.actions.act_window,name:caldav.action_calendar_event_import_values
|
||||
msgid "Import .ics File"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.export:0
|
||||
msgid "_Close"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar.attributes,type:0
|
||||
#: selection:basic.calendar.lines,name:0
|
||||
msgid "Attendee"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: sql_constraint:basic.calendar.fields:0
|
||||
msgid "Can not map a field more than once"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:787
|
||||
#: code:addons/caldav/calendar.py:877
|
||||
#: code:addons/caldav/wizard/calendar_event_import.py:63
|
||||
#, python-format
|
||||
msgid "Warning !"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.lines,object_id:0
|
||||
msgid "Object"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "Todo"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_user_preference
|
||||
msgid "User preference Form"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:user.preference,service:0
|
||||
msgid "Services"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar.fields,fn:0
|
||||
msgid "Expression as constant"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,device:0
|
||||
msgid "Evolution"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
#: view:calendar.event.subscribe:0
|
||||
msgid "Ok"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:877
|
||||
#, python-format
|
||||
msgid "Please provide proper configuration of \"%s\" in Calendar Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:calendar.event.export,name:0
|
||||
msgid "File name"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:caldav.browse,url:0
|
||||
msgid "Caldav Server"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/calendar_event_subscribe.py:59
|
||||
#, python-format
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:caldav.browse,caldav_doc_file:0
|
||||
msgid "download full caldav Documentation."
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,device:0
|
||||
msgid "iPhone"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/caldav_browse.py:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
" * Webdav server that provides remote access to calendar\n"
|
||||
" * Synchronisation of calendar using WebDAV\n"
|
||||
" * Customize calendar event and todo attribute with any of OpenERP model\n"
|
||||
" * Provides iCal Import/Export functionality\n"
|
||||
"\n"
|
||||
" To access Calendars using CalDAV clients, point them to:\n"
|
||||
" "
|
||||
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/calendars/users/USERNAME/c\n"
|
||||
"\n"
|
||||
" To access OpenERP Calendar using WebCal to remote site use the URL "
|
||||
"like:\n"
|
||||
" "
|
||||
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/Calendars/CALENDAR_NAME.ics\n"
|
||||
"\n"
|
||||
" Where,\n"
|
||||
" HOSTNAME: Host on which OpenERP server(With webdav) is running\n"
|
||||
" PORT : Port on which OpenERP server is running (By Default : 8069)\n"
|
||||
" DATABASE_NAME: Name of database on which OpenERP Calendar is "
|
||||
"created\n"
|
||||
" CALENDAR_NAME: Name of calendar to access\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/caldav_browse.py:147
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Prerequire\n"
|
||||
"----------\n"
|
||||
"If you are using thunderbird, first you need to install the lightning "
|
||||
"module\n"
|
||||
"http://www.mozilla.org/projects/calendar/lightning/\n"
|
||||
"\n"
|
||||
"configuration\n"
|
||||
"-------------\n"
|
||||
"\n"
|
||||
"1. Go to Calendar View\n"
|
||||
"\n"
|
||||
"2. File -> New Calendar\n"
|
||||
"\n"
|
||||
"3. Chosse \"On the Network\"\n"
|
||||
"\n"
|
||||
"4. for format choose CalDav\n"
|
||||
" and as location the url given above (ie : "
|
||||
"http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)\n"
|
||||
" \n"
|
||||
"5. Choose a name and a color for the Calendar, and we advice you to uncheck "
|
||||
"\"alarm\"\n"
|
||||
"\n"
|
||||
"6. Then put your openerp login and password (to give the password only check "
|
||||
"the box \"Use password Manager to remember this password\"\n"
|
||||
"\n"
|
||||
"7. Then Finish, your meetings should appear now in your calendar view\n"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar,type:0
|
||||
#: selection:basic.calendar.attributes,type:0
|
||||
#: selection:basic.calendar.lines,name:0
|
||||
msgid "TODO"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.export:0
|
||||
msgid "Export ICS"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar.fields,fn:0
|
||||
msgid "Use the field"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:787
|
||||
#, python-format
|
||||
msgid "Can not create line \"%s\" more than once"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: field:basic.calendar,line_ids:0
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_lines
|
||||
msgid "Calendar Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_calendar_event_subscribe
|
||||
msgid "Event subscribe"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
msgid "Import ICS"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
#: view:calendar.event.subscribe:0
|
||||
#: view:user.preference:0
|
||||
msgid "_Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_event
|
||||
msgid "basic.calendar.event"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: selection:basic.calendar,type:0
|
||||
#: selection:basic.calendar.attributes,type:0
|
||||
#: selection:basic.calendar.lines,name:0
|
||||
msgid "Event"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:document.directory,calendar_collection:0
|
||||
#: field:user.preference,collection:0
|
||||
msgid "Calendar Collection"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: constraint:document.directory:0
|
||||
msgid "Error! You can not create recursive Directories."
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:user.preference:0
|
||||
msgid "_Open"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,type:0
|
||||
#: field:basic.calendar.attributes,type:0
|
||||
#: field:basic.calendar.fields,type_id:0
|
||||
#: field:basic.calendar.lines,name:0
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:calendar.event.export,name:0
|
||||
msgid "Save in .ics format"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:1291
|
||||
#, python-format
|
||||
msgid "Error !"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/caldav_browse.py:128
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
" 1. Go to Calendar View\n"
|
||||
"\n"
|
||||
" 2. File -> New -> Calendar\n"
|
||||
"\n"
|
||||
" 3. Fill the form \n"
|
||||
" - type : CalDav\n"
|
||||
" - name : Whaterver you want (ie : Meeting)\n"
|
||||
" - url : "
|
||||
"http://HOST:PORT/webdav/DB_NAME/calendars/users/USER/c/Meetings (ie : "
|
||||
"http://localhost:8069/webdav/db_1/calendars/users/demo/c/Meetings) the one "
|
||||
"given on the top of this window\n"
|
||||
" - uncheck \"User SSL\"\n"
|
||||
" - Username : Your username (ie : Demo)\n"
|
||||
" - Refresh : everytime you want that evolution synchronize the data "
|
||||
"with the server\n"
|
||||
"\n"
|
||||
" 4. Click ok and give your openerp password\n"
|
||||
"\n"
|
||||
" 5. A new calendar named with the name you gave should appear on the left "
|
||||
"side. \n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_attributes
|
||||
msgid "Calendar attributes"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_caldav_browse
|
||||
msgid "Caldav Browse"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.module.module,description:caldav.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" This module Contains basic functionality for caldav system like: \n"
|
||||
" - Webdav server that provides remote access to calendar\n"
|
||||
" - Synchronisation of calendar using WebDAV\n"
|
||||
" - Customize calendar event and todo attribute with any of OpenERP model\n"
|
||||
" - Provides iCal Import/Export functionality\n"
|
||||
"\n"
|
||||
" To access Calendars using CalDAV clients, point them to:\n"
|
||||
" "
|
||||
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/calendars/users/USERNAME/c\n"
|
||||
"\n"
|
||||
" To access OpenERP Calendar using WebCal to remote site use the URL "
|
||||
"like:\n"
|
||||
" "
|
||||
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/Calendars/CALENDAR_NAME.ics\n"
|
||||
"\n"
|
||||
" Where,\n"
|
||||
" HOSTNAME: Host on which OpenERP server(With webdav) is running\n"
|
||||
" PORT : Port on which OpenERP server is running (By Default : 8069)\n"
|
||||
" DATABASE_NAME: Name of database on which OpenERP Calendar is "
|
||||
"created\n"
|
||||
" CALENDAR_NAME: Name of calendar to access\n"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,device:0
|
||||
msgid "Android based device"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,create_date:0
|
||||
msgid "Created Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "Attributes Mapping"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_document_directory
|
||||
msgid "Directory"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:calendar.event.subscribe,url_path:0
|
||||
msgid "Provide path for remote calendar"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:caldav.browse:0
|
||||
msgid "_Ok"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.lines,domain:0
|
||||
msgid "Domain"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.subscribe:0
|
||||
msgid "_Subscribe"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,user_id:0
|
||||
msgid "Owner"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: field:basic.calendar.alias,cal_line_id:0
|
||||
#: field:basic.calendar.lines,calendar_id:0
|
||||
#: model:ir.ui.menu,name:caldav.menu_calendar
|
||||
#: field:user.preference,calendar:0
|
||||
msgid "Calendar"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:41
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please install python-vobject from http://vobject.skyhouseconsulting.com/"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/calendar_event_import.py:63
|
||||
#, python-format
|
||||
msgid "Invalid format of the ics, file can not be imported"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,service:0
|
||||
msgid "CalDAV"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.fields,field_id:0
|
||||
msgid "OpenObject Field"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.alias,res_id:0
|
||||
msgid "Res. ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.subscribe:0
|
||||
msgid "Message..."
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,device:0
|
||||
msgid "Other"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: field:basic.calendar,has_webcal:0
|
||||
msgid "WebCal"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:document.directory:0
|
||||
#: model:ir.actions.act_window,name:caldav.action_calendar_collection_form
|
||||
#: model:ir.ui.menu,name:caldav.menu_calendar_collection
|
||||
msgid "Calendar Collections"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:813
|
||||
#: sql_constraint:basic.calendar.alias:0
|
||||
#, python-format
|
||||
msgid "The same filename cannot apply to two records!"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: sql_constraint:document.directory:0
|
||||
msgid "Directory cannot be parent of itself!"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: field:document.directory,calendar_ids:0
|
||||
#: model:ir.actions.act_window,name:caldav.action_caldav_form
|
||||
#: model:ir.ui.menu,name:caldav.menu_caldav_directories
|
||||
msgid "Calendars"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,collection_id:0
|
||||
msgid "Collection"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,write_date:0
|
||||
msgid "Write Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/caldav_browse.py:104
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Prerequire\n"
|
||||
"----------\n"
|
||||
"There is no buit-in way to synchronize calendar with caldav.\n"
|
||||
"So you need to install a third part software : Calendar (CalDav) \n"
|
||||
"for now it's the only one\n"
|
||||
"\n"
|
||||
"configuration\n"
|
||||
"-------------\n"
|
||||
"\n"
|
||||
"1. Open Calendar Sync\n"
|
||||
" I'll get an interface with 2 tabs\n"
|
||||
" Stay on the first one\n"
|
||||
" \n"
|
||||
"2. CaDAV Calendar URL : put the URL given above (ie : "
|
||||
"http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)\n"
|
||||
"\n"
|
||||
"3. Put your openerp username and password\n"
|
||||
"\n"
|
||||
"4. If your server don't use SSL, you'll get a warnign, say \"Yes\"\n"
|
||||
"\n"
|
||||
"5. Then you can synchronize manually or custom the settings to synchronize "
|
||||
"every x minutes.\n"
|
||||
" \n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/caldav_browse.py:53
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
" For SSL specific configuration see the documentation below\n"
|
||||
"\n"
|
||||
"Now, to setup the calendars, you need to:\n"
|
||||
"\n"
|
||||
"1. Click on the \"Settings\" and go to the \"Mail, Contacts, Calendars\" "
|
||||
"page.\n"
|
||||
"2. Go to \"Add account...\"\n"
|
||||
"3. Click on \"Other\"\n"
|
||||
"4. From the \"Calendars\" group, select \"Add CalDAV Account\"\n"
|
||||
"\n"
|
||||
"5. Enter the host's name \n"
|
||||
" (ie : if the url is http://openerp.com:8069/webdav/db_1/calendars/ , "
|
||||
"openerp.com is the host)\n"
|
||||
"\n"
|
||||
"6. Fill Username and password with your openerp login and password\n"
|
||||
"\n"
|
||||
"7. As a description, you can either leave the server's name or\n"
|
||||
" something like \"OpenERP calendars\".\n"
|
||||
"\n"
|
||||
"9. If you are not using a SSL server, you'll get an error, do not worry and "
|
||||
"push \"Continue\"\n"
|
||||
"\n"
|
||||
"10. Then click to \"Advanced Settings\" to specify the right\n"
|
||||
" ports and paths. \n"
|
||||
" \n"
|
||||
"11. Specify the port for the OpenERP server: 8071 for SSL, 8069 without.\n"
|
||||
"\n"
|
||||
"12. Set the \"Account URL\" to the right path of the OpenERP webdav:\n"
|
||||
" the url given by the wizard (ie : "
|
||||
"http://my.server.ip:8069/webdav/dbname/calendars/ )\n"
|
||||
"\n"
|
||||
"11. Click on Done. The phone will hopefully connect to the OpenERP server\n"
|
||||
" and verify it can use the account.\n"
|
||||
"\n"
|
||||
"12. Go to the main menu of the iPhone and enter the Calendar application.\n"
|
||||
" Your OpenERP calendars will be visible inside the selection of the\n"
|
||||
" \"Calendars\" button.\n"
|
||||
" Note that when creating a new calendar entry, you will have to specify\n"
|
||||
" which calendar it should be saved at.\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"IF you need SSL (and your certificate is not a verified one, as usual),\n"
|
||||
"then you first will need to let the iPhone trust that. Follow these\n"
|
||||
"steps:\n"
|
||||
"\n"
|
||||
" s1. Open Safari and enter the https location of the OpenERP server:\n"
|
||||
" https://my.server.ip:8071/\n"
|
||||
" (assuming you have the server at \"my.server.ip\" and the HTTPS port\n"
|
||||
" is the default 8071)\n"
|
||||
" s2. Safari will try to connect and issue a warning about the "
|
||||
"certificate\n"
|
||||
" used. Inspect the certificate and click \"Accept\" so that iPhone\n"
|
||||
" now trusts it. \n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: sql_constraint:document.directory:0
|
||||
msgid "The directory name must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:user.preference:0
|
||||
msgid "User Preference"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/calendar_event_subscribe.py:59
|
||||
#, python-format
|
||||
msgid "Please provide Proper URL !"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_timezone
|
||||
msgid "basic.calendar.timezone"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.fields,expr:0
|
||||
msgid "Expression"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_attendee
|
||||
msgid "basic.calendar.attendee"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_alias
|
||||
msgid "basic.calendar.alias"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
#: field:calendar.event.import,file_path:0
|
||||
msgid "Select ICS file"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:caldav.browse,caldav_doc_file:0
|
||||
msgid "Caldav Document"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.lines,mapping_ids:0
|
||||
msgid "Fields Mapping"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:caldav.browse:0
|
||||
msgid "Browse caldav"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar
|
||||
msgid "basic.calendar"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "Other Info"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:user.preference,device:0
|
||||
msgid "Software/Devices"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:basic.calendar,has_webcal:0
|
||||
msgid ""
|
||||
"Also export a <name>.ics entry next to the calendar folder, with WebCal "
|
||||
"content."
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.fields,fn:0
|
||||
msgid "Function"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: field:basic.calendar,description:0
|
||||
#: view:caldav.browse:0
|
||||
#: field:caldav.browse,description:0
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:basic.calendar.alias,cal_line_id:0
|
||||
msgid "The calendar/line this mapping applies to"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.fields,mapping:0
|
||||
msgid "Mapping"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/calendar_event_import.py:86
|
||||
#, python-format
|
||||
msgid "Import Sucessful"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
msgid "_Import"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_calendar_event_import
|
||||
msgid "Event Import"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar.fields,fn:0
|
||||
msgid "Interval in hours"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.subscribe:0
|
||||
msgid "Subscribe to Remote Calendar"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:basic.calendar,calendar_color:0
|
||||
msgid "For supporting clients, the color of the calendar entries"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,name:0
|
||||
#: field:basic.calendar.attributes,name:0
|
||||
#: field:basic.calendar.fields,name:0
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar.attributes,type:0
|
||||
#: selection:basic.calendar.lines,name:0
|
||||
msgid "Alarm"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_alarm
|
||||
msgid "basic.calendar.alarm"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:1291
|
||||
#, python-format
|
||||
msgid "Attendee must have an Email Id"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.actions.act_window,name:caldav.action_calendar_event_export_values
|
||||
msgid "Export .ics File"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:41
|
||||
#, python-format
|
||||
msgid "vobject Import Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:calendar.event.export,file_path:0
|
||||
msgid "Save ICS file"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,device:0
|
||||
msgid "Sunbird/Thunderbird"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,calendar_order:0
|
||||
msgid "Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.module.module,shortdesc:caldav.module_meta_information
|
||||
msgid "Share Calendar using CalDAV"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,calendar_color:0
|
||||
msgid "Color"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "MY"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_fields
|
||||
msgid "Calendar fields"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
msgid "Import Message"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.actions.act_window,name:caldav.action_calendar_event_subscribe
|
||||
#: model:ir.actions.act_window,name:caldav.action_calendar_event_subscribe_values
|
||||
msgid "Subscribe"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: sql_constraint:document.directory:0
|
||||
msgid "Directory must have a parent or a storage"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_todo
|
||||
msgid "basic.calendar.todo"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:basic.calendar,calendar_order:0
|
||||
msgid "For supporting clients, the order of this folder among the calendars"
|
||||
msgstr ""
|
|
@ -174,7 +174,7 @@ class crm_lead(crm_case, osv.osv):
|
|||
'optin': fields.boolean('Opt-In', help="If opt-in is checked, this contact has accepted to receive emails."),
|
||||
'optout': fields.boolean('Opt-Out', help="If opt-out is checked, this contact has refused to receive emails or unsubscribed to a campaign."),
|
||||
'type':fields.selection([ ('lead','Lead'), ('opportunity','Opportunity'), ],'Type', help="Type is used to separate Leads and Opportunities"),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('section_ids', '=', section_id)]"),
|
||||
'user_id': fields.many2one('res.users', 'Salesman'),
|
||||
|
@ -201,7 +201,7 @@ class crm_lead(crm_case, osv.osv):
|
|||
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
|
||||
'phone': fields.char("Phone", size=64),
|
||||
'date_deadline': fields.date('Expected Closing'),
|
||||
'date_action': fields.date('Next Action Date'),
|
||||
'date_action': fields.date('Next Action Date', select=True),
|
||||
'title_action': fields.char('Next Action', size=64),
|
||||
'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('section_ids', '=', section_id)]"),
|
||||
'color': fields.integer('Color Index'),
|
||||
|
|
|
@ -68,7 +68,7 @@ class res_partner(osv.osv):
|
|||
'categ_id' : categ_ids and categ_ids[0] or '',
|
||||
'state' :'draft',
|
||||
'type': 'opportunity'
|
||||
})
|
||||
}, context=context)
|
||||
opportunity_ids[partner_id] = opportunity_id
|
||||
return opportunity_ids
|
||||
res_partner()
|
||||
|
|
|
@ -58,6 +58,7 @@ class crm_partner2opportunity(osv.osv_memory):
|
|||
|
||||
def make_opportunity(self, cr, uid, ids, context=None):
|
||||
partner_ids = context and context.get('active_ids', []) or []
|
||||
partner_id = partner_ids[0] if partner_ids else None
|
||||
partner = self.pool.get('res.partner')
|
||||
lead = self.pool.get('crm.lead')
|
||||
data = self.browse(cr, uid, ids, context=context)[0]
|
||||
|
@ -65,6 +66,8 @@ class crm_partner2opportunity(osv.osv_memory):
|
|||
data.name,
|
||||
data.planned_revenue,
|
||||
data.probability,
|
||||
partner_id,
|
||||
context=context,
|
||||
)
|
||||
opportunity_id = opportunity_ids[partner_ids[0]]
|
||||
return lead.redirect_opportunity_view(cr, uid, opportunity_id, context=context)
|
||||
|
|
|
@ -55,7 +55,7 @@ class crm_claim(crm.crm_case, osv.osv):
|
|||
'write_date': fields.datetime('Update Date' , readonly=True),
|
||||
'date_deadline': fields.date('Deadline'),
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'date': fields.datetime('Claim Date'),
|
||||
'date': fields.datetime('Claim Date', select=True),
|
||||
'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
|
|
|
@ -36,14 +36,12 @@ class sale_order(osv.osv):
|
|||
result['value']['carrier_id'] = dtype
|
||||
return result
|
||||
|
||||
def action_ship_create(self, cr, uid, ids, *args):
|
||||
result = super(sale_order, self).action_ship_create(cr, uid, ids, *args)
|
||||
for order in self.browse(cr, uid, ids, context={}):
|
||||
pids = [ x.id for x in order.picking_ids]
|
||||
self.pool.get('stock.picking').write(cr, uid, pids, {
|
||||
'carrier_id':order.carrier_id.id,
|
||||
})
|
||||
def _prepare_order_picking(self, cr, uid, order, context=None):
|
||||
result = super(sale_order, self)._prepare_order_picking(cr, uid, order, context=context)
|
||||
result.update(carrier_id=order.carrier_id.id)
|
||||
return result
|
||||
|
||||
|
||||
sale_order()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -68,70 +68,69 @@ class stock_picking(osv.osv):
|
|||
'number_of_packages': fields.integer('Number of Packages'),
|
||||
}
|
||||
|
||||
def action_invoice_create(self, cursor, user, ids, journal_id=False,
|
||||
def _prepare_shipping_invoice_line(self, cr, uid, picking, invoice, context=None):
|
||||
"""Prepare the invoice line to add to the shipping costs to the shipping's
|
||||
invoice.
|
||||
|
||||
:param browse_record picking: the stock picking being invoiced
|
||||
:param browse_record invoice: the stock picking's invoice
|
||||
:return: dict containing the values to create the invoice line,
|
||||
or None to create nothing
|
||||
"""
|
||||
carrier_obj = self.pool.get('delivery.carrier')
|
||||
grid_obj = self.pool.get('delivery.grid')
|
||||
if not picking.carrier_id or \
|
||||
any(inv_line.product_id.id == picking.carrier_id.product_id.id
|
||||
for inv_line in invoice.invoice_line):
|
||||
return None
|
||||
grid_id = carrier_obj.grid_get(cr, uid, [picking.carrier_id.id],
|
||||
picking.address_id.id, context=context)
|
||||
if not grid_id:
|
||||
raise osv.except_osv(_('Warning'),
|
||||
_('The carrier %s (id: %d) has no delivery grid!') \
|
||||
% (picking.carrier_id.name,
|
||||
picking.carrier_id.id))
|
||||
price = grid_obj.get_price_from_picking(cr, uid, grid_id,
|
||||
invoice.amount_untaxed, picking.weight, picking.volume,
|
||||
context=context)
|
||||
account_id = picking.carrier_id.product_id.property_account_income.id
|
||||
if not account_id:
|
||||
account_id = picking.carrier_id.product_id.categ_id\
|
||||
.property_account_income_categ.id
|
||||
|
||||
taxes = picking.carrier_id.product_id.taxes_id
|
||||
partner = picking.address_id.partner_id or False
|
||||
if partner:
|
||||
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, partner.property_account_position, account_id)
|
||||
taxes_ids = self.pool.get('account.fiscal.position').map_tax(cr, uid, partner.property_account_position, taxes)
|
||||
else:
|
||||
taxes_ids = [x.id for x in taxes]
|
||||
|
||||
return {
|
||||
'name': picking.carrier_id.name,
|
||||
'invoice_id': invoice.id,
|
||||
'uos_id': picking.carrier_id.product_id.uos_id.id,
|
||||
'product_id': picking.carrier_id.product_id.id,
|
||||
'account_id': account_id,
|
||||
'price_unit': price,
|
||||
'quantity': 1,
|
||||
'invoice_line_tax_id': [(6, 0, taxes_ids)],
|
||||
}
|
||||
|
||||
def action_invoice_create(self, cr, uid, ids, journal_id=False,
|
||||
group=False, type='out_invoice', context=None):
|
||||
invoice_obj = self.pool.get('account.invoice')
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
carrier_obj = self.pool.get('delivery.carrier')
|
||||
grid_obj = self.pool.get('delivery.grid')
|
||||
invoice_line_obj = self.pool.get('account.invoice.line')
|
||||
|
||||
result = super(stock_picking, self).action_invoice_create(cursor, user,
|
||||
invoice_line_obj = self.pool.get('account.invoice.line')
|
||||
result = super(stock_picking, self).action_invoice_create(cr, uid,
|
||||
ids, journal_id=journal_id, group=group, type=type,
|
||||
context=context)
|
||||
|
||||
picking_ids = result.keys()
|
||||
invoice_ids = result.values()
|
||||
|
||||
invoices = {}
|
||||
for invoice in invoice_obj.browse(cursor, user, invoice_ids,
|
||||
context=context):
|
||||
invoices[invoice.id] = invoice
|
||||
|
||||
for picking in picking_obj.browse(cursor, user, picking_ids,
|
||||
context=context):
|
||||
if not picking.carrier_id:
|
||||
continue
|
||||
grid_id = carrier_obj.grid_get(cursor, user, [picking.carrier_id.id],
|
||||
picking.address_id.id, context=context)
|
||||
if not grid_id:
|
||||
raise osv.except_osv(_('Warning'),
|
||||
_('The carrier %s (id: %d) has no delivery grid!') \
|
||||
% (picking.carrier_id.name,
|
||||
picking.carrier_id.id))
|
||||
invoice = invoices[result[picking.id]]
|
||||
price = grid_obj.get_price_from_picking(cursor, user, grid_id,
|
||||
invoice.amount_untaxed, picking.weight, picking.volume,
|
||||
context=context)
|
||||
account_id = picking.carrier_id.product_id.product_tmpl_id\
|
||||
.property_account_income.id
|
||||
if not account_id:
|
||||
account_id = picking.carrier_id.product_id.categ_id\
|
||||
.property_account_income_categ.id
|
||||
|
||||
taxes = picking.carrier_id.product_id.taxes_id
|
||||
|
||||
partner_id=picking.address_id.partner_id and picking.address_id.partner_id.id or False
|
||||
taxes_ids = [x.id for x in picking.carrier_id.product_id.taxes_id]
|
||||
if partner_id:
|
||||
partner = picking.address_id.partner_id
|
||||
account_id = self.pool.get('account.fiscal.position').map_account(cursor, user, partner.property_account_position, account_id)
|
||||
taxes_ids = self.pool.get('account.fiscal.position').map_tax(cursor, user, partner.property_account_position, taxes)
|
||||
|
||||
if any(inv_line.product_id.id == picking.carrier_id.product_id.id for inv_line in invoice.invoice_line):
|
||||
continue
|
||||
else:
|
||||
invoice_line_obj.create(cursor, user, {
|
||||
'name': picking.carrier_id.name,
|
||||
'invoice_id': invoice.id,
|
||||
'uos_id': picking.carrier_id.product_id.uos_id.id,
|
||||
'product_id': picking.carrier_id.product_id.id,
|
||||
'account_id': account_id,
|
||||
'price_unit': price,
|
||||
'quantity': 1,
|
||||
'invoice_line_tax_id': [(6, 0,taxes_ids)],
|
||||
})
|
||||
invoice_obj.button_compute(cursor, user, [invoice.id], context=context)
|
||||
for picking in picking_obj.browse(cr, uid, result.keys(), context=context):
|
||||
invoice = invoice_obj.browse(cr, uid, result[picking.id], context=context)
|
||||
invoice_line = self._prepare_shipping_invoice_line(cr, uid, picking, invoice, context=context)
|
||||
if invoice_line:
|
||||
invoice_line_obj.create(cr, uid, invoice_line)
|
||||
invoice_obj.button_compute(cr, uid, [invoice.id], context=context)
|
||||
return result
|
||||
|
||||
stock_picking()
|
||||
|
|
|
@ -8,25 +8,25 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
|
||||
"PO-Revision-Date: 2010-08-03 06:12+0000\n"
|
||||
"Last-Translator: Mantavya Gajjar (Open ERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2011-12-21 14:46+0000\n"
|
||||
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
|
||||
"Language-Team: Croatian <hr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2011-11-05 05:41+0000\n"
|
||||
"X-Generator: Launchpad (build 14231)\n"
|
||||
"X-Launchpad-Export-Date: 2011-12-22 05:27+0000\n"
|
||||
"X-Generator: Launchpad (build 14560)\n"
|
||||
|
||||
#. module: document_webdav
|
||||
#: field:document.webdav.dir.property,create_date:0
|
||||
#: field:document.webdav.file.property,create_date:0
|
||||
msgid "Date Created"
|
||||
msgstr ""
|
||||
msgstr "Datum kreiranja"
|
||||
|
||||
#. module: document_webdav
|
||||
#: constraint:document.directory:0
|
||||
msgid "Error! You can not create recursive Directories."
|
||||
msgstr ""
|
||||
msgstr "Pogreška! Ne možete stvarati rekurzivne mape."
|
||||
|
||||
#. module: document_webdav
|
||||
#: view:document.webdav.dir.property:0
|
||||
|
@ -40,7 +40,7 @@ msgstr ""
|
|||
#: view:document.webdav.file.property:0
|
||||
#: field:document.webdav.file.property,namespace:0
|
||||
msgid "Namespace"
|
||||
msgstr ""
|
||||
msgstr "Imenski prostor"
|
||||
|
||||
#. module: document_webdav
|
||||
#: field:document.directory,dav_prop_ids:0
|
||||
|
@ -56,7 +56,7 @@ msgstr ""
|
|||
#: view:document.webdav.dir.property:0
|
||||
#: view:document.webdav.file.property:0
|
||||
msgid "Group By..."
|
||||
msgstr ""
|
||||
msgstr "Grupiraj po..."
|
||||
|
||||
#. module: document_webdav
|
||||
#: view:document.directory:0
|
||||
|
@ -78,7 +78,7 @@ msgstr ""
|
|||
#: view:document.webdav.file.property:0
|
||||
#: field:document.webdav.file.property,file_id:0
|
||||
msgid "Document"
|
||||
msgstr ""
|
||||
msgstr "Dokument"
|
||||
|
||||
#. module: document_webdav
|
||||
#: model:ir.module.module,description:document_webdav.module_meta_information
|
||||
|
@ -105,7 +105,7 @@ msgstr ""
|
|||
#. module: document_webdav
|
||||
#: sql_constraint:document.directory:0
|
||||
msgid "Directory cannot be parent of itself!"
|
||||
msgstr ""
|
||||
msgstr "Mapa ne može biti sama sebi nadređena!"
|
||||
|
||||
#. module: document_webdav
|
||||
#: view:document.directory:0
|
||||
|
@ -120,7 +120,7 @@ msgstr ""
|
|||
#. module: document_webdav
|
||||
#: sql_constraint:document.directory:0
|
||||
msgid "The directory name must be unique !"
|
||||
msgstr ""
|
||||
msgstr "Naziv mape mora biti jedinstven!"
|
||||
|
||||
#. module: document_webdav
|
||||
#: code:addons/document_webdav/webdav.py:37
|
||||
|
@ -141,13 +141,13 @@ msgstr ""
|
|||
#: view:document.webdav.dir.property:0
|
||||
#: view:document.webdav.file.property:0
|
||||
msgid "Properties"
|
||||
msgstr ""
|
||||
msgstr "Značajke"
|
||||
|
||||
#. module: document_webdav
|
||||
#: field:document.webdav.dir.property,name:0
|
||||
#: field:document.webdav.file.property,name:0
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
msgstr "Naziv"
|
||||
|
||||
#. module: document_webdav
|
||||
#: model:ir.model,name:document_webdav.model_document_webdav_dir_property
|
||||
|
@ -158,13 +158,13 @@ msgstr ""
|
|||
#: field:document.webdav.dir.property,value:0
|
||||
#: field:document.webdav.file.property,value:0
|
||||
msgid "Value"
|
||||
msgstr ""
|
||||
msgstr "Vrijednost"
|
||||
|
||||
#. module: document_webdav
|
||||
#: field:document.webdav.dir.property,dir_id:0
|
||||
#: model:ir.model,name:document_webdav.model_document_directory
|
||||
msgid "Directory"
|
||||
msgstr ""
|
||||
msgstr "Direktorij"
|
||||
|
||||
#. module: document_webdav
|
||||
#: field:document.webdav.dir.property,write_uid:0
|
||||
|
@ -181,13 +181,13 @@ msgstr ""
|
|||
#: field:document.webdav.dir.property,write_date:0
|
||||
#: field:document.webdav.file.property,write_date:0
|
||||
msgid "Date Modified"
|
||||
msgstr ""
|
||||
msgstr "Datum izmjene"
|
||||
|
||||
#. module: document_webdav
|
||||
#: field:document.webdav.dir.property,create_uid:0
|
||||
#: field:document.webdav.file.property,create_uid:0
|
||||
msgid "Creator"
|
||||
msgstr ""
|
||||
msgstr "Kreator"
|
||||
|
||||
#. module: document_webdav
|
||||
#: model:ir.module.module,shortdesc:document_webdav.module_meta_information
|
||||
|
@ -197,7 +197,7 @@ msgstr ""
|
|||
#. module: document_webdav
|
||||
#: sql_constraint:document.directory:0
|
||||
msgid "Directory must have a parent or a storage"
|
||||
msgstr ""
|
||||
msgstr "Mapa mora imati roditelja ili pohranu (storage)"
|
||||
|
||||
#. module: document_webdav
|
||||
#: field:document.webdav.dir.property,do_subst:0
|
||||
|
|
|
@ -47,8 +47,9 @@ actions(Sign in/Sign out) performed by them.
|
|||
'wizard/hr_attendance_sign_in_out_view.xml',
|
||||
],
|
||||
'demo_xml': ['hr_attendance_demo.xml'],
|
||||
'test': ['test/test_hr_attendance.yml',
|
||||
'test/hr_attendance_report.yml'
|
||||
'test': [
|
||||
'test/attendance_process.yml',
|
||||
'test/hr_attendance_report.yml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
-
|
||||
In order to test attendance process in OpenERP, at the time of login, I use "Sign In/Sign Out" wizard for attendances.
|
||||
-
|
||||
!record {model: hr.sign.in.out, id: employee_sign_in}:
|
||||
name: Antoine Philippe
|
||||
state: absent
|
||||
-
|
||||
I click on this wizard to login.
|
||||
-
|
||||
!python {model: hr.sign.in.out}: |
|
||||
obj_attendance = self.pool.get('hr.employee')
|
||||
emp_ids = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Antoine Philippe")])
|
||||
if emp_ids:
|
||||
employee = obj_attendance.read(cr, uid, emp_ids)[0]
|
||||
self.write(cr, uid, [ref('employee_sign_in')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_ids[0]})
|
||||
self.si_check(cr, uid, [ref("employee_sign_in")])
|
||||
-
|
||||
I check that Employee is "Present".
|
||||
-
|
||||
!assert {model: hr.employee, id: hr.employee3, severity: error, string: Employee should be in present state}:
|
||||
- state == 'present'
|
||||
-
|
||||
I click on "Sign In" button of this wizard, this will Open a new form which ask for Last Sign Out date.
|
||||
-
|
||||
!python {model: hr.sign.in.out}: |
|
||||
obj_attendance = self.pool.get('hr.employee')
|
||||
emp_ids = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Antoine Philippe")])
|
||||
if emp_ids:
|
||||
employee = obj_attendance.read(cr, uid, emp_ids)[0]
|
||||
self.write(cr, uid, [ref('employee_sign_in')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_ids[0]})
|
||||
self.si_check(cr, uid, [ref("employee_sign_in")])
|
||||
-
|
||||
I select Last Sign Out date.
|
||||
-
|
||||
!record {model: hr.sign.in.out.ask, id: hr_sign_in_out_ask_Antoine_Philippe}:
|
||||
last_time: !eval time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
name: Antoine Philippe
|
||||
-
|
||||
Now I click on "Sign In" button of this wizard.
|
||||
-
|
||||
!python {model: hr.sign.in.out.ask}: |
|
||||
obj_attendance = self.pool.get('hr.employee')
|
||||
emp_ids = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Antoine Philippe")])
|
||||
if emp_ids:
|
||||
employee = obj_attendance.read(cr, uid, emp_ids)[0]
|
||||
self.write(cr, uid, [ref('hr_sign_in_out_ask_Antoine_Philippe')], {'emp_id': emp_ids[0]})
|
||||
-
|
||||
Finally i check the employee is present.
|
||||
-
|
||||
!assert {model: hr.employee, id: hr.employee3, severity: error, string: Employee should be in present state}:
|
||||
- state == 'present'
|
|
@ -2,19 +2,16 @@
|
|||
Print the HR Attendance Report By Month through the wizard
|
||||
-
|
||||
!python {model: hr.employee}: |
|
||||
import time
|
||||
ctx={}
|
||||
ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]})
|
||||
data_dict = {}
|
||||
from tools import test_reports
|
||||
ctx = {'model': 'hr.employee','active_ids': [ref('hr.employee1'),ref('hr.employee2'),ref('hr.employee3')]}
|
||||
data_dict = {}
|
||||
test_reports.try_report_action(cr, uid, 'action_hr_attendance_month',wiz_data=data_dict, context=ctx, our_module='hr_attendance')
|
||||
-
|
||||
Print HR Attendance Error Report through the wizard
|
||||
-
|
||||
!python {model: hr.employee}: |
|
||||
import time
|
||||
ctx={}
|
||||
ctx.update({'model': 'hr.employee','active_ids': [ref('hr.employee1')]})
|
||||
data_dict = {'init_date': time.strftime('%Y-01-01')}
|
||||
from tools import test_reports
|
||||
ctx = {'model': 'hr.employee','active_ids': [ref('hr.employee1')]}
|
||||
data_dict = {'init_date': time.strftime('%Y-01-01')}
|
||||
test_reports.try_report_action(cr, uid, 'action_hr_attendance_error',wiz_data=data_dict, context=ctx, our_module='hr_attendance')
|
||||
|
|
|
@ -1,116 +0,0 @@
|
|||
-
|
||||
In order to test hr_attendance module in OpenERP, I will first create new attendance reasons and perform Sign In/Sign Out operations.
|
||||
|
||||
-
|
||||
I create a new employee "Mark Johnson".
|
||||
-
|
||||
!record {model: hr.employee, id: hr_employee_employee0}:
|
||||
address_home_id: base.res_partner_address_1
|
||||
company_id: base.main_company
|
||||
gender: male
|
||||
name: Mark Johnson
|
||||
user_id: base.user_root
|
||||
|
||||
-
|
||||
I create a new attendance reason "Login" for Sign In.
|
||||
-
|
||||
!record {model: hr.action.reason, id: hr_action_reason_login0}:
|
||||
name: Login
|
||||
action_type: sign_in
|
||||
-
|
||||
I create second attendance reason "Logout" for Sign Out.
|
||||
-
|
||||
!record {model: hr.action.reason, id: hr_action_reason_logout0}:
|
||||
name: Logout
|
||||
action_type: sign_out
|
||||
-
|
||||
Now, at the time of login, I create an attendance with "Sign In" action and proper reason.
|
||||
-
|
||||
!record {model: hr.attendance, id: hr_attendance_0}:
|
||||
action: sign_in
|
||||
action_desc: 'hr_action_reason_login0'
|
||||
employee_id: 'hr_employee_employee0'
|
||||
name: !eval "'%s-01-01 19:08:08' %(datetime.now().year)"
|
||||
-
|
||||
I check that Employee state is "Present".
|
||||
-
|
||||
!assert {model: hr.employee, id: hr_employee_employee0}:
|
||||
- state == 'present'
|
||||
|
||||
-
|
||||
At the time of logout, I create an attendance with "Sign Out" action.
|
||||
-
|
||||
!record {model: hr.attendance, id: hr_attendance_1}:
|
||||
action: sign_out
|
||||
employee_id: 'hr_employee_employee0'
|
||||
name: !eval "'%s-01-01 19:10:55' %(datetime.now().year)"
|
||||
-
|
||||
I check that Employee state is Absent.
|
||||
-
|
||||
!assert {model: hr.employee, id: hr_employee_employee0}:
|
||||
- state == 'absent'
|
||||
|
||||
-
|
||||
I will use "Sign In/Sign Out" wizard for attendances.
|
||||
-
|
||||
!record {model: hr.sign.in.out, id: hr_sign_in_out_markjohnson0}:
|
||||
name: Mark Johnson
|
||||
state: absent
|
||||
|
||||
-
|
||||
I click on "Sign In" button of this wizard to login.
|
||||
-
|
||||
!python {model: hr.sign.in.out}: |
|
||||
obj_attendance = self.pool.get('hr.employee')
|
||||
emp_id = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Mark Johnson")])
|
||||
if emp_id:
|
||||
employee = obj_attendance.read(cr, uid, emp_id)[0]
|
||||
self.write(cr, uid, [ref('hr_sign_in_out_markjohnson0')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0]})
|
||||
self.si_check(cr, uid, [ref("hr_sign_in_out_markjohnson0")], {"active_id": ref("hr_employee_employee0")})
|
||||
|
||||
-
|
||||
I check that Employee state is "Present".
|
||||
-
|
||||
!assert {model: hr.employee, id: hr_employee_employee0}:
|
||||
- state == 'present'
|
||||
|
||||
-
|
||||
I forgot to "Sign Out" Yesterday and want to sign in Today using This wizard.
|
||||
-
|
||||
!record {model: hr.sign.in.out, id: hr_sign_in_out_markjohnson0}:
|
||||
name: Mark Johnson
|
||||
state: present
|
||||
-
|
||||
I click on "Sign In" button of this wizard, this will Open a new form which ask for Last Sign Out date.
|
||||
-
|
||||
!python {model: hr.sign.in.out}: |
|
||||
obj_attendance = self.pool.get('hr.employee')
|
||||
emp_id = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Mark Johnson")])
|
||||
if emp_id:
|
||||
employee = obj_attendance.read(cr, uid, emp_id)[0]
|
||||
self.write(cr, uid, [ref('hr_sign_in_out_markjohnson0')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0]})
|
||||
self.si_check(cr, uid, [ref("hr_sign_in_out_markjohnson0")])
|
||||
-
|
||||
I select Last Sign Out date.
|
||||
-
|
||||
!record {model: hr.sign.in.out.ask, id: hr_sign_in_out_ask_markjohnson0}:
|
||||
last_time: !eval time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
name: Mark Johnson
|
||||
-
|
||||
Now I click on "Sign In" button of this wizard.
|
||||
-
|
||||
!python {model: hr.sign.in.out.ask}: |
|
||||
obj_attendance = self.pool.get('hr.employee')
|
||||
emp_id = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Mark Johnson")])
|
||||
if emp_id:
|
||||
employee = obj_attendance.read(cr, uid, emp_id)[0]
|
||||
self.write(cr, uid, [ref('hr_sign_in_out_ask_markjohnson0')], {'emp_id': emp_id[0]})
|
||||
#self.sign_in(cr, uid, [ref("hr_sign_in_out_ask_markjohnson0")], {"active_ids": [ref("hr_attendance.menu_hr_attendance_sigh_in_out")]})
|
||||
|
||||
-
|
||||
Finally i will check the state of the employee is present.
|
||||
-
|
||||
!record {model: hr.sign.in.out, id: hr_sign_in_out_markjohnson0}:
|
||||
name: Mark Johnson
|
||||
state: present
|
||||
|
|
@ -268,7 +268,7 @@ class hr_expense_line(osv.osv):
|
|||
'description': fields.text('Description'),
|
||||
'analytic_account': fields.many2one('account.analytic.account','Analytic account'),
|
||||
'ref': fields.char('Reference', size=32),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of expense lines."),
|
||||
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of expense lines."),
|
||||
}
|
||||
_defaults = {
|
||||
'unit_quantity': 1,
|
||||
|
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -118,7 +118,7 @@ class hr_holidays(osv.osv):
|
|||
\nThe state is \'Refused\', when holiday request is refused by manager.\
|
||||
\nThe state is \'Approved\', when holiday request is approved by manager.'),
|
||||
'user_id':fields.related('employee_id', 'user_id', type='many2one', relation='res.users', string='User', store=True),
|
||||
'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}, select=True),
|
||||
'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'holiday_status_id': fields.many2one("hr.holidays.status", "Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'employee_id': fields.many2one('hr.employee', "Employee", select=True, invisible=False, readonly=True, states={'draft':[('readonly',False)]}, help='Leave Manager can let this field empty if this leave request/allocation is for every employee'),
|
||||
|
@ -129,7 +129,7 @@ class hr_holidays(osv.osv):
|
|||
'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'number_of_days': fields.function(_compute_number_of_days, string='Number of Days', store=True),
|
||||
'case_id': fields.many2one('crm.meeting', 'Meeting'),
|
||||
'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone"),
|
||||
'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone", select=True),
|
||||
'parent_id': fields.many2one('hr.holidays', 'Parent'),
|
||||
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
|
||||
'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data noupdate="1">
|
||||
|
||||
<!-- Casual leave -->
|
||||
<record model="hr.holidays.status" id="holiday_status_cl">
|
||||
|
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 8.0 KiB |
|
@ -720,8 +720,8 @@ class hr_payslip_worked_days(osv.osv):
|
|||
_description = 'Payslip Worked Days'
|
||||
_columns = {
|
||||
'name': fields.char('Description', size=256, required=True),
|
||||
'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade'),
|
||||
'sequence': fields.integer('Sequence', required=True,),
|
||||
'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade', select=True),
|
||||
'sequence': fields.integer('Sequence', required=True, select=True),
|
||||
'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"),
|
||||
'number_of_days': fields.float('Number of Days'),
|
||||
'number_of_hours': fields.float('Number of Hours'),
|
||||
|
@ -742,8 +742,8 @@ class hr_payslip_input(osv.osv):
|
|||
_description = 'Payslip Input'
|
||||
_columns = {
|
||||
'name': fields.char('Description', size=256, required=True),
|
||||
'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade'),
|
||||
'sequence': fields.integer('Sequence', required=True,),
|
||||
'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade', select=True),
|
||||
'sequence': fields.integer('Sequence', required=True, select=True),
|
||||
'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"),
|
||||
'amount': fields.float('Amount', help="It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SALEURO.amount * contract.wage*0.01."),
|
||||
'contract_id': fields.many2one('hr.contract', 'Contract', required=True, help="The contract for which applied this input"),
|
||||
|
@ -762,7 +762,7 @@ class hr_salary_rule(osv.osv):
|
|||
_columns = {
|
||||
'name':fields.char('Name', size=256, required=True, readonly=False),
|
||||
'code':fields.char('Code', size=64, required=True, help="The code of salary rules can be used as reference in computation of other rules. In that case, it is case sensitive."),
|
||||
'sequence': fields.integer('Sequence', required=True, help='Use to arrange calculation sequence'),
|
||||
'sequence': fields.integer('Sequence', required=True, help='Use to arrange calculation sequence', select=True),
|
||||
'quantity': fields.char('Quantity', size=256, help="It is used in computation for percentage and fixed amount.For e.g. A rule for Meal Voucher having fixed amount of 1€ per worked day can have its quantity defined in expression like worked_days.WORK100.number_of_days."),
|
||||
'category_id':fields.many2one('hr.salary.rule.category', 'Category', required=True),
|
||||
'active':fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the salary rule without removing it."),
|
||||
|
@ -930,7 +930,7 @@ class hr_payslip_line(osv.osv):
|
|||
'slip_id':fields.many2one('hr.payslip', 'Pay Slip', required=True, ondelete='cascade'),
|
||||
'salary_rule_id':fields.many2one('hr.salary.rule', 'Rule', required=True),
|
||||
'employee_id':fields.many2one('hr.employee', 'Employee', required=True),
|
||||
'contract_id':fields.many2one('hr.contract', 'Contract', required=True),
|
||||
'contract_id':fields.many2one('hr.contract', 'Contract', required=True, select=True),
|
||||
'amount': fields.float('Amount', digits_compute=dp.get_precision('Payroll')),
|
||||
'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Payroll')),
|
||||
'total': fields.function(_calculate_total, method=True, type='float', string='Total', digits_compute=dp.get_precision('Payroll'),store=True ),
|
||||
|
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 3.8 KiB |
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="analytic_journal" model="account.analytic.journal">
|
||||
<field name="code">TS</field>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="ir_actions_server_timsheet_sheet" model="ir.actions.server">
|
||||
<field eval="5" name="sequence"/>
|
||||
<field eval=""""code"""" name="state"/>
|
||||
|
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 5.8 KiB |
|
@ -0,0 +1,63 @@
|
|||
# Croatian translation for openobject-addons
|
||||
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
|
||||
"PO-Revision-Date: 2011-12-21 14:51+0000\n"
|
||||
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
|
||||
"Language-Team: Croatian <hr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2011-12-22 05:27+0000\n"
|
||||
"X-Generator: Launchpad (build 14560)\n"
|
||||
|
||||
#. module: html_view
|
||||
#: field:html.view,name:0
|
||||
msgid "Name"
|
||||
msgstr "Naziv"
|
||||
|
||||
#. module: html_view
|
||||
#: field:html.view,comp_id:0
|
||||
msgid "Company"
|
||||
msgstr "Organizacija"
|
||||
|
||||
#. module: html_view
|
||||
#: model:ir.actions.act_window,name:html_view.action_html_view_form
|
||||
#: model:ir.ui.menu,name:html_view.html_form
|
||||
msgid "Html Test"
|
||||
msgstr "Html Test"
|
||||
|
||||
#. module: html_view
|
||||
#: view:html.view:0
|
||||
msgid "Html Example"
|
||||
msgstr "Html primjer"
|
||||
|
||||
#. module: html_view
|
||||
#: model:ir.module.module,shortdesc:html_view.module_meta_information
|
||||
msgid "Html View"
|
||||
msgstr "Html pogled"
|
||||
|
||||
#. module: html_view
|
||||
#: field:html.view,bank_ids:0
|
||||
msgid "Banks"
|
||||
msgstr "Banke"
|
||||
|
||||
#. module: html_view
|
||||
#: model:ir.module.module,description:html_view.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" This is the test module which shows html tag supports in normal xml form "
|
||||
"view.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: html_view
|
||||
#: model:ir.model,name:html_view.model_html_view
|
||||
msgid "html.view"
|
||||
msgstr ""
|
|
@ -54,7 +54,7 @@ class idea_category(osv.osv):
|
|||
'name': fields.char('Category', size=64, required=True),
|
||||
'complete_name': fields.function(_categ_name_get_fnc, type="char", string='Name'),
|
||||
'summary': fields.text('Summary'),
|
||||
'parent_id': fields.many2one('idea.category', 'Parent Categories', ondelete='set null'),
|
||||
'parent_id': fields.many2one('idea.category', 'Parent Categories', ondelete='set null', select=True),
|
||||
'child_ids': fields.one2many('idea.category', 'parent_id', 'Child Categories'),
|
||||
'visibility':fields.boolean('Open Idea?', required=False, help="If True creator of the idea will be visible to others"),
|
||||
}
|
||||
|
|
|
@ -8,6 +8,12 @@
|
|||
<field name="visibility">True</field>
|
||||
</record>
|
||||
|
||||
<record model="idea.category" id="idea_category_technical">
|
||||
<field name="name">Technical</field>
|
||||
<field name="summary">Technical Ideas</field>
|
||||
<field name="visibility">True</field>
|
||||
</record>
|
||||
|
||||
<record model="idea.idea" id="idea_idea_one">
|
||||
<field name="name">TODO: Need to put a good idea on OpenERP</field>
|
||||
<field name="description">TODO: Need to put a good idea on OpenERP</field>
|
||||
|
@ -15,8 +21,16 @@
|
|||
<field name="visibility">True</field>
|
||||
</record>
|
||||
|
||||
<record model="idea.idea" id="idea_idea_two">
|
||||
<field name="name">Technical presentation for 1 hours in every day</field>
|
||||
<field name="description">Technical presentation for 1 hours in every day</field>
|
||||
<field name="category_id" ref="idea_category_technical"/>
|
||||
<field name="visibility">True</field>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field name="groups_id" eval="[(4,ref('base.group_tool_user'))]"/>
|
||||
<field name="groups_id" eval="[(4,ref('base.group_tool_user'))]"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,90 +1,42 @@
|
|||
- |
|
||||
In order to test the Idea module in OpenERP,
|
||||
we will create a full flow, from the idea definition up to the votes and discussions on the idea.
|
||||
- |
|
||||
Given that I have an Idea category "Technical".
|
||||
-
|
||||
!record {model: idea.category, id: idea_category_technical0}:
|
||||
name: Technical
|
||||
- |
|
||||
I create a New Idea of "Technical presentation for 1 hours in every day" and specify category "Technical".
|
||||
-
|
||||
!record {model: idea.idea, id: idea_idea_0}:
|
||||
category_id: idea_category_technical0
|
||||
created_date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
description: I want that Technical presentation are arranged for 1 hours in every
|
||||
day.\nso, on that presentation, we can know all things what improvement and development
|
||||
are done in our company.\n\n\n\n\n
|
||||
name: Technical presentation for 1 hours in every day
|
||||
user_id: base.user_root
|
||||
|
||||
- |
|
||||
I check that the idea is in draft state.
|
||||
-
|
||||
!assert {model: idea.idea, id: idea_idea_0}:
|
||||
- state == 'draft'
|
||||
|
||||
- |
|
||||
I open this idea by clicking on the "Open" button.
|
||||
-
|
||||
!workflow {model: idea.idea, action: idea_open, ref: idea_idea_0}
|
||||
|
||||
- |
|
||||
In order to check voting statistics in real systems I will create 2 new Users "test_idea_user1".
|
||||
-
|
||||
!record {model: res.users, id: test_idea_user1}:
|
||||
company_id: base.main_company
|
||||
context_lang: en_US
|
||||
login: test_idea_user1
|
||||
name: Idea test user1
|
||||
password: test_idea_user1
|
||||
groups_id: [ base.group_tool_user, ]
|
||||
- |
|
||||
And I will also create user2.
|
||||
-
|
||||
!record {model: res.users, id: test_idea_user2}:
|
||||
company_id: base.main_company
|
||||
context_lang: en_US
|
||||
login: test_idea_user2
|
||||
name: Idea test user2
|
||||
password: test_idea_user2
|
||||
groups_id: [ base.group_tool_user, ]
|
||||
- |
|
||||
In order to post vote I connect as test_idea_user1 and open the idea page
|
||||
I click on "Submit Vote" wizard button and vote the idea as "Normal"
|
||||
|
||||
-
|
||||
!python {model: idea.post.vote}: |
|
||||
uid2 = ref('test_idea_user1')
|
||||
new_id = self.create(cr, uid2, {'vote': "50"}, {"active_ids": [ref("idea_idea_0")]})
|
||||
self.do_vote(cr, uid2, [new_id], {"active_ids": [ref("idea_idea_0")]})
|
||||
|
||||
- |
|
||||
To add other vote I connect as test_idea_user2 and open the idea page.
|
||||
|
||||
I click on "Submit Vote" wizard button and vote the idea as "Very Good".
|
||||
|
||||
and put comment "We can learn many things from technical presentation".
|
||||
|
||||
In order to test the Idea module in OpenERP,
|
||||
-
|
||||
I open the idea "Need to put a good idea on OpenERP".
|
||||
-
|
||||
!workflow {model: idea.idea, action: idea_open, ref: idea_idea_one}
|
||||
-
|
||||
I check that the idea's state is open.
|
||||
-
|
||||
!assert {model: idea.idea, id: idea_idea_one}:
|
||||
- state == 'open'
|
||||
-
|
||||
I give vote the idea as "Very Good" and put comment "It will good for openERP feature".
|
||||
-
|
||||
!python {model: idea.post.vote}: |
|
||||
uid2 = ref('test_idea_user2')
|
||||
new_id = self.create(cr, uid2, {'vote': "100", 'note': 'We can learn many things from technical presentation'}, {"active_ids": [ref("idea_idea_0")]})
|
||||
self.do_vote(cr, uid2, [new_id], {'active_ids': [ref('idea_idea_0')]})
|
||||
|
||||
- |
|
||||
I can see that the Average score changed in "Average score" field with value 75
|
||||
new_id = self.create(cr, uid, {'vote': "100", 'note': 'It will good for openERP feature'}, {"active_ids": [ref("idea_idea_one")]})
|
||||
self.do_vote(cr, uid, [new_id], {'active_ids': [ref('idea_idea_one')]})
|
||||
-
|
||||
!record {model: idea.idea, id: idea_idea_0}:
|
||||
vote_avg: 75
|
||||
|
||||
- |
|
||||
I connect as Manager and close this idea by click on "Close" button.
|
||||
I check the Average score.
|
||||
-
|
||||
!workflow {model: idea.idea, action: idea_close, ref: idea_idea_0}
|
||||
|
||||
- |
|
||||
I check that the idea's state is now Accepted
|
||||
!assert {model: idea.idea, id: idea_idea_one}:
|
||||
vote_avg: 100
|
||||
-
|
||||
!assert {model: idea.idea, id: idea_idea_0}:
|
||||
- state == 'close'
|
||||
I Accept the idea of "Need to put a good idea on OpenERP".
|
||||
-
|
||||
!workflow {model: idea.idea, action: idea_close, ref: idea_idea_one}
|
||||
-
|
||||
I check that the idea's state is now Accepted.
|
||||
-
|
||||
!assert {model: idea.idea, id: idea_idea_one}:
|
||||
- state == 'close'
|
||||
-
|
||||
I Refuse the idea of "Technical presentation for 1 hours in every day".
|
||||
-
|
||||
!workflow {model: idea.idea, action: idea_open, ref: idea_idea_two}
|
||||
-
|
||||
!workflow {model: idea.idea, action: idea_cancel, ref: idea_idea_two}
|
||||
-
|
||||
I check that the idea's state is now Refused.
|
||||
-
|
||||
!assert {model: idea.idea, id: idea_idea_two}:
|
||||
- state == 'cancel'
|
|
@ -0,0 +1,155 @@
|
|||
# Arabic translation for openobject-addons
|
||||
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
|
||||
"PO-Revision-Date: 2011-12-21 22:39+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Arabic <ar@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2011-12-22 05:27+0000\n"
|
||||
"X-Generator: Launchpad (build 14560)\n"
|
||||
|
||||
#. module: knowledge
|
||||
#: model:ir.ui.menu,name:knowledge.menu_document
|
||||
msgid "Knowledge"
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: help:knowledge.installer,wiki_quality_manual:0
|
||||
msgid "Creates an example skeleton for a standard quality manual."
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: view:knowledge.installer:0
|
||||
msgid "Share information within the company with these specific Addons."
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: field:knowledge.installer,document_ftp:0
|
||||
msgid "Shared Repositories (FTP)"
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: model:ir.module.module,shortdesc:knowledge.module_meta_information
|
||||
msgid "Knowledge Management System"
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: field:knowledge.installer,wiki:0
|
||||
msgid "Collaborative Content (Wiki)"
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: help:knowledge.installer,document_ftp:0
|
||||
msgid ""
|
||||
"Provides an FTP access to your OpenERP's Document Management System. It lets "
|
||||
"you access attachments and virtual documents through a standard FTP client."
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: help:knowledge.installer,document_webdav:0
|
||||
msgid ""
|
||||
"Provides a WebDAV access to your OpenERP's Document Management System. Lets "
|
||||
"you access attachments and virtual documents through your standard file "
|
||||
"browser."
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: view:knowledge.installer:0
|
||||
msgid "Configure"
|
||||
msgstr "تهيئة"
|
||||
|
||||
#. module: knowledge
|
||||
#: view:knowledge.installer:0
|
||||
msgid "title"
|
||||
msgstr "الاسم"
|
||||
|
||||
#. module: knowledge
|
||||
#: model:ir.module.module,description:knowledge.module_meta_information
|
||||
msgid ""
|
||||
"Installer for knowledge-based tools\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: model:ir.ui.menu,name:knowledge.menu_document_configuration
|
||||
msgid "Configuration"
|
||||
msgstr "إعدادات"
|
||||
|
||||
#. module: knowledge
|
||||
#: model:ir.actions.act_window,name:knowledge.action_knowledge_installer
|
||||
msgid "Knowledge Modules Installation"
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: field:knowledge.installer,wiki_quality_manual:0
|
||||
msgid "Quality Manual"
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: field:knowledge.installer,document_webdav:0
|
||||
msgid "Shared Repositories (WebDAV)"
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: field:knowledge.installer,progress:0
|
||||
msgid "Configuration Progress"
|
||||
msgstr "سير الإعدادات"
|
||||
|
||||
#. module: knowledge
|
||||
#: help:knowledge.installer,wiki_faq:0
|
||||
msgid ""
|
||||
"Creates a skeleton internal FAQ pre-filled with documentation about "
|
||||
"OpenERP's Document Management System."
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: field:knowledge.installer,wiki_faq:0
|
||||
msgid "Internal FAQ"
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: model:ir.ui.menu,name:knowledge.menu_document2
|
||||
msgid "Collaborative Content"
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: field:knowledge.installer,config_logo:0
|
||||
msgid "Image"
|
||||
msgstr "صورة"
|
||||
|
||||
#. module: knowledge
|
||||
#: model:ir.actions.act_window,name:knowledge.action_knowledge_installer
|
||||
#: view:knowledge.installer:0
|
||||
msgid "Knowledge Application Configuration"
|
||||
msgstr "الاعدادات لنظام أدارة الوثائق"
|
||||
|
||||
#. module: knowledge
|
||||
#: model:ir.model,name:knowledge.model_knowledge_installer
|
||||
msgid "knowledge.installer"
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: view:knowledge.installer:0
|
||||
msgid "Configure Your Knowledge Application"
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: help:knowledge.installer,wiki:0
|
||||
msgid ""
|
||||
"Lets you create wiki pages and page groups in order to keep track of "
|
||||
"business knowledge and share it with and between your employees."
|
||||
msgstr ""
|
||||
|
||||
#. module: knowledge
|
||||
#: view:knowledge.installer:0
|
||||
msgid "Content templates"
|
||||
msgstr ""
|
|
@ -0,0 +1,23 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (c) 2011 Openerp.uy <openerp.uy@lists.launchpad.net>
|
||||
# Proyecto de Localización de OperERP para Uruguay
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (c) 2011 Openerp.uy <openerp.uy@lists.launchpad.net>
|
||||
# Proyecto de Localización de OperERP para Uruguay
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
"name" : "Uruguay - Chart of Accounts",
|
||||
"version" : "0.1",
|
||||
"author" : "Uruguay l10n Team & Guillem Barba",
|
||||
"category" : "Localization/Account Charts",
|
||||
"website" : "https://launchpad.net/openerp-uruguay",
|
||||
"description": """
|
||||
General Chart of Accounts
|
||||
=========================
|
||||
|
||||
Provide Templates for Chart of Accounts, Taxes for Uruguay
|
||||
|
||||
""",
|
||||
"complexity": "normal",
|
||||
"license" : "AGPL-3",
|
||||
"depends" : [
|
||||
"account",
|
||||
],
|
||||
"init_xml" : [],
|
||||
"update_xml": [
|
||||
"account_types.xml",
|
||||
"taxes_code_template.xml",
|
||||
"account_chart_template.xml",
|
||||
"taxes_template.xml",
|
||||
"l10n_uy_wizard.xml",
|
||||
],
|
||||
"demo_xml": [],
|
||||
"active": False,
|
||||
"installable": True,
|
||||
'certificate' : '',
|
||||
"images": ["images/config_chart_l10n_uy.jpeg","images/l10n_uy_chart.jpeg"],
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="type_view" model="account.account.type">
|
||||
<field name="name">Vista</field>
|
||||
<field name="code">view</field>
|
||||
<field name="report_type">none</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record id="type_equity" model="account.account.type">
|
||||
<field name="name">Capital</field>
|
||||
<field name="code">equity</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record id="type_asset" model="account.account.type">
|
||||
<field name="name">Activos</field>
|
||||
<field name="code">asset</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record id="type_stock" model="account.account.type">
|
||||
<field name="name">Existencias</field>
|
||||
<field name="code">stock</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record id="type_third" model="account.account.type">
|
||||
<field name="name">Terceros</field>
|
||||
<field name="code">third</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record id="type_third_rec" model="account.account.type">
|
||||
<field name="name">Terceros A Cobrar</field>
|
||||
<field name="code">third-rec</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record id="type_third_pay" model="account.account.type">
|
||||
<field name="name">Terceros A Pagar</field>
|
||||
<field name="code">third-pay</field>
|
||||
<field name="report_type">liability</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record id="type_tax" model="account.account.type">
|
||||
<field name="name">Impuestos</field>
|
||||
<field name="code">tax</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record id="type_tax_in" model="account.account.type">
|
||||
<field name="name">Impuestos Cobrados</field>
|
||||
<field name="code">tax-in</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record id="type_tax_out" model="account.account.type">
|
||||
<field name="name">Impuestos Pagados</field>
|
||||
<field name="code">tax-out</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record id="type_financial" model="account.account.type">
|
||||
<field name="name">Financieros</field>
|
||||
<field name="code">financial</field>
|
||||
<field name="report_type">none</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record id="type_expense" model="account.account.type">
|
||||
<field name="name">Gastos</field>
|
||||
<field name="code">expense</field>
|
||||
<field name="report_type">expense</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record id="type_income" model="account.account.type">
|
||||
<field name="name">Ingresos</field>
|
||||
<field name="code">income</field>
|
||||
<field name="report_type">income</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record id="type_liability" model="account.account.type">
|
||||
<field name="name">Obligaciones</field>
|
||||
<field name="code">liability</field>
|
||||
<field name="report_type">asset</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record id="type_other" model="account.account.type">
|
||||
<field name="name">Otros</field>
|
||||
<field name="code">other</field>
|
||||
<field name="report_type">none</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_uy
|
||||
#
|
||||
# ale <alemao@adinet.com.uy>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.0.3\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2011-11-26 01:16+0000\n"
|
||||
"PO-Revision-Date: 2011-11-25 23:28-0200\n"
|
||||
"Last-Translator: ale <alemao@adinet.com.uy>\n"
|
||||
"Language-Team: openerp <kde-i18n-doc@kde.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
"Language: openerp\n"
|
||||
"X-Generator: Lokalize 1.2\n"
|
||||
|
||||
#. module: l10n_uy
|
||||
#: model:ir.module.module,shortdesc:l10n_uy.module_meta_information
|
||||
msgid "Uruguay - Chart of Accounts"
|
||||
msgstr "Plan de Cuentas - Uruguay"
|
||||
|
||||
#. module: l10n_uy
|
||||
#: model:ir.module.module,description:l10n_uy.module_meta_information
|
||||
msgid ""
|
||||
"General Chart of Accounts\n"
|
||||
"\n"
|
||||
"Initial Chart of Accounts Uruguay\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Plan de Cuentas Genérico\n"
|
||||
"\n"
|
||||
"Plan de cuentas inicial para empresas de Uruguay\n"
|
||||
"\n"
|
||||
|
||||
#. module: l10n_uy
|
||||
#: model:ir.actions.todo,note:l10n_uy.config_call_account_template_uy
|
||||
msgid ""
|
||||
"Generate Chart of Accounts from Template. You will be asked to pass the name "
|
||||
"of the company, the chart template to follow, the no. of digits to generate "
|
||||
"the code for your accounts and Bank account, currency to create Journals."
|
||||
msgstr ""
|
||||
"Se generará un plan de cuentas a partir de una plantilla. Se le requerirá el "
|
||||
"nombre de la empresa, la plantilla de origen, la cantidad de dígitos para "
|
||||
"generar el código de la cuentas, además de cuentas bancarias y moneda para la "
|
||||
"creación de los diarios contables."
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_uy
|
||||
#
|
||||
# ale <alemao@adinet.com.uy>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 6.0.3\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2011-11-26 01:16+0000\n"
|
||||
"PO-Revision-Date: 2011-11-25 23:28-0200\n"
|
||||
"Last-Translator: ale <alemao@adinet.com.uy>\n"
|
||||
"Language-Team: openerp <kde-i18n-doc@kde.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
"Language: openerp\n"
|
||||
"X-Generator: Lokalize 1.2\n"
|
||||
|
||||
#. module: l10n_uy
|
||||
#: model:ir.module.module,shortdesc:l10n_uy.module_meta_information
|
||||
msgid "Uruguay - Chart of Accounts"
|
||||
msgstr "Plan de Cuentas - Uruguay"
|
||||
|
||||
#. module: l10n_uy
|
||||
#: model:ir.module.module,description:l10n_uy.module_meta_information
|
||||
msgid ""
|
||||
"General Chart of Accounts\n"
|
||||
"\n"
|
||||
"Initial Chart of Accounts Uruguay\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Plan de Cuentas Genérico\n"
|
||||
"\n"
|
||||
"Plan de cuentas inicial para empresas de Uruguay\n"
|
||||
"\n"
|
||||
|
||||
#. module: l10n_uy
|
||||
#: model:ir.actions.todo,note:l10n_uy.config_call_account_template_uy
|
||||
msgid ""
|
||||
"Generate Chart of Accounts from Template. You will be asked to pass the name "
|
||||
"of the company, the chart template to follow, the no. of digits to generate "
|
||||
"the code for your accounts and Bank account, currency to create Journals."
|
||||
msgstr ""
|
||||
"Se generará un plan de cuentas a partir de una plantilla. Se le requerirá el "
|
||||
"nombre de la empresa, la plantilla de origen, la cantidad de dígitos para "
|
||||
"generar el código de la cuentas, además de cuentas bancarias y moneda para la "
|
||||
"creación de los diarios contables."
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="config_call_account_template_uy" model="ir.actions.todo">
|
||||
<field name="action_id" ref="account.action_wizard_multi_chart"/>
|
||||
<field name="type">automatic</field>
|
||||
<field name="category_id" ref="account.category_accounting_configuration"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="account.tax.code.template" id="vat_code_tax">
|
||||
<field name="name">Estructura de IVA</field>
|
||||
</record>
|
||||
<!-- IVAS -->
|
||||
<record model="account.tax.code.template" id="vat_code_balance_net">
|
||||
<field name="name">Saldo de IVA</field>
|
||||
<field name="parent_id" ref="vat_code_tax"/>
|
||||
</record>
|
||||
<!-- Compras, pagado, soportado, saliente -->
|
||||
<record model="account.tax.code.template" id="vat_code_paid">
|
||||
<field name="name">IVA Compras - pagado</field>
|
||||
<field name="parent_id" ref="vat_code_balance_net"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_paid_22">
|
||||
<field name="name">IVA Compras 22%</field>
|
||||
<field name="parent_id" ref="vat_code_paid"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_paid_10">
|
||||
<field name="name">IVA Compras 10%</field>
|
||||
<field name="parent_id" ref="vat_code_paid"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_pur_exempt">
|
||||
<field name="name">Compras Exento IVA </field>
|
||||
<field name="parent_id" ref="vat_code_paid"/>
|
||||
<field name="notprintable" eval="True"/>
|
||||
</record>
|
||||
|
||||
<!-- Ventas, cobrado, recibido, entrante -->
|
||||
<record model="account.tax.code.template" id="vat_code_received">
|
||||
<field name="name">IVA Ventas - percibido</field>
|
||||
<field name="parent_id" ref="vat_code_balance_net"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_received_22">
|
||||
<field name="name">IVA Ventas 22%</field>
|
||||
<field name="parent_id" ref="vat_code_received"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_received_10">
|
||||
<field name="name">IVA Ventas 10%</field>
|
||||
<field name="parent_id" ref="vat_code_received"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_sale_exempt">
|
||||
<field name="name">Ventas Exento IVA</field>
|
||||
<field name="parent_id" ref="vat_code_received"/>
|
||||
<field name="notprintable" eval="True"/>
|
||||
</record>
|
||||
|
||||
<!-- BASE IMPONIBLES -->
|
||||
<record model="account.tax.code.template" id="vat_code_base_net">
|
||||
<field name="name">Base Imponible</field>
|
||||
<field name="parent_id" ref="vat_code_tax"/>
|
||||
</record>
|
||||
<!-- Bases Iva Comprado, pagado, soportado, saliente -->
|
||||
<record model="account.tax.code.template" id="vat_code_base_pur">
|
||||
<field name="name">Base Imponible Compras</field>
|
||||
<field name="parent_id" ref="vat_code_base_net"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_base_pur_22">
|
||||
<field name="name">Base Compras 22%</field>
|
||||
<field name="parent_id" ref="vat_code_base_pur"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_base_pur_10">
|
||||
<field name="name">Base Compras 10%</field>
|
||||
<field name="parent_id" ref="vat_code_base_pur"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_base_pur_0">
|
||||
<field name="name">Base Compras 0%</field>
|
||||
<field name="parent_id" ref="vat_code_base_pur"/>
|
||||
</record>
|
||||
<!-- Bases Iva Vendido, cobrado, recibido, entrante -->
|
||||
<record model="account.tax.code.template" id="vat_code_base_sale">
|
||||
<field name="name">Base Imponible Ventas</field>
|
||||
<field name="parent_id" ref="vat_code_base_net"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_base_sale_22">
|
||||
<field name="name">Base Ventas 22%</field>
|
||||
<field name="parent_id" ref="vat_code_base_sale"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_base_sale_10">
|
||||
<field name="name">Base Ventas 10%</field>
|
||||
<field name="parent_id" ref="vat_code_base_sale"/>
|
||||
</record>
|
||||
<record model="account.tax.code.template" id="vat_code_base_sale_0">
|
||||
<field name="name">Base Ventas 0%</field>
|
||||
<field name="parent_id" ref="vat_code_base_sale"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="vat1" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="uy_chart_template"/>
|
||||
<field name="name">IVA Ventas (22%)</field>
|
||||
<field name="amount">0.220000</field>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="uy_code_5202"/>
|
||||
<field name="account_paid_id" ref="uy_code_5202"/>
|
||||
<field name="base_code_id" ref="vat_code_base_sale_22"/>
|
||||
<field name="tax_code_id" ref="vat_code_received_22"/>
|
||||
<field name="ref_base_code_id" ref="vat_code_base_sale"/>
|
||||
<field name="ref_tax_code_id" ref="vat_code_received"/>
|
||||
<field eval="1.0" name="tax_sign"/>
|
||||
<field eval="1.0" name="base_sign"/>
|
||||
<field eval="-1.0" name="ref_tax_sign"/>
|
||||
<field eval="-1.0" name="ref_base_sign"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
</record>
|
||||
|
||||
<record id="vat2" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="uy_chart_template"/>
|
||||
<field name="name">IVA Ventas (10%)</field>
|
||||
<field name="amount">0.100000</field>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="uy_code_5201"/>
|
||||
<field name="account_paid_id" ref="uy_code_5201"/>
|
||||
<field name="base_code_id" ref="vat_code_base_sale_10"/>
|
||||
<field name="tax_code_id" ref="vat_code_received_10"/>
|
||||
<field name="ref_base_code_id" ref="vat_code_base_sale"/>
|
||||
<field name="ref_tax_code_id" ref="vat_code_received"/>
|
||||
<field eval="1.0" name="tax_sign"/>
|
||||
<field eval="1.0" name="base_sign"/>
|
||||
<field eval="-1.0" name="ref_tax_sign"/>
|
||||
<field eval="-1.0" name="ref_base_sign"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
</record>
|
||||
|
||||
<record id="vat3" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="uy_chart_template"/>
|
||||
<field name="name">Ventas Exentos IVA</field>
|
||||
<field name="amount">0.000000</field>
|
||||
<field name="type">fixed</field>
|
||||
<field name="base_code_id" ref="vat_code_base_sale_0"/>
|
||||
<field name="tax_code_id" ref="vat_code_sale_exempt"/>
|
||||
<field name="ref_base_code_id" ref="vat_code_base_sale"/>
|
||||
<field name="ref_tax_code_id" ref="vat_code_received"/>
|
||||
<field eval="1.0" name="base_sign"/>
|
||||
<field eval="-1.0" name="ref_base_sign"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<record id="vat4" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="uy_chart_template"/>
|
||||
<field name="name">IVA Compras (22%)</field>
|
||||
<field name="amount">0.220000</field>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="uy_code_11502"/>
|
||||
<field name="account_paid_id" ref="uy_code_11502"/>
|
||||
<field name="base_code_id" ref="vat_code_base_pur_22"/>
|
||||
<field name="tax_code_id" ref="vat_code_paid_22"/>
|
||||
<field name="ref_base_code_id" ref="vat_code_base_pur"/>
|
||||
<field name="ref_tax_code_id" ref="vat_code_paid"/>
|
||||
<field eval="1.0" name="tax_sign"/>
|
||||
<field eval="1.0" name="base_sign"/>
|
||||
<field eval="-1.0" name="ref_tax_sign"/>
|
||||
<field eval="-1.0" name="ref_base_sign"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record id="vat5" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="uy_chart_template"/>
|
||||
<field name="name">IVA Compras (10%)</field>
|
||||
<field name="amount">0.100000</field>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="uy_code_11501"/>
|
||||
<field name="account_paid_id" ref="uy_code_11501"/>
|
||||
<field name="base_code_id" ref="vat_code_base_pur_10"/>
|
||||
<field name="tax_code_id" ref="vat_code_paid_10"/>
|
||||
<field name="ref_base_code_id" ref="vat_code_base_pur"/>
|
||||
<field name="ref_tax_code_id" ref="vat_code_paid"/>
|
||||
<field eval="1.0" name="tax_sign"/>
|
||||
<field eval="1.0" name="base_sign"/>
|
||||
<field eval="-1.0" name="ref_tax_sign"/>
|
||||
<field eval="-1.0" name="ref_base_sign"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
<record id="vat6" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="uy_chart_template"/>
|
||||
<field name="name">Compras Exentos IVA</field>
|
||||
<field name="amount">0.000000</field>
|
||||
<field name="type">fixed</field>
|
||||
<field name="base_code_id" ref="vat_code_base_pur_0"/>
|
||||
<field name="tax_code_id" ref="vat_code_pur_exempt"/>
|
||||
<field name="ref_base_code_id" ref="vat_code_base_pur"/>
|
||||
<field name="ref_tax_code_id" ref="vat_code_paid"/>
|
||||
<field eval="1.0" name="base_sign"/>
|
||||
<field eval="-1.0" name="ref_base_sign"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -436,7 +436,7 @@ class mrp_production(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Reference', size=64, required=True),
|
||||
'origin': fields.char('Source Document', size=64, help="Reference of the document that generated this production order request."),
|
||||
'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority'),
|
||||
'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', select=True),
|
||||
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'product_qty': fields.float('Product Qty', digits_compute=dp.get_precision('Product UoM'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<field name="code">ASML - HOUR</field>
|
||||
<field name="name">Costing Account For Hours of Assembly.</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="account_assembly_cycle" model="account.analytic.account">
|
||||
<field name="type">normal</field>
|
||||
<field name="code">ASML - Cycle</field>
|
||||
|
@ -31,8 +31,8 @@
|
|||
<field name="name">Assembly Service Cost</field>
|
||||
<field name="categ_id" ref="product.product_category_assembly"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
Resource: mrp.workcenter
|
||||
-->
|
||||
|
@ -209,7 +209,7 @@
|
|||
<field name="hour_nbr">1</field>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="mrp_routing_workcenter_4" model="mrp.routing.workcenter">
|
||||
<field name="routing_id" ref="mrp_routing_1"/>
|
||||
<field name="workcenter_id" ref="mrp_workcenter_1"/>
|
||||
|
@ -329,10 +329,18 @@
|
|||
<field model="product.product" name="product_id" ref="product.product_product_cpu3"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_arm1" model="mrp.bom">
|
||||
<field name="name">ARM100 + Subproduct</field>
|
||||
<field name="sequence">40</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
<field model="product.product" name="product_id" ref="product.product_product_arm" />
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_kit3" model="mrp.bom">
|
||||
<field name="code">KIT</field>
|
||||
<field name="name">Kit Keyboard + Mouse</field>
|
||||
<field name="sequence">40</field>
|
||||
<field name="sequence">42</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
<field name="type">phantom</field>
|
||||
|
@ -574,7 +582,7 @@
|
|||
<field name="bom_id" ref="mrp_bom_kit1"/>
|
||||
<field model="product.product" name="product_id" ref="product.product_product_24"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="mrp_bom_41" model="mrp.bom">
|
||||
<field name="name">Regular processor config</field>
|
||||
<field name="sequence">111</field>
|
||||
|
@ -602,7 +610,6 @@
|
|||
<field name="bom_id" ref="mrp_bom_9"/>
|
||||
<field model="product.product" name="product_id" ref="product.product_product_tow1"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_kit2" model="mrp.bom">
|
||||
<field name="code">KIT</field>
|
||||
<field name="sequence">118</field>
|
||||
|
@ -613,11 +620,19 @@
|
|||
<field name="bom_id" ref="mrp_bom_9"/>
|
||||
<field model="product.product" name="product_id" ref="product.product_product_26"/>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_34" model="mrp.bom">
|
||||
<field name="name">SIDEPAN</field>
|
||||
<field name="sequence">121</field>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
<field name="type">normal</field>
|
||||
<field name="bom_id" ref="mrp_bom_arm1"/>
|
||||
<field model="product.product" name="product_id" ref="product.product_product_sidepanel0"/>
|
||||
</record>
|
||||
<!--
|
||||
Resource: mrp.bom new EVV
|
||||
-->
|
||||
|
||||
|
||||
<record id="mrp_bom_defaultbomforshelfofcm0" model="mrp.bom">
|
||||
<field name="name">Default BOM for Shelf of 100cm</field>
|
||||
<field name="code">SHE100</field>
|
||||
|
@ -662,7 +677,7 @@
|
|||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
<field name="name">Rear panel SHE100</field>
|
||||
<field name="type">phantom</field>
|
||||
<field name="type">phantom</field>
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_shelf0" model="mrp.bom">
|
||||
|
@ -672,11 +687,11 @@
|
|||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
|
||||
<field name="product_qty">3.0</field>
|
||||
<field name="name">RCK100</field>
|
||||
<field name="type">phantom</field>
|
||||
<field name="type">phantom</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
BOMs for 1 RCK100 PCE
|
||||
BOMs for 1 RCK100 PCE
|
||||
Product Ref Qty UoM Type of BoM
|
||||
SPAN100 1 PCE phantom
|
||||
METC000 4 PCE normal
|
||||
|
@ -706,7 +721,7 @@
|
|||
<field name="name">METC000</field>
|
||||
</record>
|
||||
<!--
|
||||
Bill of Materials for 1 SPAN100 PCE
|
||||
Bill of Materials for 1 SPAN100 PCE
|
||||
Product Code Quantity Unit of Measure
|
||||
WOOD010 0.083 m
|
||||
-->
|
||||
|
@ -726,9 +741,9 @@
|
|||
<field name="name">WOOD010</field>
|
||||
</record>
|
||||
<!-- BoMs for 1 Assembly Section PCE
|
||||
Product Ref. Qty UoM
|
||||
LIN40 0.25 Meter
|
||||
|
||||
Product Ref. Qty UoM
|
||||
LIN40 0.25 Meter
|
||||
|
||||
-->
|
||||
<record id="mrp_bom_assemblysection1" model="mrp.bom">
|
||||
<field name="name">Assembly Section</field>
|
||||
|
@ -737,7 +752,7 @@
|
|||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
<field name="product_qty">1.0</field>
|
||||
<field name="routing_id" ref="mrp.mrp_routing_0"/>
|
||||
|
||||
|
||||
</record>
|
||||
|
||||
<record id="mrp_bom_woodlintelm0" model="mrp.bom">
|
||||
|
@ -749,7 +764,7 @@
|
|||
<field name="name">Wood Lintel 0.25m</field>
|
||||
</record>
|
||||
<!--
|
||||
Bill of Materials for 1 RPAN100 PCE
|
||||
Bill of Materials for 1 RPAN100 PCE
|
||||
Product Code Quantity Unit of Measure
|
||||
WOOD002 0.25 m
|
||||
-->
|
||||
|
@ -785,8 +800,8 @@
|
|||
RPAN200 1 PCE normal
|
||||
PROFIL 4 PCE normal
|
||||
SIDEPAN 2 PCE normal
|
||||
METC000 12 PCE normal
|
||||
RCK200 3 PCE normal
|
||||
METC000 12 PCE normal
|
||||
RCK200 3 PCE normal
|
||||
-->
|
||||
<record id="mrp_bom_rearpanelarm2" model="mrp.bom">
|
||||
<field name="sequence">147</field>
|
||||
|
@ -867,7 +882,7 @@
|
|||
<field name="bom_id" ref="mrp_bom_defaultbomforkitshelfofcm0"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
<record id="product.product_uom_dozen" model="product.uom">
|
||||
<field name="category_id" ref="product.product_uom_categ_unit"/>
|
||||
|
@ -886,7 +901,7 @@
|
|||
<field name="bom_id" ref="mrp_bom_defaultbomforshelfofcm0"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
<record id="product_uom_categ_fluid" model="product.uom.categ">
|
||||
<field name="name">Fluid</field>
|
||||
|
@ -995,7 +1010,7 @@
|
|||
<field name="qty_multiple">1</field>
|
||||
<field name="warehouse_id" ref="stock.warehouse0"/>
|
||||
<field name="location_id" ref="stock.stock_location_stock"/>
|
||||
|
||||
|
||||
</record>
|
||||
<record id="stock_rule_sugar" model="stock.warehouse.orderpoint">
|
||||
<field name="product_id" ref="product_sugar"/>
|
||||
|
@ -1015,7 +1030,7 @@
|
|||
<field name="bom_id" ref="mrp_bom_orangejuice"/>
|
||||
<field name="product_qty">100.00</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="product_shirt" model="product.product">
|
||||
<field name="categ_id" ref="product.cat1"/>
|
||||
<field name="name">Shirt</field>
|
||||
|
@ -1081,7 +1096,7 @@
|
|||
<field name="type">normal</field>
|
||||
<field name="bom_id" ref="mrp_bom_shirt"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="stock_shirt_buttons" model="stock.warehouse.orderpoint">
|
||||
<field name="product_id" ref="product_buttons"/>
|
||||
<field name="product_uom" ref="product.product_uom_unit"/>
|
||||
|
@ -1108,7 +1123,7 @@
|
|||
<field name="routing_id" ref="mrp.mrp_routing_0"/>
|
||||
</record>
|
||||
<workflow action="button_confirm" model="mrp.production" ref="mrp_production_order1"/>
|
||||
|
||||
|
||||
<!-- Run Scheduler -->
|
||||
<function model="procurement.order" name="run_scheduler"/>
|
||||
</data>
|
||||
|
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.5 KiB |
|
@ -93,7 +93,7 @@ class mrp_production_workcenter_line(osv.osv):
|
|||
"* When the user cancels the work order it will be set in 'Canceled' state.\n" \
|
||||
"* When order is completely processed that time it is set in 'Finished' state."),
|
||||
'date_start_date': fields.function(_get_date_date, string='Start Date', type='date'),
|
||||
'date_planned': fields.datetime('Scheduled Date'),
|
||||
'date_planned': fields.datetime('Scheduled Date', select=True),
|
||||
'date_planned_end': fields.function(_get_date_end, string='End Date', type='datetime'),
|
||||
'date_start': fields.datetime('Start Date'),
|
||||
'date_finished': fields.datetime('End Date'),
|
||||
|
|
|
@ -48,8 +48,12 @@ The aim is to have a complete module to manage all products repairs. The followi
|
|||
'mrp_repair_workflow.xml',
|
||||
'mrp_repair_report.xml',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test': ['test/test_mrp_repair.yml', 'test/mrp_repair_report.yml','test/mrp_repair_cancel.yml'],
|
||||
'demo_xml': ['mrp_repair_demo.yml'],
|
||||
'test': ['test/test_mrp_repair_noneinv.yml',
|
||||
'test/test_mrp_repair_b4inv.yml',
|
||||
'test/test_mrp_repair_afterinv.yml',
|
||||
'test/test_mrp_repair_cancel.yml',
|
||||
'test/mrp_repair_report.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0060814381277',
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
-
|
||||
!record {model: stock.move, id: stock_move_pcbasicpc0}:
|
||||
company_id: base.main_company
|
||||
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[PC1] Basic PC'
|
||||
product_id: product.product_product_pc1
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 1.0
|
||||
-
|
||||
!record {model: mrp.repair, id: mrp_repair_rmrp1}:
|
||||
address_id: base.res_partner_address_1
|
||||
guarantee_limit: !eval datetime.today().strftime("%Y-%m-%d")
|
||||
invoice_method: 'none'
|
||||
partner_invoice_id: base.res_partner_address_1
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_14
|
||||
move_id: 'stock_move_pcbasicpc0'
|
||||
name: RMA00004
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[HDD1] HDD Seagate 7200.8 80GB'
|
||||
price_unit: 50.0
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom_qty: 1.0
|
||||
state: draft
|
||||
to_invoice: 1
|
||||
type: add
|
||||
fees_lines:
|
||||
- name: 'HDD1 Seagate repair fees'
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
price_unit: 50.0
|
||||
partner_id: base.res_partner_9
|
||||
product_id: product.product_product_pc1
|
||||
-
|
||||
!record {model: stock.move, id: stock.stock_move_stockmvmrp1}:
|
||||
company_id: base.main_company
|
||||
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[PC3] Medium PC'
|
||||
product_id: product.product_product_pc3
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 1.0
|
||||
-
|
||||
!record {model: mrp.repair, id: mrp_repair_rmrp0}:
|
||||
address_id: base.res_partner_address_1
|
||||
guarantee_limit: !eval datetime.today().strftime("%Y-%m-%d")
|
||||
invoice_method: 'after_repair'
|
||||
partner_invoice_id: base.res_partner_address_1
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_14
|
||||
move_id: 'stock.stock_move_stockmvmrp1'
|
||||
name: RMA-00007
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[HDD2] HDD Seagate 7200.8 120GB'
|
||||
price_unit: 50.0
|
||||
product_id: product.product_product_hdd2
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom_qty: 1.0
|
||||
state: draft
|
||||
to_invoice: 1
|
||||
type: add
|
||||
fees_lines:
|
||||
- name: 'HDD2 Seagate repair fees'
|
||||
product_id: product.product_product_hdd2
|
||||
product_uom_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
price_unit: 50.0
|
||||
partner_id: base.res_partner_9
|
||||
product_id: product.product_product_pc3
|
||||
-
|
||||
!record {model: stock.move, id: stock.stock_move_stockmvmrp2}:
|
||||
company_id: base.main_company
|
||||
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[PC4] Customizable PC'
|
||||
product_id: product.product_product_pc4
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 1.0
|
||||
-
|
||||
!record {model: mrp.repair, id: mrp_repair_rmrp2}:
|
||||
address_id: base.res_partner_address_1
|
||||
guarantee_limit: !eval datetime.today().strftime("%Y-%m-%d")
|
||||
invoice_method: 'b4repair'
|
||||
partner_invoice_id: base.res_partner_address_1
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_14
|
||||
move_id: 'stock.stock_move_stockmvmrp2'
|
||||
name: RMA-00011
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[HDD3] HDD Seagate 7200.8 160GB'
|
||||
price_unit: 50.0
|
||||
product_id: product.product_product_hdd3
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom_qty: 1.0
|
||||
state: draft
|
||||
to_invoice: 1
|
||||
type: add
|
||||
fees_lines:
|
||||
- name: 'HDD3 Seagate repair fees'
|
||||
product_id: product.product_product_hdd3
|
||||
product_uom_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
price_unit: 50.0
|
||||
partner_id: base.res_partner_9
|
||||
product_id: product.product_product_pc4
|
|
@ -1,100 +0,0 @@
|
|||
-
|
||||
In order to test repair orders I have created stock move line record.
|
||||
-
|
||||
!record {model: stock.move, id: stock_move_pcbasicpc0}:
|
||||
company_id: base.main_company
|
||||
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[PC1] Basic PC'
|
||||
product_id: product.product_product_pc1
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 1.0
|
||||
|
||||
-
|
||||
I start by creating new Repair order for "Basic PC" product and Invoice Method is "No Invoice".
|
||||
-
|
||||
!record {model: mrp.repair, id: mrp_repair_rma2}:
|
||||
address_id: base.res_partner_address_1
|
||||
guarantee_limit: !eval datetime.today().strftime("%Y-%m-%d")
|
||||
invoice_method: 'none'
|
||||
partner_invoice_id: base.res_partner_address_1
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_14
|
||||
move_id: 'stock_move_pcbasicpc0'
|
||||
name: RMA000055
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[HDD1] HDD Seagate 7200.8 80GB'
|
||||
price_unit: 50.0
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom_qty: 1.0
|
||||
state: draft
|
||||
to_invoice: 1
|
||||
type: add
|
||||
fees_lines:
|
||||
- name: 'HDD1 Seagate repair fees'
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
price_unit: 50.0
|
||||
partner_id: base.res_partner_9
|
||||
product_id: product.product_product_pc1
|
||||
-
|
||||
I confirm this Repair order.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rma2}
|
||||
-
|
||||
I Cancel this Repair order.
|
||||
-
|
||||
!python {model: mrp.repair.cancel}: |
|
||||
context = {"lang": 'en_US', "active_model":"mrp.repair", "active_ids": [ref("mrp_repair_rma2")], "tz": False, "active_id":ref('mrp_repair_rma2')}
|
||||
self.fields_view_get(cr, uid, False, "form", context)
|
||||
self.cancel_repair(cr, uid, [ref("mrp_repair_rma2")], context=context)
|
||||
-
|
||||
I check that Repair order is in "Cancel" state.
|
||||
-
|
||||
!assert {model: mrp.repair, id: mrp_repair_rma2}:
|
||||
- state == 'cancel'
|
||||
-
|
||||
I Reopen the repair order as new.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
self.action_cancel_draft(cr, uid, [ref('mrp_repair_rma2')])
|
||||
-
|
||||
I change the Invoice method of the repair order to Before repair.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
self.write(cr, uid, [ref('mrp_repair_rma2')], {'invoice_method': 'b4repair'})
|
||||
-
|
||||
I confirm the Repair order again.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rma2}
|
||||
-
|
||||
Repair order state to 'Ready'.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
self.action_repair_ready(cr, uid, [ref('mrp_repair_rma2')], context=None)
|
||||
-
|
||||
I click on "Create Invoice" button of this wizard to make invoice.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_invoice_create, ref: mrp_repair_rma2}
|
||||
-
|
||||
I check that Invoice is created for this repair order.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma2')], context=context)[0]
|
||||
assert repair_id.invoice_id.id, _("No invoice exists for this repair order.")
|
||||
-
|
||||
I start the repairing process by click on "Start Repair" Button.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_start, ref: mrp_repair_rma2}
|
||||
-
|
||||
Repairing Process for product is Done and I End Repair process by click on "End Repair" button For Invoice Type b4repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rma2}
|
||||
|
|
@ -3,6 +3,6 @@
|
|||
-
|
||||
!python {model: mrp.repair}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.repair.order').create(cr, uid, [ref('mrp_repair.mrp_repair_rma0')], {}, {})
|
||||
(data, format) = netsvc.LocalService('report.repair.order').create(cr, uid, [ref('mrp_repair.mrp_repair_rmrp0')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'mrp_repair-order_report.'+format), 'wb+').write(data)
|
||||
|
|
|
@ -1,118 +0,0 @@
|
|||
-
|
||||
In order to test "mrp_repair" module, I start with creating repair order, confirm it, and start repair.
|
||||
-
|
||||
Given that I have already stock move line created.
|
||||
-
|
||||
!record {model: stock.move, id: stock_move_pcbasicpc0}:
|
||||
company_id: base.main_company
|
||||
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[PC1] Basic PC'
|
||||
product_id: product.product_product_pc1
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 1.0
|
||||
|
||||
-
|
||||
I start by creating new Repair order for "Basic PC" product.
|
||||
-
|
||||
!record {model: mrp.repair, id: mrp_repair_rma0}:
|
||||
address_id: base.res_partner_address_1
|
||||
guarantee_limit: !eval datetime.today().strftime("%Y-%m-%d")
|
||||
invoice_method: 'after_repair'
|
||||
partner_invoice_id: base.res_partner_address_1
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_14
|
||||
move_id: 'stock_move_pcbasicpc0'
|
||||
name: RMA00004
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[HDD1] HDD Seagate 7200.8 80GB'
|
||||
price_unit: 50.0
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom_qty: 1.0
|
||||
state: draft
|
||||
to_invoice: 1
|
||||
type: add
|
||||
fees_lines:
|
||||
- name: 'HDD1 Seagate repair fees'
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
price_unit: 50.0
|
||||
partner_id: base.res_partner_9
|
||||
product_id: product.product_product_pc1
|
||||
-
|
||||
On change of product sets some values
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
self.onchange_product_id(cr, uid, [ref('mrp_repair_rma0')], product_id=False)
|
||||
-
|
||||
On change of move id sets values of guarantee limit, source location, destination location, partner and partner address.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
|
||||
self.onchange_move_id(cr, uid, [ref('mrp_repair_rma0')], False, repair_id.move_id)
|
||||
-
|
||||
On change of operation type it sets source location, destination location and to invoice field
|
||||
-
|
||||
!python {model: mrp.repair.line}: |
|
||||
self.onchange_operation_type(cr, uid, [ref('mrp_repair_rma0')], type, False, ref('base.main_company'), {})
|
||||
-
|
||||
On change of partner sets the values of partner address, partner invoice address and pricelist.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
|
||||
self.onchange_partner_id(cr, uid, [ref('mrp_repair_rma0')], False, repair_id.address_id)
|
||||
-
|
||||
On change of production lot sets the values of source location, destination location, move and guarantee limit
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
|
||||
self.onchange_lot_id(cr, uid, [ref('mrp_repair_rma0')], False, repair_id.product_id)
|
||||
-
|
||||
I check that Repair order is in "Draft" state.
|
||||
-
|
||||
!assert {model: mrp.repair, id: mrp_repair_rma0}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I confirm This Repair order.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rma0}
|
||||
|
||||
-
|
||||
I start the repairing process by click on "Start Repair" Button For Invoice Type After repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rma0}
|
||||
|
||||
-
|
||||
I check that state is "Under Repair".
|
||||
-
|
||||
!assert {model: mrp.repair, id: mrp_repair_rma0}:
|
||||
- state == 'under_repair'
|
||||
-
|
||||
Repairing Process for product is Done and I End Repair process by click on "End Repair" button.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rma0}
|
||||
|
||||
-
|
||||
I select invoiced after repair option in this "RMA00004" Repair order.
|
||||
so I create Invoice by click on "Make Invoice" wizard.
|
||||
-
|
||||
!record {model: mrp.repair.make_invoice, id: mrp_repair_make_invoice_0}:
|
||||
group: 1
|
||||
-
|
||||
I click on "Create Invoice" button of this wizard to make invoice.
|
||||
-
|
||||
!python {model: mrp.repair.make_invoice}: |
|
||||
self.make_invoices(cr, uid, [ref("mrp_repair_make_invoice_0")], {"active_ids": [ref("mrp_repair.mrp_repair_rma0")]})
|
||||
-
|
||||
I check that Invoice is created for this repair order.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
|
||||
assert repair_id.invoice_id.id, _("No invoice exists for this repair order")
|
|
@ -0,0 +1,36 @@
|
|||
-
|
||||
In order to test invoice type after repair.
|
||||
-
|
||||
I Confirm Repair order For Invoice Type After repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rmrp0}
|
||||
-
|
||||
I start the repairing process by click on "Start Repair" Button For Invoice Type After repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rmrp0}
|
||||
-
|
||||
I check that state is "Under Repair".
|
||||
-
|
||||
!assert {model: mrp.repair, id: mrp_repair_rmrp0}:
|
||||
- state == 'under_repair'
|
||||
-
|
||||
Repairing Process for product is Done and I End Repair process by click on "End Repair" button.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rmrp0}
|
||||
-
|
||||
I define invoiced after repair option in this Repair order.
|
||||
so I create Invoice by click on "Make Invoice" wizard.
|
||||
-
|
||||
!record {model: mrp.repair.make_invoice, id: mrp_repair_make_invoice_0}:
|
||||
group: 1
|
||||
-
|
||||
I click on "Create Invoice" button of this wizard to make invoice.
|
||||
-
|
||||
!python {model: mrp.repair.make_invoice}: |
|
||||
self.make_invoices(cr, uid, [ref("mrp_repair_make_invoice_0")], {"active_ids": [ref("mrp_repair.mrp_repair_rmrp0")]})
|
||||
-
|
||||
I check that Invoice is created for this repair order.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rmrp0')], context=context)[0]
|
||||
assert repair_id.invoice_id.id, _("No invoice exists for this repair order")
|
|
@ -0,0 +1,29 @@
|
|||
-
|
||||
Now test invoice type before repair.
|
||||
-
|
||||
I Confirm Repair order For Invoice Type Before Repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rmrp2}
|
||||
-
|
||||
Repair order state to 'Ready'.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
self.action_repair_ready(cr, uid, [ref('mrp_repair_rmrp2')], context=None)
|
||||
-
|
||||
I click on "Create Invoice" button of this wizard to make invoice.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_invoice_create, ref: mrp_repair_rmrp2}
|
||||
-
|
||||
I check that Invoice is created for this repair order.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rmrp2')], context=context)[0]
|
||||
assert repair_id.invoice_id.id, _("No invoice exists for this repair order.")
|
||||
-
|
||||
I start the repairing process by click on "Start Repair" Button.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_start, ref: mrp_repair_rmrp2}
|
||||
-
|
||||
Repairing Process for product is Done and I End Repair process by click on "End Repair" button For Invoice Type before repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rmrp2}
|
|
@ -0,0 +1,28 @@
|
|||
-
|
||||
In order to test the cancel flow of mrp_repair module,
|
||||
I start by creating new copy Repair order for "Basic PC" product.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
copy_id = self.copy(cr, uid, ref("mrp_repair_rmrp1"))
|
||||
context.update({'new_id':copy_id})
|
||||
-
|
||||
I Cancel this Repair order.
|
||||
-
|
||||
!python {model: mrp.repair.cancel}: |
|
||||
new_id = context.get('new_id')
|
||||
context.update({"active_model":"mrp.repair", "active_ids": [new_id],"active_id": new_id})
|
||||
self.fields_view_get(cr, uid, False, "form", context)
|
||||
self.cancel_repair(cr, uid, [new_id], context)
|
||||
-
|
||||
I check that Repair order is in "Cancel" state.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
new_id = context.get('new_id')
|
||||
order = self.browse(cr, uid, [new_id])[0]
|
||||
assert order.state == 'cancel',"Repair order should be in Cancel state."
|
||||
-
|
||||
I Reopen the repair order as new.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
new_id = context.get('new_id')
|
||||
self.action_cancel_draft(cr, uid, [new_id])
|
|
@ -0,0 +1,27 @@
|
|||
-
|
||||
In order to test "mrp_repair" module, I start from confirm it, and start repair.
|
||||
-
|
||||
I Confirm Repair order for Invoice Type 'None'.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rmrp1}
|
||||
-
|
||||
I start the repairing process by click on "Start Repair" Button For Invoice Type None.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rmrp1}
|
||||
-
|
||||
I check that state is "Under Repair".
|
||||
-
|
||||
!assert {model: mrp.repair, id: mrp_repair_rmrp1}:
|
||||
- state == 'under_repair'
|
||||
-
|
||||
Repairing Process for product is Done and I End Repair process by click on "End Repair" button.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rmrp1}
|
||||
-
|
||||
I define invoiced none option in this Repair order.
|
||||
So, I check that Invoice should not be created for this repair order.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rmrp1')], context=context)[0]
|
||||
assert not repair_id.invoice_id.id, _("Invoice should not be exists for this repair order")
|
||||
|
|
@ -1,149 +1,60 @@
|
|||
-
|
||||
In order to test mrp_subproduct with OpenERP, I create a bill of material with subproducts.
|
||||
In order to test mrp_subproduct with OpenERP, I add subproduct in bill of material.
|
||||
I make a production order, confirm it so stock moves for subproducts are generated.
|
||||
-
|
||||
I create a record for the product Chair.
|
||||
I add a sub product in Bill of material for product Cabinet.
|
||||
-
|
||||
!record {model: product.product, id: product_product_woodenchair0}:
|
||||
categ_id: product.cat1
|
||||
name: Wooden Chair
|
||||
procure_method: make_to_stock
|
||||
supply_method: produce
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
property_stock_inventory: stock.location_inventory
|
||||
property_stock_procurement: stock.location_procurement
|
||||
property_stock_production: stock.location_production
|
||||
-
|
||||
I create a record for the product Wood.
|
||||
-
|
||||
!record {model: product.product, id: product_product_wood0}:
|
||||
categ_id: product.cat1
|
||||
name: Wood
|
||||
procure_method: make_to_order
|
||||
supply_method: buy
|
||||
property_stock_inventory: stock.location_inventory
|
||||
property_stock_procurement: stock.location_procurement
|
||||
property_stock_production: stock.location_production
|
||||
seller_ids:
|
||||
- delay: 1
|
||||
name: base.res_partner_maxtor
|
||||
min_qty: 300.0
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
-
|
||||
I create a record for the product Nails.
|
||||
-
|
||||
!record {model: product.product, id: product_product_nails0}:
|
||||
categ_id: product.cat1
|
||||
name: Nails
|
||||
procure_method: make_to_order
|
||||
supply_method: buy
|
||||
property_stock_inventory: stock.location_inventory
|
||||
property_stock_procurement: stock.location_procurement
|
||||
property_stock_production: stock.location_production
|
||||
seller_ids:
|
||||
- delay: 1
|
||||
name: base.res_partner_asus
|
||||
min_qty: 500.0
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
-
|
||||
I create a record for the product Table.
|
||||
-
|
||||
!record {model: product.product, id: product_product_woodentable0}:
|
||||
categ_id: product.cat1
|
||||
name: Wooden Table
|
||||
procure_method: make_to_stock
|
||||
supply_method: produce
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
property_stock_inventory: stock.location_inventory
|
||||
property_stock_procurement: stock.location_procurement
|
||||
property_stock_production: stock.location_production
|
||||
-
|
||||
Now I create a bill of material for the product Wooden Chair.
|
||||
-
|
||||
!record {model: mrp.bom, id: mrp_bom_woodenchair0}:
|
||||
company_id: base.main_company
|
||||
name: Wooden Chair
|
||||
product_efficiency: 1.0
|
||||
product_id: product_product_woodenchair0
|
||||
product_qty: 1.0
|
||||
!record {model: mrp.bom, id: mrp_bom_arm1}:
|
||||
product_id: product.product_product_arm
|
||||
name: ARM100 + Subproduct
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 0.0
|
||||
type: normal
|
||||
bom_lines:
|
||||
- company_id: base.main_company
|
||||
name: Wood
|
||||
product_efficiency: 1.0
|
||||
product_id: product_product_wood0
|
||||
product_qty: 10.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 0.0
|
||||
sequence: 0.0
|
||||
type: normal
|
||||
- company_id: base.main_company
|
||||
name: Nails
|
||||
product_efficiency: 1.0
|
||||
product_id: product_product_nails0
|
||||
product_qty: 35.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 0.0
|
||||
sequence: 0.0
|
||||
type: normal
|
||||
sub_products:
|
||||
- product_id: product_product_woodentable0
|
||||
- product_id: product.product_product_woodentable0
|
||||
product_uom: product.product_uom_unit
|
||||
product_qty: 1.0
|
||||
product_qty: 2.0
|
||||
subproduct_type: fixed
|
||||
-
|
||||
I create a production order for Wooden Chair.
|
||||
I create a production order for Cabinet.
|
||||
-
|
||||
!record {model: mrp.production, id: mrp_production_mo0}:
|
||||
bom_id: mrp_bom_woodenchair0
|
||||
date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
location_dest_id: stock.stock_location_stock
|
||||
location_src_id: stock.stock_location_stock
|
||||
product_id: product_product_woodenchair0
|
||||
product_id: product.product_product_arm
|
||||
product_qty: 10.0
|
||||
product_uos_qty: 0.0
|
||||
product_uom: product.product_uom_unit
|
||||
bom_id: mrp_bom_arm1
|
||||
location_src_id: stock.stock_location_stock
|
||||
-
|
||||
I compute the data of production order.
|
||||
-
|
||||
!python {model: mrp.production}: |
|
||||
self.action_compute(cr, uid, [ref("mrp_production_mo0")], {"lang": "en_US", "tz": False, "search_default_Current":
|
||||
1, "active_model": "ir.ui.menu", "active_ids": [ref("mrp.menu_mrp_production_action")],
|
||||
"active_id": ref("mrp.menu_mrp_production_action"), })
|
||||
self.action_compute(cr, uid, [ref("mrp_production_mo0")], {"active_ids": [ref("mrp_production_mo0")],"active_id": ref("mrp_production_mo0")})
|
||||
-
|
||||
I confirm the production order.
|
||||
-
|
||||
!workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo0}
|
||||
!python {model: mrp.production}: |
|
||||
self.action_confirm(cr, uid, [ref('mrp_production_mo0')])
|
||||
-
|
||||
I check production order state.
|
||||
-
|
||||
!assert {model: mrp.production, id: mrp_production_mo0, severity: error, string: Production order should be in state confirmed}:
|
||||
- state == 'confirmed'
|
||||
-
|
||||
Now I check the stock moves for the subproduct I created in the bill of material.
|
||||
This move is created automatically when I confirmed the production order.
|
||||
-
|
||||
!python {model: stock.move}: |
|
||||
move_id = self.search(cr, uid, [('product_id','=',ref('product_product_woodentable0'))])
|
||||
assert move_id, 'No moves are created !'
|
||||
move_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_woodentable0'))])
|
||||
assert move_ids, 'No moves are created !'
|
||||
-
|
||||
I want to start the production so I force the reservation of products.
|
||||
-
|
||||
!python {model: mrp.production}: |
|
||||
self.force_production(cr, uid, [ref("mrp_production_mo0")], {"lang": "en_US", "tz": False,
|
||||
"search_default_Current": 1, "active_model": "ir.ui.menu", "active_ids":
|
||||
[ref("mrp.menu_mrp_production_action")], "active_id": ref("mrp.menu_mrp_production_action"),
|
||||
})
|
||||
self.force_production(cr, uid, [ref("mrp_production_mo0")], {"active_ids":[ref("mrp.menu_mrp_production_action")], "active_id": ref("mrp.menu_mrp_production_action"),})
|
||||
-
|
||||
I start the production.
|
||||
-
|
||||
!workflow {model: mrp.production, action: button_produce, ref: mrp_production_mo0}
|
||||
-
|
||||
I consume and produce the Production of products.
|
||||
I consume and produce the production of products.
|
||||
-
|
||||
I create record for selecting mode and quantity of products to produce.
|
||||
-
|
||||
|
@ -154,13 +65,11 @@
|
|||
I finish the production order.
|
||||
-
|
||||
!python {model: mrp.product.produce}: |
|
||||
self.do_produce(cr, uid, [ref("mrp_product_produce0")], {"lang": "en_US", "tz":
|
||||
False, "search_default_Current": 1, "active_model": "mrp.production", "active_ids":
|
||||
[ref("mrp_production_mo0")], "active_id": ref("mrp_production_mo0"), })
|
||||
self.do_produce(cr, uid, [ref("mrp_product_produce0")], {"active_model": "mrp.production", "active_ids":[ref("mrp_production_mo0")], "active_id": ref("mrp_production_mo0")})
|
||||
-
|
||||
I see that stock moves of Wood and Nails including Wooden Table are done now.
|
||||
I see that stock moves of Cabinet including Wooden Table are done now.
|
||||
-
|
||||
!python {model: stock.move}: |
|
||||
move_ids = self.search(cr, uid, [('product_id','in',[ref("product_product_woodentable0"),ref("product_product_wood0"),ref("product_product_nails0")])])
|
||||
move_ids = self.search(cr, uid, [('product_id','in',[ref("product.product_product_arm"),ref("product.product_product_sidepanel0")])])
|
||||
moves = self.browse(cr, uid, move_ids)
|
||||
assert all(move.state == 'done' for move in moves), 'Moves are not done!'
|
||||
|
|
|
@ -453,12 +453,9 @@ class pos_order(osv.osv):
|
|||
|
||||
# Search for the income account
|
||||
if line.product_id.property_account_income.id:
|
||||
income_account = line.\
|
||||
product_id.property_account_income.id
|
||||
elif line.product_id.categ_id.\
|
||||
property_account_income_categ.id:
|
||||
income_account = line.product_id.categ_id.\
|
||||
property_account_income_categ.id
|
||||
income_account = line.product_id.property_account_income.id
|
||||
elif line.product_id.categ_id.property_account_income_categ.id:
|
||||
income_account = line.product_id.categ_id.property_account_income_categ.id
|
||||
else:
|
||||
raise osv.except_osv(_('Error !'), _('There is no income '\
|
||||
'account defined for this product: "%s" (id:%d)') \
|
||||
|
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 7.4 KiB |
|
@ -100,7 +100,8 @@ class pos_box_entries(osv.osv_memory):
|
|||
if not statement_id:
|
||||
raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox'))
|
||||
|
||||
acc_id = product_obj.browse(cr, uid, int(data['product_id'])).property_account_income
|
||||
product = product_obj.browse(cr, uid, int(data['product_id']))
|
||||
acc_id = product.property_account_income or product.categ_id.property_account_income_categ
|
||||
if not acc_id:
|
||||
raise osv.except_osv(_('Error !'), _('Please check that income account is set to %s')%(product_obj.browse(cr, uid, data['product_id']).name))
|
||||
if statement_id:
|
||||
|
|
|
@ -82,7 +82,7 @@ class pos_box_out(osv.osv_memory):
|
|||
stat_done = statement_obj.browse(cr, uid, done_statmt, context=context)
|
||||
am = 0.0
|
||||
product = product_obj.browse(cr, uid, data['product_id'], context=context)
|
||||
acc_id = product.property_account_income or product.categ_id.property_account_income_categ
|
||||
acc_id = product.property_account_expense or product.categ_id.property_account_expense_categ
|
||||
if not acc_id:
|
||||
raise osv.except_osv(_('Error !'), _('please check that account is set to %s')%(product.name))
|
||||
if not statement_ids:
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="share.share_step1_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/field[@name='user_type']" position="attributes">
|
||||
<attribute name='invisible'>0</attribute>
|
||||
<attribute name='colspan'>4</attribute>
|
||||
</xpath>
|
||||
<xpath expr="/form/group[@name='emails_group']" position="after">
|
||||
<group name="user_group" colspan="4" attrs="{'invisible':[('user_type','!=','existing')]}">
|
||||
<field colspan="4" nolabel="1" name="user_ids" mode="tree">
|
||||
|
@ -33,13 +37,13 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="share.share_step2_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/field[@name='result_line_ids']/tree/field[@name='login']" position="after">
|
||||
<xpath expr="/form/group/field[@name='result_line_ids']/tree/field[@name='login']" position="after">
|
||||
<field name="share_url" groups="portal.group_portal_manager"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/field[@name='result_line_ids']/form/field[@name='login']" position="after">
|
||||
<xpath expr="/form/group/field[@name='result_line_ids']/form/field[@name='login']" position="after">
|
||||
<field name="share_url" colspan="4" groups="portal.group_portal_manager"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/field[@name='result_line_ids']" position="after">
|
||||
<xpath expr="/form/group/field[@name='result_line_ids']" position="after">
|
||||
<field colspan="4" name="share_root_url" groups="portal.group_portal_manager"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
|
@ -87,8 +87,8 @@ class procurement_order(osv.osv):
|
|||
'origin': fields.char('Source Document', size=64,
|
||||
help="Reference of the document that created this Procurement.\n"
|
||||
"This is automatically completed by OpenERP."),
|
||||
'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', required=True),
|
||||
'date_planned': fields.datetime('Scheduled date', required=True),
|
||||
'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', required=True, select=True),
|
||||
'date_planned': fields.datetime('Scheduled date', required=True, select=True),
|
||||
'date_close': fields.datetime('Date Closed'),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, states={'draft':[('readonly',False)]}, readonly=True),
|
||||
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM'), required=True, states={'draft':[('readonly',False)]}, readonly=True),
|
||||
|
|
|
@ -212,11 +212,11 @@ class product_category(osv.osv):
|
|||
_name = "product.category"
|
||||
_description = "Product Category"
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64, required=True, translate=True),
|
||||
'name': fields.char('Name', size=64, required=True, translate=True, select=True),
|
||||
'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
|
||||
'parent_id': fields.many2one('product.category','Parent Category', select=True),
|
||||
'child_id': fields.one2many('product.category', 'parent_id', string='Child Categories'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."),
|
||||
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of product categories."),
|
||||
'type': fields.selection([('view','View'), ('normal','Normal')], 'Category Type'),
|
||||
}
|
||||
|
||||
|
@ -494,7 +494,7 @@ class product_product(osv.osv):
|
|||
'lst_price' : fields.function(_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Sale Price')),
|
||||
'code': fields.function(_product_code, type='char', string='Reference'),
|
||||
'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),
|
||||
'default_code' : fields.char('Reference', size=64),
|
||||
'default_code' : fields.char('Reference', size=64, select=True),
|
||||
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the product without removing it."),
|
||||
'variants': fields.char('Variants', size=64),
|
||||
'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade"),
|
||||
|
@ -503,7 +503,7 @@ class product_product(osv.osv):
|
|||
'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Sale Price')),
|
||||
'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Sale Price')),
|
||||
'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
|
||||
'name_template': fields.related('product_tmpl_id', 'name', string="Name", type='char', size=128, store=True),
|
||||
'name_template': fields.related('product_tmpl_id', 'name', string="Name", type='char', size=128, store=True, select=True),
|
||||
'color': fields.integer('Color Index'),
|
||||
'product_image': fields.binary('Image'),
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
<record id="base.user_demo" model="res.users">
|
||||
<field eval="[(4, ref('base.group_sale_salesman'))]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!--
|
||||
Resource: product.category
|
||||
-->
|
||||
|
@ -414,7 +414,19 @@
|
|||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_11"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_arm" model="product.product">
|
||||
<field name="default_code">ARM100</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="list_price">450.0</field>
|
||||
<field name="standard_price">300.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="sale_delay">3.0</field>
|
||||
<field name="name">Cabinet</field>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_misc0"/>
|
||||
</record>
|
||||
<!--
|
||||
Resource: product.product NEW EVV
|
||||
-->
|
||||
|
@ -465,6 +477,19 @@
|
|||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="product_category_rawmaterial0"/>
|
||||
</record>
|
||||
<record id="product_product_woodentable0" model="product.product">
|
||||
<field name="default_code">WOODTAB</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field eval="'make_to_stock'" name="procure_method"/>
|
||||
<field name="standard_price">5.0</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="name">Wooden Table</field>
|
||||
<field eval="2" name="seller_delay"/>
|
||||
<field eval="7.0" name="sale_delay"/>
|
||||
<field name="type">product</field>
|
||||
<field name="categ_id" ref="cat1"/>
|
||||
</record>
|
||||
|
||||
<record id="product_product_woodmm10" model="product.product">
|
||||
<field name="default_code">WOOD010</field>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</group>
|
||||
<newline/>
|
||||
<group expand='0' string='Group by...' groups="base.group_extended">
|
||||
<filter string='Category' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'categ_id'}" />
|
||||
<filter string='Category' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'categ_id'}" groups="base.group_extended"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string='Default UOM' icon="terp-mrp" domain="[]" context="{'group_by' : 'uom_id'}" />
|
||||
<separator orientation="vertical"/>
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
<field name="categ_id" invisible="1"/>
|
||||
<field name="uom_id" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -580,10 +580,10 @@ class task(osv.osv):
|
|||
|
||||
_columns = {
|
||||
'active': fields.function(_is_template, store=True, string='Not a Template Task', type='boolean', help="This field is computed automatically and have the same behavior than the boolean 'active' field: if the task is linked to a template or unactivated project, it will be hidden unless specifically asked."),
|
||||
'name': fields.char('Task Summary', size=128, required=True),
|
||||
'name': fields.char('Task Summary', size=128, required=True, select=True),
|
||||
'description': fields.text('Description'),
|
||||
'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of tasks."),
|
||||
'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True),
|
||||
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."),
|
||||
'type_id': fields.many2one('project.task.type', 'Stage'),
|
||||
'state': fields.selection([('draft', 'New'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done'), ('cancelled', 'Cancelled')], 'State', readonly=True, required=True,
|
||||
help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\
|
||||
|
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 6.0 KiB |
|
@ -221,7 +221,7 @@ class project_issue(crm.crm_case, osv.osv):
|
|||
'date': fields.datetime('Date'),
|
||||
'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('object_id.model', '=', 'crm.project.bug')]"),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
|
||||
'version_id': fields.many2one('project.issue.version', 'Version'),
|
||||
'type_id': fields.many2one ('project.task.type', 'Stages', domain="[('project_ids', '=', project_id)]"),
|
||||
'project_id':fields.many2one('project.project', 'Project'),
|
||||
|
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 5.6 KiB |
|
@ -101,14 +101,14 @@ class project_phase(osv.osv):
|
|||
|
||||
_columns = {
|
||||
'name': fields.char("Name", size=64, required=True),
|
||||
'date_start': fields.datetime('Start Date', help="It's computed by the scheduler according the project date or the end date of the previous phase.", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
'date_start': fields.datetime('Start Date', select=True, help="It's computed by the scheduler according the project date or the end date of the previous phase.", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
'date_end': fields.datetime('End Date', help=" It's computed by the scheduler according to the start date and the duration.", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
'constraint_date_start': fields.datetime('Minimum Start Date', help='force the phase to start after this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
'constraint_date_end': fields.datetime('Deadline', help='force the phase to finish before this date', states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
'project_id': fields.many2one('project.project', 'Project', required=True),
|
||||
'project_id': fields.many2one('project.project', 'Project', required=True, select=True),
|
||||
'next_phase_ids': fields.many2many('project.phase', 'project_phase_rel', 'prv_phase_id', 'next_phase_id', 'Next Phases', states={'cancelled':[('readonly',True)]}),
|
||||
'previous_phase_ids': fields.many2many('project.phase', 'project_phase_rel', 'next_phase_id', 'prv_phase_id', 'Previous Phases', states={'cancelled':[('readonly',True)]}),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of phases."),
|
||||
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of phases."),
|
||||
'duration': fields.float('Duration', required=True, help="By default in days", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
'product_uom': fields.many2one('product.uom', 'Duration UoM', required=True, help="UoM (Unit of Measure) is the unit of measurement for Duration", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
'task_ids': fields.one2many('project.task', 'phase_id', "Project Tasks", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
|
||||
|
|
|
@ -57,9 +57,9 @@ product_product()
|
|||
class sale_order(osv.osv):
|
||||
_inherit ='sale.order'
|
||||
|
||||
def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, date_planned, *args):
|
||||
def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, date_planned, context=None):
|
||||
proc_data = super(sale_order, self)._prepare_order_line_procurement(cr,
|
||||
uid, order, line, move_id, date_planned, *args)
|
||||
uid, order, line, move_id, date_planned, context=context)
|
||||
proc_data['sale_line_id'] = line.id
|
||||
return proc_data
|
||||
|
||||
|
|
|
@ -196,9 +196,9 @@ class report_account_analytic_planning_line(osv.osv):
|
|||
return result
|
||||
|
||||
_columns = {
|
||||
'account_id': fields.many2one('account.analytic.account', 'Analytic account'),
|
||||
'account_id': fields.many2one('account.analytic.account', 'Analytic account', select=True),
|
||||
'planning_id': fields.many2one('report_account_analytic.planning', 'Planning', required=True, ondelete='cascade'),
|
||||
'user_id': fields.many2one('res.users', 'User'),
|
||||
'user_id': fields.many2one('res.users', 'User', select=True),
|
||||
'amount': fields.float('Quantity', required=True),
|
||||
'amount_unit': fields.many2one('product.uom', 'Qty UoM', required=True),
|
||||
'note': fields.text('Note', size=64),
|
||||
|
@ -541,8 +541,8 @@ WHERE user_id=%s and account_id=%s and date>=%s and date<=%s''', (line.user_id.i
|
|||
return result
|
||||
|
||||
_columns = {
|
||||
'planning_id': fields.many2one('report_account_analytic.planning', 'Planning'),
|
||||
'user_id': fields.many2one('res.users', 'User'),
|
||||
'planning_id': fields.many2one('report_account_analytic.planning', 'Planning', select=True),
|
||||
'user_id': fields.many2one('res.users', 'User', select=True),
|
||||
'manager_id': fields.many2one('res.users', 'Manager'),
|
||||
'account_id': fields.many2one('account.analytic.account', 'Account'),
|
||||
'sum_amount': fields.float('Planned Days', required=True),
|
||||
|
|
|
@ -181,7 +181,7 @@ class purchase_order(osv.osv):
|
|||
'invoiced': fields.function(_invoiced, string='Invoiced & Paid', type='boolean', help="It indicates that an invoice has been paid"),
|
||||
'invoiced_rate': fields.function(_invoiced_rate, string='Invoiced', type='float'),
|
||||
'invoice_method': fields.selection([('manual','Based on Purchase Order lines'),('order','Based on generated draft invoice'),('picking','Based on receptions')], 'Invoicing Control', required=True,
|
||||
help="Based on Purchase Order lines: place individual lines in 'Invoice Control > Based on P.O. lines' frow where you can selectively create an invoice.\n" \
|
||||
help="Based on Purchase Order lines: place individual lines in 'Invoice Control > Based on P.O. lines' from where you can selectively create an invoice.\n" \
|
||||
"Based on generated invoice: create a draft invoice you can validate later.\n" \
|
||||
"Based on receptions: let you create an invoice when receptions are validated."
|
||||
),
|
||||
|
@ -426,7 +426,7 @@ class purchase_order(osv.osv):
|
|||
self.log(cr, uid, id, message)
|
||||
return True
|
||||
|
||||
def _prepare_order_picking(self, cr, uid, order, *args):
|
||||
def _prepare_order_picking(self, cr, uid, order, context=None):
|
||||
return {
|
||||
'name': self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.in'),
|
||||
'origin': order.name + ((order.origin and (':' + order.origin)) or ''),
|
||||
|
@ -439,7 +439,7 @@ class purchase_order(osv.osv):
|
|||
'move_lines' : [],
|
||||
}
|
||||
|
||||
def _prepare_order_line_move(self, cr, uid, order, order_line, picking_id, *args):
|
||||
def _prepare_order_line_move(self, cr, uid, order, order_line, picking_id, context=None):
|
||||
return {
|
||||
'name': order.name + ': ' + (order_line.name or ''),
|
||||
'product_id': order_line.product_id.id,
|
||||
|
@ -460,7 +460,7 @@ class purchase_order(osv.osv):
|
|||
'price_unit': order_line.price_unit
|
||||
}
|
||||
|
||||
def _create_pickings(self, cr, uid, order, order_lines, picking_id=False, *args):
|
||||
def _create_pickings(self, cr, uid, order, order_lines, picking_id=False, context=None):
|
||||
"""Creates pickings and appropriate stock moves for given order lines, then
|
||||
confirms the moves, makes them available, and confirms the picking.
|
||||
|
||||
|
@ -480,7 +480,7 @@ class purchase_order(osv.osv):
|
|||
:return: list of IDs of pickings used/created for the given order lines (usually just one)
|
||||
"""
|
||||
if not picking_id:
|
||||
picking_id = self.pool.get('stock.picking').create(cr, uid, self._prepare_order_picking(cr, uid, order, *args))
|
||||
picking_id = self.pool.get('stock.picking').create(cr, uid, self._prepare_order_picking(cr, uid, order, context=context))
|
||||
todo_moves = []
|
||||
stock_move = self.pool.get('stock.move')
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
|
@ -488,7 +488,7 @@ class purchase_order(osv.osv):
|
|||
if not order_line.product_id:
|
||||
continue
|
||||
if order_line.product_id.type in ('product', 'consu'):
|
||||
move = stock_move.create(cr, uid, self._prepare_order_line_move(cr, uid, order, order_line, picking_id, *args))
|
||||
move = stock_move.create(cr, uid, self._prepare_order_line_move(cr, uid, order, order_line, picking_id, context=context))
|
||||
if order_line.move_dest_id:
|
||||
order_line.move_dest_id.write({'location_id': order.location_id.id})
|
||||
todo_moves.append(move)
|
||||
|
@ -497,10 +497,10 @@ class purchase_order(osv.osv):
|
|||
wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
|
||||
return [picking_id]
|
||||
|
||||
def action_picking_create(self,cr, uid, ids, *args):
|
||||
def action_picking_create(self,cr, uid, ids, context=None):
|
||||
picking_ids = []
|
||||
for order in self.browse(cr, uid, ids):
|
||||
picking_ids.extend(self._create_pickings(cr, uid, order, order.order_line, None, *args))
|
||||
picking_ids.extend(self._create_pickings(cr, uid, order, order.order_line, None, context=context))
|
||||
|
||||
# Must return one unique picking ID: the one to connect in the subflow of the purchase order.
|
||||
# In case of multiple (split) pickings, we should return the ID of the critical one, i.e. the
|
||||
|
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.7 KiB |
|
@ -260,9 +260,9 @@ class resource_calendar_attendance(osv.osv):
|
|||
|
||||
_columns = {
|
||||
'name' : fields.char("Name", size=64, required=True),
|
||||
'dayofweek': fields.selection([('0','Monday'),('1','Tuesday'),('2','Wednesday'),('3','Thursday'),('4','Friday'),('5','Saturday'),('6','Sunday')], 'Day of week', required=True),
|
||||
'dayofweek': fields.selection([('0','Monday'),('1','Tuesday'),('2','Wednesday'),('3','Thursday'),('4','Friday'),('5','Saturday'),('6','Sunday')], 'Day of week', required=True, select=True),
|
||||
'date_from' : fields.date('Starting date'),
|
||||
'hour_from' : fields.float('Work from', size=8, required=True, help="Working time will start from"),
|
||||
'hour_from' : fields.float('Work from', size=8, required=True, help="Working time will start from", select=True),
|
||||
'hour_to' : fields.float("Work to", size=8, required=True, help="Working time will end at"),
|
||||
'calendar_id' : fields.many2one("resource.calendar", "Resource's Calendar", required=True),
|
||||
}
|
||||
|
|
|
@ -685,7 +685,7 @@ class sale_order(osv.osv):
|
|||
return False
|
||||
return canceled
|
||||
|
||||
def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, date_planned, *args):
|
||||
def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, date_planned, context=None):
|
||||
return {
|
||||
'name': line.name,
|
||||
'origin': order.name,
|
||||
|
@ -700,13 +700,11 @@ class sale_order(osv.osv):
|
|||
'location_id': order.shop_id.warehouse_id.lot_stock_id.id,
|
||||
'procure_method': line.type,
|
||||
'move_id': move_id,
|
||||
# Added by mrp, but mrp is not a dependency, this will trigger a warning
|
||||
# if mrp is not installed.
|
||||
'property_ids': [(6, 0, [x.id for x in line.property_ids])],
|
||||
'company_id': order.company_id.id,
|
||||
'note': line.notes
|
||||
}
|
||||
|
||||
def _prepare_order_line_move(self, cr, uid, order, line, picking_id, date_planned, *args):
|
||||
def _prepare_order_line_move(self, cr, uid, order, line, picking_id, date_planned, context=None):
|
||||
location_id = order.shop_id.warehouse_id.lot_stock_id.id
|
||||
output_id = order.shop_id.warehouse_id.lot_output_id.id
|
||||
return {
|
||||
|
@ -733,7 +731,7 @@ class sale_order(osv.osv):
|
|||
'price_unit': line.product_id.standard_price or 0.0
|
||||
}
|
||||
|
||||
def _prepare_order_picking(self, cr, uid, order, *args):
|
||||
def _prepare_order_picking(self, cr, uid, order, context=None):
|
||||
pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out')
|
||||
return {
|
||||
'name': pick_name,
|
||||
|
@ -771,12 +769,12 @@ class sale_order(osv.osv):
|
|||
self.pool.get('procurement.order').write(cr, uid, [proc_id], {'product_qty': mov.product_qty, 'product_uos_qty': mov.product_uos_qty})
|
||||
return True
|
||||
|
||||
def _get_date_planned(self, cr, uid, order, line, start_date, *args):
|
||||
def _get_date_planned(self, cr, uid, order, line, start_date, context=None):
|
||||
date_planned = datetime.strptime(start_date, DEFAULT_SERVER_DATE_FORMAT) + relativedelta(days=line.delay or 0.0)
|
||||
date_planned = (date_planned - timedelta(days=order.company_id.security_lead)).strftime(DEFAULT_SERVER_DATETIME_FORMAT)
|
||||
return date_planned
|
||||
|
||||
def _create_pickings_and_procurements(self, cr, uid, order, order_lines, picking_id=False, *args):
|
||||
def _create_pickings_and_procurements(self, cr, uid, order, order_lines, picking_id=False, context=None):
|
||||
"""Create the required procurements to supply sale order lines, also connecting
|
||||
the procurements to appropriate stock moves in order to bring the goods to the
|
||||
sale order's requested location.
|
||||
|
@ -804,18 +802,18 @@ class sale_order(osv.osv):
|
|||
if line.state == 'done':
|
||||
continue
|
||||
|
||||
date_planned = self._get_date_planned(cr, uid, order, line, order.date_order, *args)
|
||||
date_planned = self._get_date_planned(cr, uid, order, line, order.date_order, context=context)
|
||||
|
||||
if line.product_id:
|
||||
if line.product_id.product_tmpl_id.type in ('product', 'consu'):
|
||||
if not picking_id:
|
||||
picking_id = picking_obj.create(cr, uid, self._prepare_order_picking(cr, uid, order, *args))
|
||||
move_id = move_obj.create(cr, uid, self._prepare_order_line_move(cr, uid, order, line, picking_id, date_planned, *args))
|
||||
picking_id = picking_obj.create(cr, uid, self._prepare_order_picking(cr, uid, order, context=context))
|
||||
move_id = move_obj.create(cr, uid, self._prepare_order_line_move(cr, uid, order, line, picking_id, date_planned, context=context))
|
||||
else:
|
||||
# a service has no stock move
|
||||
move_id = False
|
||||
|
||||
proc_id = procurement_obj.create(cr, uid, self._prepare_order_line_procurement(cr, uid, order, line, move_id, date_planned, *args))
|
||||
proc_id = procurement_obj.create(cr, uid, self._prepare_order_line_procurement(cr, uid, order, line, move_id, date_planned, context=context))
|
||||
proc_ids.append(proc_id)
|
||||
line.write({'procurement_id': proc_id})
|
||||
self.ship_recreate(cr, uid, order, line, move_id, proc_id)
|
||||
|
@ -840,9 +838,9 @@ class sale_order(osv.osv):
|
|||
order.write(val)
|
||||
return True
|
||||
|
||||
def action_ship_create(self, cr, uid, ids, *args):
|
||||
for order in self.browse(cr, uid, ids, context={}):
|
||||
self._create_pickings_and_procurements(cr, uid, order, order.order_line, None, *args)
|
||||
def action_ship_create(self, cr, uid, ids, context=None):
|
||||
for order in self.browse(cr, uid, ids, context=context):
|
||||
self._create_pickings_and_procurements(cr, uid, order, order.order_line, None, context=context)
|
||||
return True
|
||||
|
||||
def action_ship_end(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
</group>
|
||||
<notebook colspan="5">
|
||||
<page string="Sales Order">
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" required="1"/>
|
||||
<field name="partner_id" options='{"quick_create": false}' on_change="onchange_partner_id(partner_id)" domain="[('customer','=',True)]" context="{'search_default_customer':1}" required="1"/>
|
||||
<field domain="[('partner_id','=',partner_id)]" name="partner_order_id" on_change="onchange_partner_order_id(partner_order_id, partner_invoice_id, partner_shipping_id)"/>
|
||||
<field domain="[('partner_id','=',partner_id)]" name="partner_invoice_id" groups="base.group_extended"/>
|
||||
<field domain="[('partner_id','=',partner_id)]" name="partner_shipping_id" groups="base.group_extended"/>
|
||||
|
|
|
@ -110,18 +110,18 @@
|
|||
order = self.browse(cr, uid, ref("order"))
|
||||
assert order.invoice_ids, "Invoice is not created."
|
||||
ac = order.partner_id.property_account_receivable.id
|
||||
journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'sale'), ('company_id', '=', order.company_id.id)], limit=1)
|
||||
journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'sale'), ('company_id', '=', order.company_id.id)])
|
||||
for invoice in order.invoice_ids:
|
||||
assert invoice.type == 'out_invoice',"Invoice should be Customer Invoice."
|
||||
assert invoice.account_id.id == ac,"Invoice account is not correspond."
|
||||
assert invoice.reference == order.client_order_ref or order.name,"Reference is not correspond."
|
||||
assert invoice.partner_id.id == order.partner_id.id,"Customer is not correspond."
|
||||
assert invoice.address_invoice_id.id == order.partner_invoice_id.id,"Invoice Address is not correspond."
|
||||
assert invoice.currency_id.id == order.pricelist_id.currency_id.id, "Currency is not correspond."
|
||||
assert invoice.comment == order.note or '',"Note is not correspond."
|
||||
assert invoice.journal_id.id == journal_ids[0],"Sales Journal is not link on Invoice."
|
||||
assert invoice.payment_term.id == order.payment_term.id, "Payment term is not correspond."
|
||||
for so_line in order.order_line:
|
||||
assert invoice.type == 'out_invoice',"Invoice should be Customer Invoice."
|
||||
assert invoice.account_id.id == ac,"Invoice account is not correspond."
|
||||
assert invoice.reference == order.client_order_ref or order.name,"Reference is not correspond."
|
||||
assert invoice.partner_id.id == order.partner_id.id,"Customer is not correspond."
|
||||
assert invoice.address_invoice_id.id == order.partner_invoice_id.id,"Invoice Address is not correspond."
|
||||
assert invoice.currency_id.id == order.pricelist_id.currency_id.id, "Currency is not correspond."
|
||||
assert invoice.comment == order.note or '',"Note is not correspond."
|
||||
assert invoice.journal_id.id in journal_ids,"Sales Journal is not link on Invoice."
|
||||
assert invoice.payment_term.id == order.payment_term.id, "Payment term is not correspond."
|
||||
for so_line in order.order_line:
|
||||
inv_line = so_line.invoice_lines[0]
|
||||
ac = so_line.product_id.product_tmpl_id.property_account_income.id or so_line.product_id.categ_id.property_account_income_categ.id
|
||||
assert inv_line.product_id.id == so_line.product_id.id or False,"Product is not correspond"
|
||||
|
|
|
@ -66,14 +66,10 @@ class sale(osv.osv):
|
|||
_columns = {
|
||||
'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoice Type')
|
||||
}
|
||||
def action_ship_create(self, cr, uid, ids, *args):
|
||||
result = super(sale, self).action_ship_create(cr, uid, ids, *args)
|
||||
obj_stock_pick = self.pool.get('stock.picking')
|
||||
for order in self.browse(cr, uid, ids, context={}):
|
||||
pids = [ x.id for x in order.picking_ids]
|
||||
self.pool.get('stock.picking').write(cr, uid, pids, {
|
||||
'invoice_type_id': order.invoice_type_id and order.invoice_type_id.id or False,
|
||||
})
|
||||
|
||||
def _prepare_order_picking(self, cr, uid, order, context=None):
|
||||
result = super(sale,self)._prepare_order_picking(cr, uid, order, context=context)
|
||||
result.update(invoice_type_id=order.invoice_type_id and order.invoice_type_id.id or False)
|
||||
return result
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, part):
|
||||
|
|
|
@ -118,7 +118,7 @@ class sale_order_line(osv.osv):
|
|||
('line', 'Separator Line'),
|
||||
('break', 'Page Break'),]
|
||||
,'Line Type', select=True, required=True),
|
||||
'sequence': fields.integer('Line Sequence'),
|
||||
'sequence': fields.integer('Line Sequence', select=True),
|
||||
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'product_uom_qty': fields.float('Quantity (UoM)', digits=(16,2)),
|
||||
'product_uom': fields.many2one('product.uom', 'Product UoM'),
|
||||
|
|
|
@ -8,20 +8,20 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2011-01-11 11:16+0000\n"
|
||||
"PO-Revision-Date: 2011-12-08 17:51+0000\n"
|
||||
"PO-Revision-Date: 2011-12-21 15:07+0000\n"
|
||||
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
|
||||
"Language-Team: Croatian <hr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2011-12-09 04:46+0000\n"
|
||||
"X-Generator: Launchpad (build 14450)\n"
|
||||
"X-Launchpad-Export-Date: 2011-12-22 05:27+0000\n"
|
||||
"X-Generator: Launchpad (build 14560)\n"
|
||||
|
||||
#. module: share
|
||||
#: code:addons/share/web/editors.py:15
|
||||
#, python-format
|
||||
msgid "Sharing"
|
||||
msgstr ""
|
||||
msgstr "Dijeljenje"
|
||||
|
||||
#. module: share
|
||||
#: code:addons/share/wizard/share_wizard.py:462
|
||||
|
@ -160,7 +160,7 @@ msgstr ""
|
|||
#: field:share.wizard.result.line,login:0
|
||||
#, python-format
|
||||
msgid "Username"
|
||||
msgstr ""
|
||||
msgstr "Korisničko ime"
|
||||
|
||||
#. module: share
|
||||
#: field:res.users,share:0
|
||||
|
@ -176,13 +176,13 @@ msgstr ""
|
|||
#. module: share
|
||||
#: view:share.wizard:0
|
||||
msgid "Finish"
|
||||
msgstr ""
|
||||
msgstr "Kraj"
|
||||
|
||||
#. module: share
|
||||
#: field:share.wizard,user_ids:0
|
||||
#: field:share.wizard.user,user_id:0
|
||||
msgid "Users"
|
||||
msgstr ""
|
||||
msgstr "Korisnici"
|
||||
|
||||
#. module: share
|
||||
#: code:addons/share/wizard/share_wizard.py:103
|
||||
|
@ -196,7 +196,7 @@ msgstr ""
|
|||
#. module: share
|
||||
#: field:share.wizard,new_users:0
|
||||
msgid "New users"
|
||||
msgstr ""
|
||||
msgstr "Novi korisnici"
|
||||
|
||||
#. module: share
|
||||
#: model:ir.model,name:share.model_res_groups
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
openerp.share = function(instance) {
|
||||
|
||||
function launch_wizard(self, view, button) {
|
||||
var button = button || 'go_step_1';
|
||||
function launch_wizard(self, view, user_type) {
|
||||
var action = view.widget_parent.action;
|
||||
var Share = new instance.web.DataSet(self, 'share.wizard', view.dataset.get_context());
|
||||
var domain = new instance.web.CompoundDomain(view.dataset.domain);
|
||||
|
@ -17,10 +16,11 @@ function launch_wizard(self, view, button) {
|
|||
name: action.name,
|
||||
domain: result.domain,
|
||||
action_id: action.id,
|
||||
user_type: user_type || 'embedded',
|
||||
view_type: view.fields_view.type,
|
||||
}, function(result) {
|
||||
var share_id = result.result;
|
||||
var step1 = Share.call(button, [[share_id],], function(result) {
|
||||
var step1 = Share.call('go_step_1', [[share_id],], function(result) {
|
||||
var action = result;
|
||||
self.do_action(action);
|
||||
});
|
||||
|
@ -53,11 +53,11 @@ instance.web.ViewManagerAction.include({
|
|||
},
|
||||
on_click_share_link: function(e) {
|
||||
e.preventDefault();
|
||||
launch_wizard(this, this.views[this.active_view].controller,'go_step_1_link');
|
||||
launch_wizard(this, this.views[this.active_view].controller);
|
||||
},
|
||||
on_click_share: function(e) {
|
||||
e.preventDefault();
|
||||
launch_wizard(this, this.views[this.active_view].controller);
|
||||
launch_wizard(this, this.views[this.active_view].controller, 'emails');
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ class share_wizard(osv.osv_memory):
|
|||
'embed_url': fields.function(_embed_url, string='Share URL', type='char', size=512, readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'view_type': 'tree',
|
||||
'view_type': 'page',
|
||||
'user_type' : 'embedded',
|
||||
'domain': lambda self, cr, uid, context, *a: context.get('domain', '[]'),
|
||||
'action_id': lambda self, cr, uid, context, *a: context.get('action_id'),
|
||||
|
@ -198,33 +198,12 @@ class share_wizard(osv.osv_memory):
|
|||
'embed_option_search': True,
|
||||
}
|
||||
|
||||
def go_step_1_link(self, cr, uid, ids, context=None):
|
||||
dummy, step1_form_view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'share', 'share_step1_form_link')
|
||||
return {
|
||||
'name': _('Link or embed your documents'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'share.wizard',
|
||||
'view_id': False,
|
||||
'res_id': ids[0],
|
||||
'views': [(step1_form_view_id, 'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new'
|
||||
}
|
||||
|
||||
def go_step_1(self, cr, uid, ids, context=None):
|
||||
dummy, step1_form_view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'share', 'share_step1_form')
|
||||
return {
|
||||
'name': _('Share your documents by email'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'share.wizard',
|
||||
'view_id': False,
|
||||
'res_id': ids[0],
|
||||
'views': [(step1_form_view_id, 'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new'
|
||||
}
|
||||
model, res_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'share', 'action_share_wizard_step1')
|
||||
action = self.pool.get(model).read(cr, uid, res_id, context=context)
|
||||
action['res_id'] = ids[0]
|
||||
action.pop('context', '')
|
||||
return action
|
||||
|
||||
def _create_share_group(self, cr, uid, wizard_data, context=None):
|
||||
group_obj = self.pool.get('res.groups')
|
||||
|
|
|
@ -23,39 +23,18 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="share_step1_form_link" model="ir.ui.view">
|
||||
<field name="name">share.step1.form.link</field>
|
||||
<field name="model">share.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Link or embed your documents">
|
||||
<field name="user_type" invisible="1"/>
|
||||
<separator colspan="4" string="Sharing Options"/>
|
||||
<group colspan="4" col="4">
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="access_mode" colspan="4"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="go_step_2" string="Share" colspan="1" type="object" icon="gtk-go-forward"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="share_step1_form" model="ir.ui.view">
|
||||
<field name="name">share.step1.form</field>
|
||||
<field name="model">share.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Share by email your documents">
|
||||
<form>
|
||||
<field name="user_type" invisible="1"/>
|
||||
<group colspan="4" name="emails_group">
|
||||
<group colspan="4" name="emails_group" attrs="{'invisible':[('user_type', '!=', 'emails')]}">
|
||||
<separator colspan="4" string="Share with these people (one e-mail per line)"/>
|
||||
<field colspan="4" nolabel="1" name="new_users" attrs="{'required':[('user_type','=','emails')]}"/>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="4" col="4" attrs="{'invisible':[('user_type', '=', 'embedded')]}">
|
||||
<separator colspan="4" string="Optional: include a personal message"/>
|
||||
<field name="message" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
|
@ -131,25 +110,15 @@
|
|||
- 'domain' (string expression for full domain to apply as sent to server,
|
||||
with dynamic data like 'uid' replaced by actual value (i.e. after eval)!)
|
||||
-->
|
||||
<record id="action_share_wizard_step1_link" model="ir.actions.act_window">
|
||||
<field name="name">Share Wizard</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">share.wizard</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="share_step1_form_link"/>
|
||||
<field name="target">new</field>
|
||||
<field name="context">{'default_user_type':'embedded'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_share_wizard_step1" model="ir.actions.act_window">
|
||||
<field name="name">Share Wizard</field>
|
||||
<field name="name">Share your documents</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">share.wizard</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="share_step1_form"/>
|
||||
<field name="target">new</field>
|
||||
<field name="context">False</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 5.4 KiB |
|
@ -1359,6 +1359,17 @@ class stock_production_lot(osv.osv):
|
|||
name = '%s [%s]' % (name, record['ref'])
|
||||
res.append((record['id'], name))
|
||||
return res
|
||||
|
||||
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
|
||||
args = args or []
|
||||
ids = []
|
||||
if name:
|
||||
ids = self.search(cr, uid, [('prefix', '=', name)] + args, limit=limit, context=context)
|
||||
if not ids:
|
||||
ids = self.search(cr, uid, [('name', operator, name)] + args, limit=limit, context=context)
|
||||
else:
|
||||
ids = self.search(cr, uid, args, limit=limit, context=context)
|
||||
return self.name_get(cr, uid, ids, context)
|
||||
|
||||
_name = 'stock.production.lot'
|
||||
_description = 'Production lot'
|
||||
|
|