[MERGE] merged team 1 branch

bzr revid: qdp-launchpad@tinyerp.com-20101011123545-gg4wrk09f7a1ha42
This commit is contained in:
qdp-launchpad@tinyerp.com 2010-10-11 14:35:45 +02:00
commit 6ed687841e
119 changed files with 235 additions and 486 deletions

View File

@ -62,7 +62,6 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
def _get_lines(self, form):
res = []
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
self.cr.execute('SELECT DISTINCT res_partner.id AS id,\
res_partner.name AS name \
FROM res_partner,account_move_line AS l, account_account\
@ -219,7 +218,6 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
def _get_lines_with_out_partner(self, form):
res = []
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
move_state = ['draft','posted']
if self.target_move == 'posted':
move_state = ['posted']

View File

@ -190,7 +190,6 @@ class tax_report(rml_parse.rml_parse):
bcl_rup_ind = ind - 1
while (bcl_current_level >= int(accounts[bcl_rup_ind]['level']) and bcl_rup_ind >= 0 ):
tot_elem = copy.copy(accounts[bcl_rup_ind], context=context)
res_tot = { 'code': accounts[bcl_rup_ind]['code'],
'name': '',
'debit': 0,

View File

@ -19,8 +19,7 @@
#
##############################################################################
import netsvc
from osv import fields, osv
from osv import osv
from tools.translate import _
class invoice(osv.osv):

View File

@ -42,6 +42,7 @@
'depends': ['base', 'account', 'hr_attendance'],
'init_xml': ['auction_sequence.xml', 'auction_data.xml'],
'update_xml': [
'security/auction_security.xml',
'security/ir.model.access.csv',
'wizard/auction_lots_make_invoice_buyer_view.xml',
'wizard/auction_lots_make_invoice_view.xml',

View File

@ -1,8 +1,9 @@
<?xml version="1.0"?>
<openerp>
<data>
<menuitem name="Auction" id="auction_menu_root" icon="terp-purchase" sequence="26" groups="base.group_system"/>
<menuitem name="Configuration" parent="auction_menu_root" id="auction_config_menu" sequence="7"/>
<menuitem name="Auction" id="auction_menu_root" icon="terp-purchase" sequence="26"
groups="base.group_system,group_auction_manager,group_auction_user"/>
<menuitem name="Configuration" parent="auction_menu_root" id="auction_config_menu" sequence="7" groups="base.group_system,group_auction_manager"/>
<menuitem name="Tools Bar Codes" id="auction_outils_menu" parent="auction_menu_root" sequence="5" />
<menuitem name="Deliveries Management" action="action_auction_taken" id="menu_wizard_emporte" parent="auction_outils_menu"/>
@ -80,7 +81,8 @@
<field name="view_id" ref="view_auction_object_categories_tree"/>
</record>
<menuitem name="Object Categories" parent="auction_config_menu" action="action_auction_object_categories" id="menu_auction_object_cat"/>
<menuitem name="Object Categories" parent="auction_config_menu" action="action_auction_object_categories"
id="menu_auction_object_cat" groups="base.group_system,group_auction_manager"/>
<!-- Auction Management/Auction Dates/New Auction Dates -->
@ -485,6 +487,7 @@
</record>
<record model="ir.actions.act_window" id="action_all_objects">
<field name="name">Objects</field>
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
@ -762,7 +765,7 @@
<menuitem name="Buyers" id="auction_buyers_menu" parent="auction_menu_root" sequence="4"/>
<menuitem name="Bids" parent="auction_buyers_menu" action="action_bid_open" id="menu_action_bid_open"/>
<menuitem name="Reporting" id="auction_report_menu" parent="auction_menu_root" sequence="6"/>
<menuitem name="Reporting" id="auction_report_menu" parent="auction_menu_root" sequence="6" groups="base.group_system,group_auction_manager"/>
<act_window name="Deposit slip"
context="{'search_default_partner_id': [active_id]}"

View File

@ -37,23 +37,24 @@
<field name="arch" type="xml">
<search string="Auction Summary">
<group>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Auction in last 365 days"/>
<filter icon="terp-go-month" string=" 30 Days "
<filter icon="terp-go-year" string="Year"
domain="[('year','=',time.strftime('%%Y'))]"
help="Auction during current year."/>
<filter icon="terp-go-month" string="Month"
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Auction in last 30 days"/>
domain="[('month','=',time.strftime('%%m'))]"
help="Auction during current month."/>
<filter icon="terp-go-week"
string=" 7 Days "
string="Month -1"
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Auction during last 7 days"/>
domain="[('month','=',(datetime.date.today() - datetime.timedelta(365/12)).strftime('%%m'))]"
help="Auction during last month."/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-dolar"
name="sold"
string="Sold"
domain="[('state','=', 'sold')]"/>
<separator orientation="vertical"/>
@ -74,7 +75,7 @@
<filter string="Buyer" icon="terp-personal" name="buyer" context="{'group_by':'buyer'}"/>
<filter string="Seller" icon="terp-personal" name="seller" context="{'group_by':'seller'}"/>
<separator orientation="vertical"/>
<filter string="Auction" icon="terp-project" name="auction" context="{'group_by':'auction'}"/>
<filter string="Auction" icon="terp-project" name="auction_date" context="{'group_by':'auction'}"/>
<separator orientation="vertical" />
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Type"
@ -113,7 +114,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_report_auction_search"/>
<field name="context">{'search_default_month':1}</field>
<field name="context">{'search_default_month':1,'search_default_sold':1,'search_default_auction_date':1, 'group_by':[], 'group_by_no_leaf':1}</field>
</record>
<menuitem name="Auction Analysis" action="action_report_auction" id="menu_report_auction" parent="auction.auction_report_menu"/>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="0">
<record id="group_auction_manager" model="res.groups">
<field name="name">Auction / Manager</field>
</record>
<record id="group_auction_user" model="res.groups">
<field name="name">Auction / User</field>
</record>
</data>
</openerp>

View File

@ -1,18 +1,23 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_auction_artists","auction.artists","model_auction_artists","base.group_user",1,1,1,1
"access_auction_dates","auction.dates","model_auction_dates","base.group_user",1,1,1,1
"access_auction_deposit","auction.deposit","model_auction_deposit","base.group_user",1,1,1,1
"access_auction_deposit_cost","auction.deposit.cost","model_auction_deposit_cost","base.group_user",1,1,1,1
"access_auction_lot_category","auction.lot.category","model_auction_lot_category","base.group_user",1,1,1,1
"access_auction_lots","auction.lots","model_auction_lots","base.group_user",1,1,1,1
"access_auction_bid","auction.bid","model_auction_bid","base.group_user",1,1,1,1
"access_auction_bid_line","auction.bid.line","model_auction_bid_line","base.group_user",1,1,1,1
"access_auction_lot_history","auction.lot.history","model_auction_lot_history","base.group_user",1,1,1,1
"access_report_auction","report.auction","model_report_auction","base.group_user",1,0,0,0
"access_report_auction_object_date","report.auction.object.date","model_report_auction_object_date","base.group_user",1,0,0,0
"access_report_auction_adjudication","report.auction.adjudication","model_report_auction_adjudication","base.group_user",1,0,0,0
"access_report_object_encoded","report.object.encoded","model_report_object_encoded","base.group_user",1,0,0,0
"access_aie_category","aie.category","model_aie_category","base.group_user",1,0,0,0
"access_auction_artists","auction.artists","model_auction_artists","group_auction_manager",1,1,1,1
"access_auction_dates_manager","auction.dates manager","model_auction_dates","group_auction_manager",1,1,1,1
"access_auction_deposit_manager","auction.deposit manager","model_auction_deposit","group_auction_manager",1,1,1,1
"access_auction_deposit_cost","auction.deposit.cost","model_auction_deposit_cost","group_auction_manager",1,1,1,1
"access_auction_lot_category","auction.lot.category","model_auction_lot_category","group_auction_user",1,0,0,0
"access_auction_lot_category_manager","auction.lot.category manager","model_auction_lot_category","group_auction_manager",1,1,1,1
"access_auction_lots","auction.lots","model_auction_lots","group_auction_user",1,1,1,1
"access_auction_lots_manager","auction.lots manager","model_auction_lots","group_auction_manager",1,0,0,0
"access_auction_bid","auction.bid","model_auction_bid","group_auction_user",1,1,1,1
"access_auction_bid_manager","auction.bid manager","model_auction_bid","group_auction_manager",1,0,0,0
"access_auction_bid_line","auction.bid.line","model_auction_bid_line","group_auction_user",1,1,1,1
"access_auction_bid_line_manager","auction.bid.line manager","model_auction_bid_line","group_auction_manager",1,0,0,0
"access_auction_lot_history","auction.lot.history","model_auction_lot_history","group_auction_user",1,1,1,1
"access_auction_lot_history_manager","auction.lot.history manager","model_auction_lot_history","group_auction_manager",1,0,0,0
"access_report_auction","report.auction","model_report_auction","group_auction_manager",1,1,1,1
"access_report_auction_object_date","report.auction.object.date","model_report_auction_object_date","group_auction_manager",1,1,1,1
"access_report_auction_adjudication","report.auction.adjudication","model_report_auction_adjudication","group_auction_manager",1,1,1,1
"access_report_object_encoded","report.object.encoded","model_report_object_encoded","group_auction_manager",1,1,1,1
"access_aie_category","aie.category","model_aie_category","group_auction_manager",1,1,1,1
"access_auction_dates_system","auction.dates system","model_auction_dates","base.group_system",1,0,0,0
"access_auction_lots_system","auction.lots system","model_auction_lots","base.group_system",1,0,0,0
"access_auction_deposit_system","auction.deposit system","model_auction_deposit","base.group_system",1,0,0,0
@ -22,3 +27,15 @@
"access_auction_lot_history_system","auction.lot.history system","model_auction_lot_history","base.group_system",1,0,0,0
"access_auction_deposit_cost_system","auction.deposit.cost system","model_auction_deposit_cost","base.group_system",1,0,0,0
"access_auction_bid_line_system","auction.bid.line system","model_auction_bid_line","base.group_system",1,0,0,0
"access_auction_account_tax","account.tax manager","account.model_account_tax","group_auction_manager",1,1,1,0
"access_auction_account_fiscalyear","account.fiscalyear manager","account.model_account_fiscalyear","group_auction_manager",1,1,1,0
"access_auction_account_journal","account.journal manager","account.model_account_journal","group_auction_manager",1,1,1,0
"access_auction_account_invoice","account.invoice manager","account.model_account_invoice","group_auction_manager",1,1,1,0
"access_auction_account_invoice_line","account.invoice.line manager","account.model_account_invoice_line","group_auction_manager",1,1,1,0
"access_auction_account_invoice_tax","account.invoice.tax manager","account.model_account_invoice_tax","group_auction_manager",1,1,1,0
"access_auction_account_analytic_journal","account.analytic.journal manager","account.model_account_analytic_journal","group_auction_manager",1,1,1,0
"access_auction_account_period","account.period manager","account.model_account_period","group_auction_manager",1,1,1,0
"access_auction_account_move","account.move manager","account.model_account_move","group_auction_manager",1,1,1,0
"access_auction_account_move_line","account.move.line manager","account.model_account_move_line","group_auction_manager",1,1,1,0
"access_auction_account_journal_period","account.journal.period manager","account.model_account_journal_period","group_auction_manager",1,1,1,0
"access_auction_account_analytic_line","account.analytic.line manager","account.model_account_analytic_line","group_auction_manager",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_auction_artists auction.artists model_auction_artists base.group_user group_auction_manager 1 1 1 1
3 access_auction_dates access_auction_dates_manager auction.dates auction.dates manager model_auction_dates base.group_user group_auction_manager 1 1 1 1
4 access_auction_deposit access_auction_deposit_manager auction.deposit auction.deposit manager model_auction_deposit base.group_user group_auction_manager 1 1 1 1
5 access_auction_deposit_cost auction.deposit.cost model_auction_deposit_cost base.group_user group_auction_manager 1 1 1 1
6 access_auction_lot_category auction.lot.category model_auction_lot_category base.group_user group_auction_user 1 1 0 1 0 1 0
7 access_auction_lots access_auction_lot_category_manager auction.lots auction.lot.category manager model_auction_lots model_auction_lot_category base.group_user group_auction_manager 1 1 1 1
8 access_auction_bid access_auction_lots auction.bid auction.lots model_auction_bid model_auction_lots base.group_user group_auction_user 1 1 1 1
9 access_auction_bid_line access_auction_lots_manager auction.bid.line auction.lots manager model_auction_bid_line model_auction_lots base.group_user group_auction_manager 1 1 0 1 0 1 0
10 access_auction_lot_history access_auction_bid auction.lot.history auction.bid model_auction_lot_history model_auction_bid base.group_user group_auction_user 1 1 1 1
11 access_report_auction access_auction_bid_manager report.auction auction.bid manager model_report_auction model_auction_bid base.group_user group_auction_manager 1 0 0 0
12 access_report_auction_object_date access_auction_bid_line report.auction.object.date auction.bid.line model_report_auction_object_date model_auction_bid_line base.group_user group_auction_user 1 0 1 0 1 0 1
13 access_report_auction_adjudication access_auction_bid_line_manager report.auction.adjudication auction.bid.line manager model_report_auction_adjudication model_auction_bid_line base.group_user group_auction_manager 1 0 0 0
14 access_report_object_encoded access_auction_lot_history report.object.encoded auction.lot.history model_report_object_encoded model_auction_lot_history base.group_user group_auction_user 1 0 1 0 1 0 1
15 access_aie_category access_auction_lot_history_manager aie.category auction.lot.history manager model_aie_category model_auction_lot_history base.group_user group_auction_manager 1 0 0 0
16 access_report_auction report.auction model_report_auction group_auction_manager 1 1 1 1
17 access_report_auction_object_date report.auction.object.date model_report_auction_object_date group_auction_manager 1 1 1 1
18 access_report_auction_adjudication report.auction.adjudication model_report_auction_adjudication group_auction_manager 1 1 1 1
19 access_report_object_encoded report.object.encoded model_report_object_encoded group_auction_manager 1 1 1 1
20 access_aie_category aie.category model_aie_category group_auction_manager 1 1 1 1
21 access_auction_dates_system auction.dates system model_auction_dates base.group_system 1 0 0 0
22 access_auction_lots_system auction.lots system model_auction_lots base.group_system 1 0 0 0
23 access_auction_deposit_system auction.deposit system model_auction_deposit base.group_system 1 0 0 0
27 access_auction_lot_history_system auction.lot.history system model_auction_lot_history base.group_system 1 0 0 0
28 access_auction_deposit_cost_system auction.deposit.cost system model_auction_deposit_cost base.group_system 1 0 0 0
29 access_auction_bid_line_system auction.bid.line system model_auction_bid_line base.group_system 1 0 0 0
30 access_auction_account_tax account.tax manager account.model_account_tax group_auction_manager 1 1 1 0
31 access_auction_account_fiscalyear account.fiscalyear manager account.model_account_fiscalyear group_auction_manager 1 1 1 0
32 access_auction_account_journal account.journal manager account.model_account_journal group_auction_manager 1 1 1 0
33 access_auction_account_invoice account.invoice manager account.model_account_invoice group_auction_manager 1 1 1 0
34 access_auction_account_invoice_line account.invoice.line manager account.model_account_invoice_line group_auction_manager 1 1 1 0
35 access_auction_account_invoice_tax account.invoice.tax manager account.model_account_invoice_tax group_auction_manager 1 1 1 0
36 access_auction_account_analytic_journal account.analytic.journal manager account.model_account_analytic_journal group_auction_manager 1 1 1 0
37 access_auction_account_period account.period manager account.model_account_period group_auction_manager 1 1 1 0
38 access_auction_account_move account.move manager account.model_account_move group_auction_manager 1 1 1 0
39 access_auction_account_move_line account.move.line manager account.model_account_move_line group_auction_manager 1 1 1 0
40 access_auction_account_journal_period account.journal.period manager account.model_account_journal_period group_auction_manager 1 1 1 0
41 access_auction_account_analytic_line account.analytic.line manager account.model_account_analytic_line group_auction_manager 1 1 1 1

View File

@ -47,7 +47,6 @@ class crm_phonecall_report(osv.osv):
@param context: A standard dictionary for contextual values """
res = {}
state_perc = 0.0
avg_ans = 0.0
for case in self.browse(cr, uid, ids, context):

View File

@ -207,7 +207,6 @@ class crm_lead2opportunity_partner(osv.osv_memory):
context = {}
partner_ids = self._create_partner(cr, uid, ids, context)
mod_obj = self.pool.get('ir.model.data')
value = {}
data_obj = self.pool.get('ir.model.data')
data_id = data_obj._get_id(cr, uid, 'crm', 'view_crm_lead2opportunity_action')

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -565,7 +565,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -584,7 +584,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Temps en hores per realitzar un cicle."
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Data final"

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -585,7 +585,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Zeit in Stunden für einen (Auftrags-) Zyklus"
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Endedatum"

View File

@ -585,7 +585,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Χρόνος ενός κύκλου σε ώρες"
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Ημερ/νία Τέλους"

View File

@ -585,7 +585,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Tiempo en horas para realizar un ciclo."
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Fecha final"

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -585,7 +585,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Tiempo en horas para realizar un ciclo."
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Fecha final"

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Aeg tundides mis kulub ühes tsükklis."
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Lõppkuupäev"

View File

@ -580,7 +580,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Yhden kierron kesto tunneissa."
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Lopetuspäivämäärä"

View File

@ -600,7 +600,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Temps nécessaire à la réalisation d'un cycle"
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Date de fin"

View File

@ -562,7 +562,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "समाप्ति तिथि"

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -586,7 +586,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Tempo in ore per completare un ciclo."
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Data di fine"

View File

@ -567,7 +567,7 @@ msgid "Time in hours for doing one cycle."
msgstr "한 사이클을 수행하는 시간"
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "마감 날짜"

View File

@ -575,7 +575,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Vieno ciklo laikas valandomis."
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Pabaigos data"

View File

@ -546,7 +546,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -584,7 +584,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Tijd in uren voor één productiecyclus."
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Einddatum"

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -582,7 +582,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Czas wykonania jednego cyklu w godzinach"
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Data końcowa"

View File

@ -564,7 +564,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Data de finalização"

View File

@ -567,7 +567,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Tempo em hora para fazer um ciclo."
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Data final"

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -567,7 +567,7 @@ msgid "Time in hours for doing one cycle."
msgstr "Время в часах на выполнение одного цикла"
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Дата окончания"

View File

@ -562,7 +562,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Končni datum"

View File

@ -562,7 +562,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Slutdatum"

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Bitiş Tarihi"

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "Кінцева дата"

View File

@ -562,7 +562,7 @@ msgid "Time in hours for doing one cycle."
msgstr ""
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr "一个周期的工作小时数"
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr "结束日期"

View File

@ -562,7 +562,7 @@ msgid "Time in hours for doing one cycle."
msgstr "一個循環所須的小時數"
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -561,7 +561,7 @@ msgid "Time in hours for doing one cycle."
msgstr "一個循環所須的小時數"
#. module: mrp
#: field:mrp.production,date_finnished:0
#: field:mrp.production,date_finished:0
msgid "End Date"
msgstr ""

View File

@ -456,7 +456,7 @@ class mrp_production(osv.osv):
'date_planned_date': fields.function(_production_date, method=True, type='date', string='Scheduled Date'),
'date_planned': fields.datetime('Scheduled date', required=True, select=1),
'date_start': fields.datetime('Start Date'),
'date_finnished': fields.datetime('End Date'),
'date_finished': fields.datetime('End Date'),
'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)]),
'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', help="The list of operations (list of workcenters) to produce the finished product. The routing is mainly used to compute workcenter costs during operations and to plan future loads on workcenters based on production plannification."),
@ -658,7 +658,7 @@ class mrp_production(osv.osv):
"""
for production in self.browse(cr, uid, ids):
self._costs_generate(cr, uid, production)
return self.write(cr, uid, ids, {'state': 'done', 'date_finnished': time.strftime('%Y-%m-%d %H:%M:%S')})
return self.write(cr, uid, ids, {'state': 'done', 'date_finished': time.strftime('%Y-%m-%d %H:%M:%S')})
def test_production_done(self, cr, uid, ids):
""" Tests whether production is done or not.

View File

@ -545,7 +545,7 @@
<field name="model">mrp.production</field>
<field name="type">gantt</field>
<field name="arch" type="xml">
<gantt color="product_id" date_stop="date_finnished" date_start="date_start" string="Productions">
<gantt color="product_id" date_stop="date_finished" date_start="date_start" string="Productions">
<level object="mrp.routing" link="routing_id" domain="[]">
<field name="name"/>
<field name="origin"/>
@ -604,8 +604,8 @@
<tree colors="blue:state in ('draft');black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('cancel','done') " string="Products to Consume">
<field name="product_id" />
<field name="product_qty" string="Qty"/>
<field name="product_uom" string="UOM"/>
<field name="location_id" string="Source Loc."/>
<field name="product_uom" string="UOM" widget="selection"/>
<field name="location_id" string="Source Loc." widget="selection"/>
<field name="state" invisible="1"/>
<button name="%(stock.move_consume)d"
string="Consume Products" type="action"
@ -623,8 +623,8 @@
<tree colors="red:scrapped==True;blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') " string="Consumed Products" editable="bottom">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
<field name="product_uom" readonly="1" string="UOM"/>
<field name="location_dest_id" readonly="1" string="Destination Loc."/>
<field name="product_uom" readonly="1" string="UOM" widget="selection"/>
<field name="location_dest_id" readonly="1" string="Destination Loc." widget="selection"/>
<field name="prodlot_id" />
<field name="state" invisible="1"/>
<field name="scrapped" invisible="1"/>
@ -658,8 +658,8 @@
<tree string="Products to Finish">
<field name="product_id" />
<field name="product_qty" string="Qty"/>
<field name="product_uom" string="UOM"/>
<field name="location_id" string="Source Loc."/>
<field name="product_uom" string="UOM" widget="selection"/>
<field name="location_id" string="Source Loc." widget="selection"/>
<field name="state" invisible="1"/>
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action"
@ -673,8 +673,8 @@
<tree colors="red:scrapped==True;blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') " string="Finished Products" editable="bottom">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
<field name="product_uom" readonly="1" string="UOM"/>
<field name="location_dest_id" readonly="1" string="Destination Loc."/>
<field name="product_uom" readonly="1" string="UOM" widget="selection"/>
<field name="location_dest_id" readonly="1" string="Destination Loc." widget="selection"/>
<field name="prodlot_id" />
<field name="scrapped" invisible="1"/>
<button name="%(stock.track_line)d"
@ -711,7 +711,7 @@
<field name="priority" groups="base.group_extended"/>
<newline/>
<field name="date_start"/>
<field name="date_finnished"/>
<field name="date_finished"/>
<field name="picking_id" groups="base.group_extended"/>
<field name="move_prod_id" groups="base.group_extended"/>
</page>

View File

@ -51,7 +51,7 @@ class mrp_production_order(osv.osv):
'date_planned':fields.date('Scheduled Date'),
'location_src_id': fields.many2one('stock.location', 'Raw Materials Location', readonly=True),
'date_start': fields.datetime('Start Date',readonly=True),
'date_finnished': fields.datetime('End Date',readonly=True),
'date_finished': fields.datetime('End Date',readonly=True),
'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', readonly=True),
'company_id': fields.many2one('res.company','Company',readonly=True),
'bom_id': fields.many2one('mrp.bom', 'Bill of Material',readonly=True),
@ -100,7 +100,7 @@ class mrp_production_order(osv.osv):
s.routing_id,
s.picking_id,
s.date_start,
s.date_finnished,
s.date_finished,
to_date(to_char(s.date_planned, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_planned,
s.origin,
s.priority,
@ -128,7 +128,7 @@ class mrp_production_order(osv.osv):
to_date(to_char(s.date_planned, 'dd-MM-YYYY'),'dd-MM-YYYY'),
s.origin,
s.date_start,
s.date_finnished,
s.date_finished,
s.company_id
)""")
mrp_production_order()

View File

@ -58,7 +58,7 @@
<filter icon="terp-go-week"
string="Month -1"
separator="1"
domain="[('date_start','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_start','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
domain="[('month','=',(datetime.date.today() - datetime.timedelta(365/12)).strftime('%%m'))]"
help="Production during last month"/>
<separator orientation="vertical"/>
<filter string="Current" icon="terp-check" domain="[('state','in',('open','draft'))]"/>
@ -80,7 +80,7 @@
<newline/>
<field name="date_start"/>
<field name="date_planned"/>
<field name="date_finnished"/>
<field name="date_finished"/>
</group>
<newline/>
<group expand="1" string="Group By...">

View File

@ -101,7 +101,8 @@
<field name="view_mode">graph,tree</field>
<field name="help">Weekly Stock Value Variation enables you to track stock value evolution as a result of manufacturing activities (consumption of raw materials, production of finished goods, added accounting value of stock by the creation of value following the transformation of products).</field>
</record>
<menuitem action="action_report_in_out_picking_tree" id="menu_report_in_out_picking" parent="next_id_77"/>
<menuitem action="action_report_in_out_picking_tree" id="menu_report_in_out_picking"
parent="next_id_77" groups="mrp.group_mrp_manager"/>

View File

@ -5,12 +5,14 @@
"access_mrp_bom","mrp.bom","model_mrp_bom","group_mrp_user",1,1,1,0
"access_mrp_bom_revision","mrp.bom.revision","model_mrp_bom_revision","group_mrp_user",1,0,0,0
"access_mrp_production","mrp.production user","model_mrp_production","mrp.group_mrp_user",1,1,1,1
"access_mrp_property_group","mrp.property.group","procurement.model_mrp_property_group","mrp.group_mrp_manager",1,1,1,1
"access_mrp_property","mrp.property","procurement.model_mrp_property","mrp.group_mrp_manager",1,1,1,1
"access_mrp_production_product_line","mrp.production.product.line","model_mrp_production_product_line","mrp.group_mrp_user",1,1,1,1
"access_procurement","procurement.order","model_procurement_order","mrp.group_mrp_user",1,1,1,1
"access_mrp_workcenter_manager","mrp.workcenter.manager","model_mrp_workcenter","mrp.group_mrp_manager",1,1,1,1
"access_mrp_workcenter_manager","mrp.workcenter.manager","model_mrp_workcenter","mrp.group_mrp_manager",1,0,0,0
"access_mrp_routing_manager","mrp.routing.manager","model_mrp_routing","mrp.group_mrp_manager",1,1,1,1
"access_mrp_routing_workcenter_manager","mrp.routing.workcenter.manager","model_mrp_routing_workcenter","mrp.group_mrp_manager",1,1,1,1
"access_mrp_bom_manager","mrp.bom.manager","model_mrp_bom","mrp.group_mrp_manager",1,0,0,0
"access_mrp_bom_manager","mrp.bom.manager","model_mrp_bom","mrp.group_mrp_manager",1,0,0,1
"access_mrp_bom_revision_manager","mrp.bom.revision.manager","model_mrp_bom_revision","mrp.group_mrp_manager",1,1,1,1
"access_stock_location_mrp_worker","stock.location mrp_worker","stock.model_stock_location","mrp.group_mrp_user",1,0,0,0
"access_stock_move_mrp_worker","stock.move mrp_worker","stock.model_stock_move","mrp.group_mrp_user",1,1,1,0
@ -20,14 +22,15 @@
"access_account_account","account.account mrp_worker","account.model_account_account","mrp.group_mrp_user",1,0,0,0
"access_purchase_order_mrp_worker","purchase.order mrp_worker","purchase.model_purchase_order","mrp.group_mrp_user",1,1,1,1
"access_purchase_order_line_mrp_worker","purchase.order.line mrp_worker","purchase.model_purchase_order_line","mrp.group_mrp_user",1,0,0,0
"access_hr_timesheet_group_mrp_worker","resource.calendar mrp_worker","resource.model_resource_calendar","base.group_system",1,1,1,1
"access_hr_timesheet_group_mrp_worker","resource.calendar mrp_manager","resource.model_resource_calendar","mrp.group_mrp_manager",1,1,1,1
"access_procurement_stock_worker","procurement.order stock_worker","model_procurement_order","stock.group_stock_user",1,1,1,1
"access_procurement_user","procurement.order.user","model_procurement_order","base.group_user",1,1,1,1
"access_mrp_production_stock_worker","mrp.production stock_worker","model_mrp_production","stock.group_stock_user",1,0,0,0
"access_mrp_production_order","mrp.production.order","model_mrp_production_order","mrp.group_mrp_manager",1,1,1,1
"access_report_workcenter_load","report.workcenter.load","model_report_workcenter_load","mrp.group_mrp_manager",1,0,0,0
"access_report_mrp_inout","report.mrp.inout","model_report_mrp_inout","mrp.group_mrp_manager",1,0,0,0
"access_product_product_manager","product.product manager","model_product_product","mrp.group_mrp_manager",1,1,1,1
"access_report_workcenter_load","report.workcenter.load","model_report_workcenter_load","mrp.group_mrp_manager",1,1,1,1
"access_report_mrp_inout","report.mrp.inout","model_report_mrp_inout","mrp.group_mrp_manager",1,1,1,1
"access_product_product_manager","product.product manager","model_product_product","mrp.group_mrp_manager",1,0,0,0
"access_ir_property_manager","ir.property manager","base.model_ir_property","mrp.group_mrp_manager",1,1,1,1
"access_account_sequence_fiscalyear","account.sequence.fiscalyear","account.model_account_sequence_fiscalyear","mrp.group_mrp_user",1,1,1,1
"access_product_product_user","product.product user","model_product_product","mrp.group_mrp_user",1,1,1,1
"access_product_template_user","product.template user","product.model_product_template","mrp.group_mrp_user",1,1,1,1
@ -39,6 +42,7 @@
"access_workcenter_user","mrp.production.workcenter.line.user","model_mrp_production_workcenter_line","mrp.group_mrp_user",1,1,1,1
"access_resource_calendar_leaves_user","mrp.resource.calendar.leaves.user","resource.model_resource_calendar_leaves","mrp.group_mrp_user",1,1,1,1
"access_resource_calendar_leaves_manager","mrp.resource.calendar.leaves.manager","resource.model_resource_calendar_leaves","mrp.group_mrp_manager",1,0,0,0
"access_resource_calendar_attendance_manager","mrp.resource.calendar.attendance.manager","resource.model_resource_calendar_attendance","mrp.group_mrp_manager",1,1,1,1
"access_product_puom_categ","product.uom.categ","product.model_product_uom_categ","mrp.group_mrp_user",1,1,1,0
"access_resource_resource","resource.resource","resource.model_resource_resource","mrp.group_mrp_user",1,1,1,0
"access_board_board_user","mrp.board.board","board.model_board_board","mrp.group_mrp_user",1,1,1,0
@ -55,7 +59,7 @@
"access_mrp_production_manager","mrp.production manager","model_mrp_production","mrp.group_mrp_manager",1,0,0,0
"access_procurement_manager","procurement.order","model_procurement_order","mrp.group_mrp_manager",1,0,0,0
"access_workcenter_manager","mrp.production.workcenter.line","model_mrp_production_workcenter_line","mrp.group_mrp_manager",1,0,0,0
"access_stock_move_mrp_manager","stock.move mrp_manager","stock.model_stock_move","mrp.group_mrp_manager",1,0,0,0
"access_stock_move_mrp_manager","stock.move mrp_manager","stock.model_stock_move","mrp.group_mrp_manager",1,0,0,1
"access_mrp_production_product_line_manager","mrp.production.product.line manager","model_mrp_production_product_line","mrp.group_mrp_manager",1,0,0,0
"access_account_sequence_fiscalyear_system","account.sequence.fiscalyear.system","account.model_account_sequence_fiscalyear","mrp.group_mrp_manager",1,0,0,0
"access_product_template_system","product.template mgr.system","product.model_product_template","base.group_system",1,0,0,0
@ -87,6 +91,6 @@
"access_mrp_production_system","mrp.production system","model_mrp_production","base.group_system",1,0,0,0
"access_stock_production_lot_user","stock.production.lot","stock.model_stock_production_lot","mrp.group_mrp_user",1,1,1,1
"access_stock_warehouse_orderpoint_manager","stock.warehouse.orderpoint","procurement.model_stock_warehouse_orderpoint","mrp.group_mrp_manager",1,0,0,0
"access_stock_picking_mrp_manager","stock.picking mrp_manager","stock.model_stock_picking","mrp.group_mrp_manager",1,1,1,1
"access_stock_picking_mrp_manager","stock.picking mrp_manager","stock.model_stock_picking","mrp.group_mrp_manager",1,0,0,0
"access_report_mrp_inout_user","report.mrp.inout user","model_report_mrp_inout","mrp.group_mrp_user",1,0,0,0
"access_report_workcenter_load_user","report.workcenter.load.user","model_report_workcenter_load","mrp.group_mrp_user",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
5 access_mrp_bom mrp.bom model_mrp_bom group_mrp_user 1 1 1 0
6 access_mrp_bom_revision mrp.bom.revision model_mrp_bom_revision group_mrp_user 1 0 0 0
7 access_mrp_production mrp.production user model_mrp_production mrp.group_mrp_user 1 1 1 1
8 access_mrp_property_group mrp.property.group procurement.model_mrp_property_group mrp.group_mrp_manager 1 1 1 1
9 access_mrp_property mrp.property procurement.model_mrp_property mrp.group_mrp_manager 1 1 1 1
10 access_mrp_production_product_line mrp.production.product.line model_mrp_production_product_line mrp.group_mrp_user 1 1 1 1
11 access_procurement procurement.order model_procurement_order mrp.group_mrp_user 1 1 1 1
12 access_mrp_workcenter_manager mrp.workcenter.manager model_mrp_workcenter mrp.group_mrp_manager 1 1 0 1 0 1 0
13 access_mrp_routing_manager mrp.routing.manager model_mrp_routing mrp.group_mrp_manager 1 1 1 1
14 access_mrp_routing_workcenter_manager mrp.routing.workcenter.manager model_mrp_routing_workcenter mrp.group_mrp_manager 1 1 1 1
15 access_mrp_bom_manager mrp.bom.manager model_mrp_bom mrp.group_mrp_manager 1 0 0 0 1
16 access_mrp_bom_revision_manager mrp.bom.revision.manager model_mrp_bom_revision mrp.group_mrp_manager 1 1 1 1
17 access_stock_location_mrp_worker stock.location mrp_worker stock.model_stock_location mrp.group_mrp_user 1 0 0 0
18 access_stock_move_mrp_worker stock.move mrp_worker stock.model_stock_move mrp.group_mrp_user 1 1 1 0
22 access_account_account account.account mrp_worker account.model_account_account mrp.group_mrp_user 1 0 0 0
23 access_purchase_order_mrp_worker purchase.order mrp_worker purchase.model_purchase_order mrp.group_mrp_user 1 1 1 1
24 access_purchase_order_line_mrp_worker purchase.order.line mrp_worker purchase.model_purchase_order_line mrp.group_mrp_user 1 0 0 0
25 access_hr_timesheet_group_mrp_worker resource.calendar mrp_worker resource.calendar mrp_manager resource.model_resource_calendar base.group_system mrp.group_mrp_manager 1 1 1 1
26 access_procurement_stock_worker procurement.order stock_worker model_procurement_order stock.group_stock_user 1 1 1 1
27 access_procurement_user procurement.order.user model_procurement_order base.group_user 1 1 1 1
28 access_mrp_production_stock_worker mrp.production stock_worker model_mrp_production stock.group_stock_user 1 0 0 0
29 access_mrp_production_order mrp.production.order model_mrp_production_order mrp.group_mrp_manager 1 1 1 1
30 access_report_workcenter_load report.workcenter.load model_report_workcenter_load mrp.group_mrp_manager 1 0 1 0 1 0 1
31 access_report_mrp_inout report.mrp.inout model_report_mrp_inout mrp.group_mrp_manager 1 0 1 0 1 0 1
32 access_product_product_manager product.product manager model_product_product mrp.group_mrp_manager 1 1 0 1 0 1 0
33 access_ir_property_manager ir.property manager base.model_ir_property mrp.group_mrp_manager 1 1 1 1
34 access_account_sequence_fiscalyear account.sequence.fiscalyear account.model_account_sequence_fiscalyear mrp.group_mrp_user 1 1 1 1
35 access_product_product_user product.product user model_product_product mrp.group_mrp_user 1 1 1 1
36 access_product_template_user product.template user product.model_product_template mrp.group_mrp_user 1 1 1 1
42 access_workcenter_user mrp.production.workcenter.line.user model_mrp_production_workcenter_line mrp.group_mrp_user 1 1 1 1
43 access_resource_calendar_leaves_user mrp.resource.calendar.leaves.user resource.model_resource_calendar_leaves mrp.group_mrp_user 1 1 1 1
44 access_resource_calendar_leaves_manager mrp.resource.calendar.leaves.manager resource.model_resource_calendar_leaves mrp.group_mrp_manager 1 0 0 0
45 access_resource_calendar_attendance_manager mrp.resource.calendar.attendance.manager resource.model_resource_calendar_attendance mrp.group_mrp_manager 1 1 1 1
46 access_product_puom_categ product.uom.categ product.model_product_uom_categ mrp.group_mrp_user 1 1 1 0
47 access_resource_resource resource.resource resource.model_resource_resource mrp.group_mrp_user 1 1 1 0
48 access_board_board_user mrp.board.board board.model_board_board mrp.group_mrp_user 1 1 1 0
59 access_mrp_production_manager mrp.production manager model_mrp_production mrp.group_mrp_manager 1 0 0 0
60 access_procurement_manager procurement.order model_procurement_order mrp.group_mrp_manager 1 0 0 0
61 access_workcenter_manager mrp.production.workcenter.line model_mrp_production_workcenter_line mrp.group_mrp_manager 1 0 0 0
62 access_stock_move_mrp_manager stock.move mrp_manager stock.model_stock_move mrp.group_mrp_manager 1 0 0 0 1
63 access_mrp_production_product_line_manager mrp.production.product.line manager model_mrp_production_product_line mrp.group_mrp_manager 1 0 0 0
64 access_account_sequence_fiscalyear_system account.sequence.fiscalyear.system account.model_account_sequence_fiscalyear mrp.group_mrp_manager 1 0 0 0
65 access_product_template_system product.template mgr.system product.model_product_template base.group_system 1 0 0 0
91 access_mrp_production_system mrp.production system model_mrp_production base.group_system 1 0 0 0
92 access_stock_production_lot_user stock.production.lot stock.model_stock_production_lot mrp.group_mrp_user 1 1 1 1
93 access_stock_warehouse_orderpoint_manager stock.warehouse.orderpoint procurement.model_stock_warehouse_orderpoint mrp.group_mrp_manager 1 0 0 0
94 access_stock_picking_mrp_manager stock.picking mrp_manager stock.model_stock_picking mrp.group_mrp_manager 1 1 0 1 0 1 0
95 access_report_mrp_inout_user report.mrp.inout user model_report_mrp_inout mrp.group_mrp_user 1 0 0 0
96 access_report_workcenter_load_user report.workcenter.load.user model_report_workcenter_load mrp.group_mrp_user 1 0 0 0

View File

@ -230,17 +230,6 @@
wf_service = netsvc.LocalService("workflow")
for p_id in purch_ids:
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
-
I get the approval from both the suppliers. So I approve my purchase orders.
-
!python {model: purchase.order}: |
from tools.translate import _
import netsvc
purch_ids = self.search(cr, uid, [('state','=','confirmed')])
assert purch_ids, _('No Confirmed Purchase Orders found!')
wf_service = netsvc.LocalService("workflow")
for p_id in purch_ids:
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_approve', cr)
-
I see two incoming pickings for Orange and Sugar.
-

View File

@ -178,17 +178,7 @@
wf_service = netsvc.LocalService("workflow")
for p_id in purch_ids:
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
-
I get the approval from the supplier. So I approve my purchase orders.
-
!python {model: purchase.order}: |
from tools.translate import _
import netsvc
purch_ids = self.search(cr, uid, [('state','=','confirmed')])
assert purch_ids, _('No Confirmed Purchase Orders found!')
wf_service = netsvc.LocalService("workflow")
for p_id in purch_ids:
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_approve', cr)
-
I confirm purchase order for Buttons.
-
@ -198,17 +188,7 @@
wf_service = netsvc.LocalService("workflow")
for p_id in purch_ids:
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
-
I get the approval from the supplier. So I approve my purchase orders.
-
!python {model: purchase.order}: |
from tools.translate import _
import netsvc
purch_ids = self.search(cr, uid, [('state','=','confirmed')])
assert purch_ids, _('No Confirmed Purchase Orders found!')
wf_service = netsvc.LocalService("workflow")
for p_id in purch_ids:
wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_approve', cr)
-
I Check incoming shipments for cloth. And receive products.
-

View File

@ -87,10 +87,10 @@ class change_production_qty(osv.osv_memory):
factor = prod.product_qty * prod.product_uom.factor / bom_point.product_uom.factor
res = bom_obj._bom_explode(cr, uid, bom_point, factor / bom_point.product_qty, [])
for r in res[0]:
if r['product_id']== move.product_id.id:
move_lines_obj.write(cr, uid,move.id, {'product_qty' : r['product_qty']})
if r['product_id'] == move.product_id.id:
move_lines_obj.write(cr, uid, [move.id], {'product_qty' : r['product_qty']})
for m in prod.move_created_ids:
move_lines_obj.write(cr, uid,m.id, {'product_qty': wiz_qty.product_qty})
move_lines_obj.write(cr, uid, [m.id], {'product_qty': wiz_qty.product_qty})
return {}

View File

@ -246,7 +246,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -248,7 +248,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -246,7 +246,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -249,7 +249,7 @@ msgid "mrp_operations.operation"
msgstr "mrp_operations.operation"
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -246,7 +246,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -250,7 +250,7 @@ msgid "mrp_operations.operation"
msgstr "mrp_operations.operation"
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -251,7 +251,7 @@ msgid "mrp_operations.operation"
msgstr "mrp_operations.operation"
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -248,7 +248,7 @@ msgid "mrp_operations.operation"
msgstr "mrp_operations.operation"
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -251,7 +251,7 @@ msgid "mrp_operations.operation"
msgstr "mrp_operations.operation"
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -247,7 +247,7 @@ msgid "mrp_operations.operation"
msgstr "mrp_operations.operation"
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -249,7 +249,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -248,7 +248,7 @@ msgid "mrp_operations.operation"
msgstr "mrp_operations.operation"
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -247,7 +247,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -246,7 +246,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -246,7 +246,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -246,7 +246,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -249,7 +249,7 @@ msgid "mrp_operations.operation"
msgstr "mrp_operations.operation"
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -247,7 +247,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -246,7 +246,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -242,7 +242,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -247,7 +247,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -247,7 +247,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -248,7 +248,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -247,7 +247,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -248,7 +248,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -250,7 +250,7 @@ msgid "mrp_operations.operation"
msgstr "mrp_operations.operation"
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -248,7 +248,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -247,7 +247,7 @@ msgid "mrp_operations.operation"
msgstr "mrp_operations.operation"
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -247,7 +247,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -247,7 +247,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -246,7 +246,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -246,7 +246,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -247,7 +247,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -247,7 +247,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -246,7 +246,7 @@ msgid "mrp_operations.operation"
msgstr "运作"
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -246,7 +246,7 @@ msgid "mrp_operations.operation"
msgstr ""
#. module: mrp_operations
#: field:mrp.production.workcenter.line,date_finnished:0
#: field:mrp.production.workcenter.line,date_finished:0
#: field:mrp.production.workcenter.line,date_planned_end:0
#: field:mrp_operations.operation,date_finished:0
msgid "End Date"

View File

@ -67,7 +67,7 @@ class mrp_production_workcenter_line(osv.osv):
@return: Dictionary of values.
"""
ops = self.browse(cr, uid, ids, context=context)
date_and_hours_by_cal = [(op.date_planned, op.hour, op.workcenter_id.calendar_id.id) for op in ops]
date_and_hours_by_cal = [(op.production_id.date_planned, op.hour, op.workcenter_id.calendar_id.id) for op in ops]
intervals = self.pool.get('resource.calendar').interval_get_multi(cr, uid, date_and_hours_by_cal)
res = {}
@ -95,7 +95,7 @@ class mrp_production_workcenter_line(osv.osv):
'date_planned': fields.datetime('Scheduled Date'),
'date_planned_end': fields.function(_get_date_end, method=True, string='End Date', type='datetime'),
'date_start': fields.datetime('Start Date'),
'date_finnished': fields.datetime('End Date'),
'date_finished': fields.datetime('End Date'),
'delay': fields.float('Working Hours',help="This is lead time between operation start and stop in this workcenter",readonly=True),
'production_state':fields.related('production_id','state',
type='selection',
@ -179,7 +179,7 @@ class mrp_production_workcenter_line(osv.osv):
delay += (date_finished-date_start).days * 24
delay += (date_finished-date_start).seconds / float(60*60)
self.write(cr, uid, ids, {'state':'done', 'date_finnished': date_now,'delay':delay})
self.write(cr, uid, ids, {'state':'done', 'date_finished': date_now,'delay':delay})
self.modify_production_order_state(cr,uid,ids,'done')
return True
@ -288,7 +288,7 @@ class mrp_production(osv.osv):
dt_end = datetime.strptime(wc.date_planned_end, '%Y-%m-%d %H:%M:%S')
old = wc.sequence or 0
super(mrp_production, self).write(cr, uid, [po.id], {
'date_finnished': dt_end
'date_finished': dt_end
})
return dt_end
@ -306,7 +306,7 @@ class mrp_production(osv.osv):
if l.state in ('done','cancel','draft'):
continue
todo += l.move_dest_id_lines
if l.production_id and (l.production_id.date_finnished > dt):
if l.production_id and (l.production_id.date_finished > dt):
if l.production_id.state not in ('done','cancel'):
for wc in l.production_id.workcenter_lines:
i = self.pool.get('resource.calendar').interval_min_get(
@ -335,8 +335,8 @@ class mrp_production(osv.osv):
break
if l.production_id.state in ('done','cancel'):
break
if l.production_id and (l.production_id.date_start < po.date_finnished):
self.write(cr, uid, [l.production_id.id], {'date_start': po.date_finnished})
if l.production_id and (l.production_id.date_start < po.date_finished):
self.write(cr, uid, [l.production_id.id], {'date_start': po.date_finished})
break
@ -511,7 +511,7 @@ class mrp_operations_operation(osv.osv):
if code.start_stop=='done':
self.pool.get('mrp.production.workcenter.line').action_done(cr,uid,wc_op_id)
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', wc_op_id[0], 'button_done', cr)
self.pool.get('mrp.production').write(cr,uid,vals['production_id'],{'date_finnished':datetime.now().strftime('%Y-%m-%d %H:%M:%S')})
self.pool.get('mrp.production').write(cr,uid,vals['production_id'],{'date_finished':datetime.now().strftime('%Y-%m-%d %H:%M:%S')})
if code.start_stop=='pause':
self.pool.get('mrp.production.workcenter.line').action_pause(cr,uid,wc_op_id)
@ -532,7 +532,7 @@ class mrp_operations_operation(osv.osv):
line_vals['delay'] = delay
if vals.get('date_start',False):
if code.start_stop == 'done':
line_vals['date_finnished'] = vals['date_start']
line_vals['date_finished'] = vals['date_start']
elif code.start_stop == 'start':
line_vals['date_start'] = vals['date_start']

View File

@ -101,7 +101,7 @@
<group colspan="2" col="2">
<separator string="Real" colspan="2"/>
<field name="date_start" readonly="1"/>
<field name="date_finnished" readonly="1"/>
<field name="date_finished" readonly="1"/>
<field name="delay" widget="float_time"/>
</group>
<group colspan="2" col="2">
@ -170,7 +170,7 @@
<field name="model">mrp.production.workcenter.line</field>
<field name="type">calendar</field>
<field name="arch" type="xml">
<calendar color="product" date_stop="date_finnished" date_start="date_start" string="Operations">
<calendar color="product" date_stop="date_finished" date_start="date_start" string="Operations">
<field name="workcenter_id"/>
<field name="production_id"/>
</calendar>

View File

@ -21,7 +21,7 @@
from osv import fields,osv
import netsvc
from datetime import datetime, date
from datetime import datetime
from dateutil.relativedelta import relativedelta
from tools.translate import _
import decimal_precision as dp

View File

@ -175,9 +175,8 @@ class pos_order(osv.osv):
cur_obj = self.pool.get('res.currency')
cur = order.pricelist_id.currency_id
for payment in order.statement_ids:
res[order.id]['amount_paid'] += payment.amount
for payment in order.payments:
res[order.id]['amount_return'] += (payment.amount < 0 and payment.amount or 0)
res[order.id]['amount_paid'] += payment.amount
res[order.id]['amount_return'] += (payment.amount < 0 and payment.amount or 0)
for line in order.lines:
if order.price_type!='tax_excluded':
res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2),
@ -221,7 +220,6 @@ class pos_order(osv.osv):
default = {}
default.update({
'state': 'draft',
'payments': [],
'partner_id': False,
'invoice_id': False,
'account_move': False,
@ -285,7 +283,6 @@ class pos_order(osv.osv):
('tax_excluded','Tax excluded')
], 'Price method', required=True),
'statement_ids': fields.one2many('account.bank.statement.line','pos_statement_id','Payments',states={'draft': [('readonly', False)]},readonly=True),
'payments': fields.one2many('pos.payment', 'order_id', 'Order Payments', states={'draft': [('readonly', False)]}, readonly=True),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True, states={'draft': [('readonly', False)]}, readonly=True),
'partner_id': fields.many2one( 'res.partner', 'Customer', change_default=True, select=1, states={'draft': [('readonly', False)], 'paid': [('readonly', False)]}),
'state': fields.selection([('draft', 'Quotation'), ('payment', 'Payment'),
@ -1046,6 +1043,7 @@ class pos_order_line(osv.osv):
tax_amount = 0.0
taxes = [t for t in line.product_id.taxes_id]
if line.qty == 0.0:
res[line.id][f] = 0.0
continue
computed_taxes = account_tax_obj.compute_all(cr, uid, taxes, line.price_unit, line.qty)['taxes']
for tax in computed_taxes:
@ -1265,55 +1263,6 @@ class pos_order_line(osv.osv):
pos_order_line()
class pos_payment(osv.osv):
_name = 'pos.payment'
_description = 'Pos Payment'
def _journal_get(self, cr, uid, context=None):
obj = self.pool.get('account.journal')
ids = obj.search(cr, uid, [('type', '=', 'cash')])
res = obj.read(cr, uid, ids, ['id', 'name'], context)
res = [(r['id'], r['name']) for r in res]
return res
def _journal_default(self, cr, uid, context=None):
journal_list = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash')])
if journal_list:
return journal_list[0]
else:
return False
_columns = {
'name': fields.char('Description', size=64),
'order_id': fields.many2one('pos.order', 'Order Ref', required=True, ondelete='cascade'),
'journal_id': fields.many2one('account.journal', "Journal", required=True),
'payment_id': fields.many2one('account.payment.term','Payment Term', select=True),
'payment_nb': fields.char('Piece Number', size=32),
'payment_name': fields.char('Payment Name', size=32),
'payment_date': fields.date('Payment Date', required=True),
'amount': fields.float('Amount', required=True),
}
_defaults = {
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'pos.payment'),
'journal_id': _journal_default,
'payment_date': lambda *a: time.strftime('%Y-%m-%d'),
}
def create(self, cr, user, vals, context=None):
if vals.get('journal_id') and vals.get('amount'):
return super(pos_payment, self).create(cr, user, vals, context)
return False
def write(self, cr, user, ids, values, context=None):
if 'amount' in values and not values['amount']:
return False
if 'journal_id' in values and not values['journal_id']:
return False
return super(pos_payment, self).write(cr, user, ids, values, context)
pos_payment()
class product_product(osv.osv):
_inherit = 'product.product'
_columns = {

View File

@ -9,7 +9,7 @@
name="pos.invoice"
auto="False"
multi="True"
rml="account/report/invoice.rml"
rml="account/report/account_print_invoice.rml"
/>
<report

View File

@ -17,17 +17,6 @@
<field name="padding">3</field>
</record>
<record model="ir.sequence.type" id="seq_type_pos_payment">
<field name="name">POS Payment</field>
<field name="code">pos.payment</field>
</record>
<record model="ir.sequence" id="seq_pos_payment">
<field name="name">POS Payment</field>
<field name="code">pos.payment</field>
<field name="prefix">Payment/</field>
<field name="padding">2</field>
</record>
<record model="ir.sequence.type" id="seq_type_pos_order_line">
<field name="name">POS order line</field>
<field name="code">pos.order.line</field>

Some files were not shown because too many files have changed in this diff Show More