diff --git a/app_odoo_customize/__manifest__.py b/app_odoo_customize/__manifest__.py index 3ce128b7..14d493e7 100644 --- a/app_odoo_customize/__manifest__.py +++ b/app_odoo_customize/__manifest__.py @@ -23,7 +23,7 @@ { 'name': 'Odoo Customize(Debranding, My Odoo)', - 'version': '12.19.07.06', + 'version': '13.19.07.12', 'author': 'Sunpop.cn', 'category': 'Productivity', 'website': 'https://www.sunpop.cn', @@ -70,6 +70,7 @@ 26. Add multi uninstall modules 27. Add odoo 13 support, Just install this app on odoo 13, master branch of odoo github. 28. Fix pos remove data for account close. + 29. Fix account reset. This module can help to white label the Odoo. Also helpful for training and support for your odoo end-user. diff --git a/app_odoo_customize/models/res_config_settings.py b/app_odoo_customize/models/res_config_settings.py index 4729db89..d0807fc0 100644 --- a/app_odoo_customize/models/res_config_settings.py +++ b/app_odoo_customize/models/res_config_settings.py @@ -268,6 +268,34 @@ class ResConfigSettings(models.TransientModel): pass # raise Warning(e) return True + @api.multi + def remove_expense(self): + to_removes = [ + # 清除 + ['hr.expense.sheet', ], + ['hr.expense', ], + ['hr.payslip', ], + ['hr.payslip.run', ], + ] + 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) + # 更新序号 + seqs = self.env['ir.sequence'].search([ + ('code', '=', 'hr.expense.invoice')]) + for seq in seqs: + seq.write({ + 'number_next': 1, + }) + self._cr.execute(sql) + except Exception as e: + pass # raise Warning(e) + return True + @api.multi def remove_mrp(self): to_removes = [ @@ -426,13 +454,63 @@ class ResConfigSettings(models.TransientModel): def remove_account_chart(self): to_removes = [ # 清除财务科目,用于重设 + ['res.partner.bank', ], + ['res.bank', ], + ['account.move.line'], + ['account.invoice'], + ['account.payment'], + ['account.bank.statement', ], ['account.tax.account.tag', ], ['account.tax', ], + ['account.tax', ], ['account.account.account.tag', ], ['wizard_multi_charts_accounts'], ['account.account', ], ['account.journal', ], ] + # todo: 要做 remove_hr,因为工资表会用到 account + # 更新account关联,很多是多公司字段,故只存在 ir_property,故在原模型,只能用update + try: + # reset default tax,不管多公司 + field1 = self.env['ir.model.fields']._get('product.template', "taxes_id").id + field2 = self.env['ir.model.fields']._get('product.template', "supplier_taxes_id").id + + sql = ("delete from ir_default where field_id = %s or field_id = %s") % (field1, field2) + self._cr.execute(sql) + except Exception as e: + pass # raise Warning(e) + try: + rec = self.env['res.partner'].search([]) + for r in rec: + r.write({ + 'property_account_receivable_id': None, + 'property_account_payable_id': None, + }) + except Exception as e: + pass # raise Warning(e) + try: + rec = self.env['product.category'].search([]) + for r in rec: + r.write({ + 'property_account_income_categ_id': None, + 'property_account_expense_categ_id': None, + 'property_account_creditor_price_difference_categ': None, + 'property_stock_account_input_categ_id': None, + 'property_stock_account_output_categ_id': None, + 'property_stock_valuation_account_id': None, + }) + except Exception as e: + pass # raise Warning(e) + try: + rec = self.env['stock.location'].search([]) + for r in rec: + r.write({ + 'valuation_in_account_id': None, + 'valuation_out_account_id': None, + }) + except Exception as e: + pass # raise Warning(e) + try: for line in to_removes: obj_name = line[0] @@ -441,18 +519,13 @@ class ResConfigSettings(models.TransientModel): sql = "delete from %s" % obj._table self._cr.execute(sql) - # reset default tax,不管多公司 - field1 = self.env['ir.model.fields']._get('product.template', "taxes_id").id - field2 = self.env['ir.model.fields']._get('product.template', "supplier_taxes_id").id - sql = ("delete from ir_default where field_id = %s or field_id = %s") % (field1, field2) - self._cr.execute(sql) - - sql = "update res_company set chart_template_id=null ;" + sql = "update res_company set chart_template_id=null;" self._cr.execute(sql) # 更新序号 except Exception as e: pass + return True @api.multi diff --git a/app_product_weight_sale/models/sale_order.py b/app_product_weight_sale/models/sale_order.py index e1a2251b..e37dacc7 100644 --- a/app_product_weight_sale/models/sale_order.py +++ b/app_product_weight_sale/models/sale_order.py @@ -7,6 +7,7 @@ class SaleOrder(models.Model): _inherit = "sale.order" def _get_default_weight_uom_name(self): + # todo: 此处没有处理翻译,后续调整 get_param = self.env['ir.config_parameter'].sudo().get_param product_weight_in_lbs_param = get_param('product.weight_in_lbs') if product_weight_in_lbs_param == '1': diff --git a/app_stock_location_capacity/__manifest__.py b/app_stock_location_capacity/__manifest__.py index 6b0686dc..10cbf54b 100644 --- a/app_stock_location_capacity/__manifest__.py +++ b/app_stock_location_capacity/__manifest__.py @@ -23,21 +23,22 @@ { 'name': "Capacity of Stock Location,货架容量管理", - 'version': '12.19.03.18', + 'version': '12.19.07.12', 'author': 'Sunpop.cn', 'category': 'Warehouse', 'website': 'http://www.sunpop.cn', 'license': 'LGPL-3', 'sequence': 2, 'summary': """ - Add stock shelf, stock rack, stock slot manager. Shelf Auto Name with XYZ like WH-X1-Y2-Z6. - Add shelf menu. + Capacity manage for stock location.stock Capacity. + Capacity by quantity and certain order, like sale order. + set prepare location for sale order. """, 'description': """ 1. """, - 'price': 68.00, + 'price': 98.00, 'currency': 'EUR', 'depends': [ 'stock', diff --git a/app_stock_location_capacity/static/description/demo1.jpg b/app_stock_location_capacity/static/description/demo1.jpg new file mode 100644 index 00000000..6df96b5f Binary files /dev/null and b/app_stock_location_capacity/static/description/demo1.jpg differ diff --git a/app_stock_location_capacity/static/description/demo2.jpg b/app_stock_location_capacity/static/description/demo2.jpg new file mode 100644 index 00000000..32409d74 Binary files /dev/null and b/app_stock_location_capacity/static/description/demo2.jpg differ diff --git a/app_stock_location_capacity/static/description/demo3.jpg b/app_stock_location_capacity/static/description/demo3.jpg new file mode 100644 index 00000000..3b7300c5 Binary files /dev/null and b/app_stock_location_capacity/static/description/demo3.jpg differ diff --git a/app_stock_location_capacity/static/description/index.html b/app_stock_location_capacity/static/description/index.html index 5fcfa7e3..f19a14b5 100644 --- a/app_stock_location_capacity/static/description/index.html +++ b/app_stock_location_capacity/static/description/index.html @@ -1,9 +1,9 @@
-

App Shelf manage of stock

+

Capacity of Stock Location

-

This moduld allows user to manager shelf report.

+

This moduld allows user to manager Capacity of Stock Location.

Lastest update: v12.19.1.6

@@ -11,11 +11,11 @@
  • - 1. Add shelf manage menu, default value. + 1. Add Capacity manage for stock location.
  • - 2. Shelf Auto Name with XYZ like WH-X1-Y2-Z6. + 2. Capacity by quantity and certain order. set location for every sale order
@@ -31,18 +31,24 @@
-

Add stock shelf, stock rack, stock slot manager. Shelf Auto Name with XYZ like WH-X1-Y2-Z6.

+

Capacity manage for stock location.

- -

-

Set is shelf location?

-

Auto name shelf.

+
+

+
+

Capacity by quantity and certain order.

+
+
+ +

+
diff --git a/app_stock_location_capacity/views/stock_location_views.xml b/app_stock_location_capacity/views/stock_location_views.xml index fe7bab14..e22a053b 100644 --- a/app_stock_location_capacity/views/stock_location_views.xml +++ b/app_stock_location_capacity/views/stock_location_views.xml @@ -69,7 +69,7 @@ - +