mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update app_odoo_customize
This commit is contained in:
@@ -405,6 +405,27 @@ class AppThemeConfigSettings(models.TransientModel):
|
||||
pass # raise Warning(e)
|
||||
return True
|
||||
|
||||
@api.multi
|
||||
def remove_project(self):
|
||||
to_removes = [
|
||||
# 清除项目
|
||||
['account.analytic.line', ],
|
||||
['project.task', ],
|
||||
['project.forecast', ],
|
||||
['project.project', ],
|
||||
]
|
||||
try:
|
||||
for line in to_removes:
|
||||
obj_name = line[0]
|
||||
obj = self.pool.get(obj_name)
|
||||
if obj:
|
||||
sql = "delete from %s" % obj._table
|
||||
self._cr.execute(sql)
|
||||
# 更新序号
|
||||
except Exception as e:
|
||||
pass # raise Warning(e)
|
||||
return True
|
||||
|
||||
@api.multi
|
||||
def remove_message(self):
|
||||
to_removes = [
|
||||
@@ -441,3 +462,17 @@ class AppThemeConfigSettings(models.TransientModel):
|
||||
except Exception as e:
|
||||
pass # raise Warning(e)
|
||||
return True
|
||||
|
||||
@api.multi
|
||||
def remove_all_biz(self):
|
||||
try:
|
||||
self.remove_sales()
|
||||
self.remove_purchase()
|
||||
self.remove_account()
|
||||
self.remove_mrp()
|
||||
self.remove_inventory()
|
||||
self.remove_project()
|
||||
self.remove_message()
|
||||
except Exception as e:
|
||||
pass # raise Warning(e)
|
||||
return True
|
||||
|
||||
@@ -94,21 +94,21 @@
|
||||
</group>
|
||||
<group name="data-clean" string="Data Cleaning (Be careful to do that!)">
|
||||
<label string="Sales"/>
|
||||
<div>
|
||||
<div class="mb4">
|
||||
<button string="Delete All Sales Order" type="object" name="remove_sales"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
</div>
|
||||
<label string="POS"/>
|
||||
<div>
|
||||
<div class="mb4">
|
||||
<button string="Delete All POS Order" type="object" name="remove_pos" confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
</div>
|
||||
<label string="Purchase"/>
|
||||
<div>
|
||||
<div class="mb4">
|
||||
<button string="Delete All Purchase Order and Requisition" type="object" name="remove_purchase"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
</div>
|
||||
<label string="MRP"/>
|
||||
<div>
|
||||
<div class="mb4">
|
||||
<button string="Delete All Manufacturing Order" type="object" name="remove_mrp"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
|
|
||||
@@ -116,17 +116,22 @@
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
</div>
|
||||
<label string="Inventory"/>
|
||||
<div>
|
||||
<div class="mb4">
|
||||
<button string="Delete All Move/Picking/Package/Lot" type="object" name="remove_inventory"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
</div>
|
||||
<label string="Accounting"/>
|
||||
<div>
|
||||
<div class="mb4">
|
||||
<button string="Delete All Voucher/Invoice/Bill" type="object" name="remove_account"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
</div>
|
||||
<label string="Project"/>
|
||||
<div class="mb4">
|
||||
<button string="Delete All Project/Task/Forecast" type="object" name="remove_project"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
</div>
|
||||
<label string="Base Models"/>
|
||||
<div>
|
||||
<div class="mb4">
|
||||
<button string="Delete All Product" type="object" name="remove_product"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
|
|
||||
@@ -139,6 +144,11 @@
|
||||
<button string="Delete All Workflow" type="object" name="remove_workflow"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
</div>
|
||||
<label string="All Business"/>
|
||||
<div class="mb4">
|
||||
<button string="Delete All MRP/Sale/Purchase/Account/MRP/Inventory/Project/Message/Workflow" type="object" name="remove_all_biz"
|
||||
confirm="Please confirm to delete the select data?" class="oe_highlight"/>
|
||||
</div>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
|
||||
{
|
||||
"name": 'App procurement for service, Subcontracted service',
|
||||
"summary": 'procurement for service, Subcontracted service, base on oca Subcontracted service',
|
||||
"summary": 'procurement for service(委外采购), Subcontracted service, base on oca Subcontracted service',
|
||||
"version": "11.0.1.0.0",
|
||||
"category": "Purchase",
|
||||
"website": "http://www.sunpop.cn/",
|
||||
"author": "Sunpop.cn",
|
||||
"license": "AGPL-3",
|
||||
'sequence': 3,
|
||||
"application": False,
|
||||
"installable": True,
|
||||
"depends": [
|
||||
|
||||
@@ -1,55 +1,54 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * app_procurement_for_service
|
||||
# * app_procurement_for_service
|
||||
#
|
||||
# Translators:
|
||||
# OCA Transbot <transbot@odoo-community.org>, 2017
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Project-Id-Version: Odoo Server 11.0+e-20180617\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-06-22 02:44+0000\n"
|
||||
"PO-Revision-Date: 2017-06-22 02:44+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
|
||||
"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n"
|
||||
"POT-Creation-Date: 2018-07-20 11:07+0000\n"
|
||||
"PO-Revision-Date: 2018-07-20 11:07+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Language: zh_CN\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: app_procurement_for_service
|
||||
#: model:ir.model,name:app_procurement_for_service.model_procurement_order
|
||||
msgid "Procurement"
|
||||
msgstr ""
|
||||
#: code:addons/app_procurement_for_service/models/warehouse.py:29
|
||||
#, python-format
|
||||
msgid "%s: Subcontracting service rule"
|
||||
msgstr "%s: 委外服务路线"
|
||||
|
||||
#. module: app_procurement_for_service
|
||||
#: model:ir.model,name:app_procurement_for_service.model_product_product
|
||||
msgid "Product"
|
||||
msgstr "产品"
|
||||
#: model:ir.model,name:app_procurement_for_service.model_procurement_group
|
||||
msgid "Procurement Requisition"
|
||||
msgstr "补货申请"
|
||||
|
||||
#. module: app_procurement_for_service
|
||||
#: model:ir.model,name:app_procurement_for_service.model_product_template
|
||||
msgid "Product Template"
|
||||
msgstr ""
|
||||
msgstr "产品模板"
|
||||
|
||||
#. module: app_procurement_for_service
|
||||
#: model:ir.model.fields,field_description:app_procurement_for_service.field_product_product_property_app_procurement_for_service
|
||||
#: model:ir.model.fields,field_description:app_procurement_for_service.field_product_template_property_app_procurement_for_service
|
||||
#: model:ir.model.fields,field_description:app_procurement_for_service.field_product_product_property_subcontracted_service
|
||||
#: model:ir.model.fields,field_description:app_procurement_for_service.field_product_template_property_subcontracted_service
|
||||
msgid "Subcontracted Service"
|
||||
msgstr ""
|
||||
msgstr "Subcontracted Service"
|
||||
|
||||
#. module: app_procurement_for_service
|
||||
#: model:ir.ui.view,arch_db:app_procurement_for_service.view_warehouse
|
||||
msgid "Subcontracting"
|
||||
msgstr ""
|
||||
msgstr "委外服务"
|
||||
|
||||
#. module: app_procurement_for_service
|
||||
#: model:ir.model.fields,field_description:app_procurement_for_service.field_stock_warehouse_subcontracting_service_proc_rule_id
|
||||
msgid "Subcontracting Service Procurement Rule"
|
||||
msgstr ""
|
||||
msgstr "委外服务补货规则"
|
||||
|
||||
#. module: app_procurement_for_service
|
||||
#: model:ir.model,name:app_procurement_for_service.model_stock_warehouse
|
||||
msgid "Warehouse"
|
||||
msgstr ""
|
||||
msgstr "仓库"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# (http://www.eficent.com)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import api, fields, models
|
||||
from odoo import api, fields, models, _
|
||||
|
||||
|
||||
class StockWarehouse(models.Model):
|
||||
@@ -26,10 +26,11 @@ class StockWarehouse(models.Model):
|
||||
],
|
||||
limit=1
|
||||
)
|
||||
return {'name': '%s: Subcontracting service rule' % self.name,
|
||||
return {'name': _('%s: Subcontracting service rule' % self.name),
|
||||
'company_id': self.company_id.id,
|
||||
'action': 'buy',
|
||||
'picking_type_id': picking_type.id,
|
||||
'location_id': picking_type.default_location_dest_id.id,
|
||||
'route_id': self._get_buy_route(),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user