{"id":224907,"date":"2014-06-02T16:04:03","date_gmt":"2014-06-02T12:04:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=224907"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=224907","title":{"rendered":"<span class=\"post_title\">\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 ERP \u043d\u0430 tryton: \u0427\u0430\u0441\u0442\u044c 3<\/span>"},"content":{"rendered":"<div class=\"content html_format\">     \t\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438(company), \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438(party), \u0442\u043e\u0432\u0430\u0440\u043e\u0432(product) \u0438 \u0441\u043a\u043b\u0430\u0434\u0430(stock).<\/p>\n<p>  <a name=\"habracut\"><\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/222121\/\">\u0427\u0430\u0441\u0442\u044c 1: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 tryotnd, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0411\u0414<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/221887\/\">\u0427\u0430\u0441\u0442\u044c 2: \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/224907\/\">\u0427\u0430\u0441\u0442\u044c 3: \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438(company), \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438(party), \u0442\u043e\u0432\u0430\u0440\u043e\u0432(product) \u0438 \u0441\u043a\u043b\u0430\u0434\u0430(stock).<\/a><\/p>\n<h4>1. \u041f\u0440\u0438\u043c\u0435\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/h4>\n<p>  \u0423 \u043d\u0430\u0441 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u043a\u043b\u0430\u0434\u0430. \u0422\u0430\u043a \u0447\u0442\u043e \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. <\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f stock, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043c\u043e\u0434\u0443\u043b\u044f \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>ir.module.dependencies<\/code>, \u043d\u043e \u043e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u043d\u0435\u0443\u0434\u043e\u0432\u043e\u043b\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. <\/p>\n<p>  \u041c\u0435\u0442\u043e\u0434 <code>model.ir.module.module.read<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u043e\u043b\u0435 <code>dependencies<\/code>, \u043d\u043e \u0442\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e id \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u041c\u043e\u0436\u043d\u043e \u043e\u043f\u044f\u0442\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c, \u0447\u0442\u043e \u0431 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043c\u0435\u043d\u0430 \u044d\u0442\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u0425\u043e\u0442\u044f \u043f\u0440\u043e\u0449\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044c tryton.cfg, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u0440\u043d\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 depends, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438. \u0414\u043b\u044f \u0441\u043a\u043b\u0430\u0434\u0430 \u044d\u0442\u043e \u2014 company, currency, ir, party, product. \u0423 \u043c\u043e\u0434\u0443\u043b\u044f party \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0435\u0449\u0435 company. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438. <\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 <code>system.server.listMethods<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 model \u043d\u0430 625 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0435. \u041d\u0438\u0436\u0435 \u0441\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432:  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/c8d\/c52\/7e2\/c8dc527e2c2eb3c677038f02204d3551.png\"\/><\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e.<\/p>\n<h4>2. API \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438<\/h4>\n<p>  \u0423 \u0432\u0441\u0435\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0435\u0441\u0442\u044c 6 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432: create, delete, fields_get, search, read, write. \u041d\u0438\u0436\u0435 \u044f \u0440\u0430\u0441\u0441\u043f\u0438\u0448\u0443 \u0438\u0445 \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u0435\u0439.   <\/p>\n<h5>2.1. API \u043c\u043e\u0434\u0443\u043b\u044f company<\/h5>\n<p>  <\/p>\n<table>\n<tr>\n<th>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430<\/th>\n<th>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>model.company.company.search<\/td>\n<td>[user_id, cookie, [], start, end, null, {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0440\u0435\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 id \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439(id[start:end]).<\/td>\n<\/tr>\n<tr>\n<td>model.company.company.fields_get<\/td>\n<td>[user_id, cookie, [], {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0443 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u0435\u0439.<\/td>\n<\/tr>\n<tr>\n<td>model.company.company.read<\/td>\n<td>[user_id, cookie, list_of_company_ids, list_of_field_names, {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439.<\/td>\n<\/tr>\n<tr>\n<td>model.company.company.create<\/td>\n<td>[user_id, cookie, [{field_name: field_data, field_name: field_data, &#8230;}], {}]<\/td>\n<td>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044e, \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u0435 name.<\/td>\n<\/tr>\n<tr>\n<td>model.company.company.delete<\/td>\n<td>[user_id, cookie, list_delete_company_ids, {}]<\/td>\n<td>\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e id.<\/td>\n<\/tr>\n<tr>\n<td>model.company.company.write<\/td>\n<td>[user_id, cookie, list_update_company_ids, [{field_name: field_data, field_name: field_data, &#8230;}], {}]<\/td>\n<td>\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e id.<\/td>\n<\/tr>\n<\/table>\n<p>  \u0423 \u043c\u043e\u0434\u0443\u043b\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0435\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 employee, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432. \u0414\u043b\u044f \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u043d\u0430\u0434\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u0435 employ\u0435\u0435 \u0443 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.<\/p>\n<h5>2.2. API \u043c\u043e\u0434\u0443\u043b\u044f party(\u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u044b)<\/h5>\n<table>\n<tr>\n<th>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430<\/th>\n<th>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>model.party.party.search<\/td>\n<td>[user_id, cookie, [], start, end, null, {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0440\u0435\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 id \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u0432(id[start:end]).<\/td>\n<\/tr>\n<tr>\n<td>model.party.party.fields_get<\/td>\n<td>[user_id, cookie, [], {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0443 \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u0430 \u043f\u043e\u043b\u0435\u0439.<\/td>\n<\/tr>\n<tr>\n<td>model.party.party.read<\/td>\n<td>[user_id, cookie, list_of_party_ids, list_of_field_names, {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u0432.<\/td>\n<\/tr>\n<tr>\n<td>model.party.party.create<\/td>\n<td>[user_id, cookie, [{field_name: field_data, field_name: field_data, &#8230;}], {}]<\/td>\n<td>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u0430, \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u0435 name.<\/td>\n<\/tr>\n<tr>\n<td>model.party.party.delete<\/td>\n<td>[user_id, cookie, list_delete_party_ids, {}]<\/td>\n<td>\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u043f\u043e id.<\/td>\n<\/tr>\n<tr>\n<td>model.party.party.write<\/td>\n<td>[user_id, cookie, list_update_party_ids, [{field_name: field_data, field_name: field_data, &#8230;}], {}]<\/td>\n<td>\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u043f\u043e id.<\/td>\n<\/tr>\n<\/table>\n<p>  \u0423 \u043c\u043e\u0434\u0443\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u043e\u0432 \u0435\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 address, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u0430\u043c. \u042d\u0442\u043e\u0442 \u0436\u0435 \u043a\u043b\u0430\u0441\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u0441\u043a\u043b\u0430\u0434\u0430. <\/p>\n<h5>2.3. API \u043c\u043e\u0434\u0443\u043b\u044f product<\/h5>\n<p>  <\/p>\n<table>\n<tr>\n<th>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430<\/th>\n<th>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>model.product.product.search<\/td>\n<td>[user_id, cookie, [], start, end, null, {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0440\u0435\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 id \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432(id[start:end]).<\/td>\n<\/tr>\n<tr>\n<td>model.product.product.fields_get<\/td>\n<td>[user_id, cookie, [], {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0443 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u043f\u043e\u043b\u0435\u0439.<\/td>\n<\/tr>\n<tr>\n<td>model.product.product.read<\/td>\n<td>[user_id, cookie, list_of_product_ids, list_of_field_names, {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432.<\/td>\n<\/tr>\n<tr>\n<td>model.product.product.create<\/td>\n<td>[user_id, cookie, [{field_name: field_data, field_name: field_data, &#8230;}], {}]<\/td>\n<td>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442, \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u0435 name, list_price, cost_price, default_uom.<\/td>\n<\/tr>\n<tr>\n<td>model.product.product.delete<\/td>\n<td>[user_id, cookie, list_delete_product_ids, {}]<\/td>\n<td>\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u043f\u043e id.<\/td>\n<\/tr>\n<tr>\n<td>model.product.product.write<\/td>\n<td>[user_id, cookie, list_update_product_ids, [{field_name: field_data, field_name: field_data, &#8230;}], {}]<\/td>\n<td>\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u043f\u043e id.<\/td>\n<\/tr>\n<\/table>\n<p>  \u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b <code>product.template<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0447\u0442\u043e \u0438 <code>product.product<\/code>. <br \/>  \u0422\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 default_uom, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u0430. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441 <code>product.uom<\/code>. \u0421\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0435\u0434\u0438\u043d\u0438\u0446 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 <code>model.product.uom.search, model.product.uom.read<\/code>.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043f\u0438\u0441\u043e\u043a id \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 uom<\/b><\/p>\n<div class=\"spoiler_text\">\n<table>\n<tr>\n<th>id<\/th>\n<th>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>\u0428\u0442\u0443\u043a\u0430<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>\u041a\u0438\u043b\u043e\u0433\u0440\u0430\u043c\u043c<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>\u0413\u0440\u0430\u043c\u043c<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>\u041a\u0430\u0440\u0430\u0442<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>\u0424\u0443\u043d\u0442<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>\u0423\u043d\u0446\u0438\u044f<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td>\u0421\u0435\u043a\u0443\u043d\u0434\u0430<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>\u041c\u0438\u043d\u0443\u0442\u0430<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>\u0427\u0430\u0441<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0434\u0435\u043d\u044c<\/td>\n<\/tr>\n<tr>\n<td>11<\/td>\n<td>\u0414\u0435\u043d\u044c<\/td>\n<\/tr>\n<tr>\n<td>12<\/td>\n<td>\u041c\u0435\u0442\u0440<\/td>\n<\/tr>\n<tr>\n<td>13<\/td>\n<td>\u041a\u0438\u043b\u043e\u043c\u0435\u0442\u0440<\/td>\n<\/tr>\n<tr>\n<td>14<\/td>\n<td>\u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440<\/td>\n<\/tr>\n<tr>\n<td>15<\/td>\n<td>\u041c\u0438\u043b\u043b\u0438\u043c\u0435\u0442\u0440<\/td>\n<\/tr>\n<tr>\n<td>16<\/td>\n<td>\u0424\u0443\u0442<\/td>\n<\/tr>\n<tr>\n<td>17<\/td>\n<td>\u042f\u0440\u0434<\/td>\n<\/tr>\n<tr>\n<td>18<\/td>\n<td>\u0414\u044e\u0439\u043c<\/td>\n<\/tr>\n<tr>\n<td>19<\/td>\n<td>\u041c\u0438\u043b\u044f<\/td>\n<\/tr>\n<tr>\n<td>20<\/td>\n<td>\u041a\u0443\u0431\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u0440<\/td>\n<\/tr>\n<tr>\n<td>21<\/td>\n<td>\u041b\u0438\u0442\u0440<\/td>\n<\/tr>\n<tr>\n<td>22<\/td>\n<td>\u041a\u0443\u0431\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440<\/td>\n<\/tr>\n<tr>\n<td>23<\/td>\n<td>\u041a\u0443\u0431\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u044e\u0439\u043c<\/td>\n<\/tr>\n<tr>\n<td>24<\/td>\n<td>\u041a\u0443\u0431\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0443\u0442<\/td>\n<\/tr>\n<tr>\n<td>25<\/td>\n<td>\u0413\u0430\u043b\u043b\u043e\u043d<\/td>\n<\/tr>\n<tr>\n<td>26<\/td>\n<td>\u041a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439 \u043c\u0435\u0442\u0440<\/td>\n<\/tr>\n<tr>\n<td>27<\/td>\n<td>\u041a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440<\/td>\n<\/tr>\n<tr>\n<td>28<\/td>\n<td>\u0410\u0440<\/td>\n<\/tr>\n<tr>\n<td>29<\/td>\n<td>\u0413\u0435\u043a\u0442\u0430\u0440<\/td>\n<\/tr>\n<tr>\n<td>30<\/td>\n<td>\u041a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439 \u0434\u044e\u0439\u043c<\/td>\n<\/tr>\n<tr>\n<td>31<\/td>\n<td>\u041a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439 \u0444\u0443\u0442<\/td>\n<\/tr>\n<tr>\n<td>32<\/td>\n<td>\u041a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439 \u044f\u0440\u0434<\/td>\n<\/tr>\n<\/table>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">import json import requests  url = 'http:\/\/localhost:8000\/try' id = 1 methodname = 'common.server.login' params = ('test', 'test') request = json.dumps({                 'id': id,                 'method': methodname,                 'params': params,                 })  r = requests.post(url, data=request)  user_id, cookie = r.json()['result'] print user_id, cookie   id = 2 methodname = 'model.product.uom.search' params = [user_id, cookie, [], 0, 1000, None, {}]  request = json.dumps({                 'id': id,                 'method': methodname,                 'params': params,                 })  r = requests.post(url, data=request) print request uom= r.json()['result']  id = 4 methodname = 'model.product.uom.read' params = (user_id, cookie, uom, ['name'], {})  request = json.dumps({                 'id': id,                 'method': methodname,                 'params': params,                 })  r = requests.post(url, data=request) print r.json()['result'] <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h5>2.4. API \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c\u0438<\/h5>\n<p>  \u0414\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435 parent, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f id \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f.  <\/p>\n<table>\n<tr>\n<th>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430<\/th>\n<th>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>model.*.category.search<\/td>\n<td>[user_id, cookie, [], start, end, null, {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0440\u0435\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 id \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u0442\u0435\u0433\u043e\u0440\u0438\u0439(id[start:end]).<\/td>\n<\/tr>\n<tr>\n<td>model.*.category.fields_get<\/td>\n<td>[user_id, cookie, [], {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0443 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u043f\u043e\u043b\u0435\u0439.<\/td>\n<\/tr>\n<tr>\n<td>model.*.category.read<\/td>\n<td>[user_id, cookie, list_of_category_ids, list_of_field_names, {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439.<\/td>\n<\/tr>\n<tr>\n<td>model.*.category.create<\/td>\n<td>[user_id, cookie, [{field_name: field_data, field_name: field_data, &#8230;}], {}]<\/td>\n<td>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e, \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u0435 name.<\/td>\n<\/tr>\n<tr>\n<td>model.*.category.delete<\/td>\n<td>[user_id, cookie, list_delete_category_ids, {}]<\/td>\n<td>\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u043f\u043e id.<\/td>\n<\/tr>\n<tr>\n<td>model.*.category.write<\/td>\n<td>[user_id, cookie, list_update_category_ids, [{field_name: field_data, field_name: field_data, &#8230;}], {}]<\/td>\n<td>\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u043f\u043e id.<\/td>\n<\/tr>\n<\/table>\n<h5>2.5. API \u043c\u043e\u0434\u0443\u043b\u044f stock(\u0441\u043a\u043b\u0430\u0434)<\/h5>\n<p>  \u041e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u0448\u043b\u043e \u043d\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u043a\u043b\u0430\u0434\u0441\u043a\u0438\u043c\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043d\u0430\u0434\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u0440\u043e\u043c\u0435 admin, \u0438 \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u043a \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438(\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u0435 company), \u0438\u043d\u0430\u0447\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u0432 response \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c UserError.<\/p>\n<p>  \u0423 \u043c\u043e\u0434\u0443\u043b\u044f \u0441\u043a\u043b\u0430\u0434\u0430 \u0435\u0441\u0442\u044c 5 \u0442\u0438\u043f\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u0442\u043e\u0432:  <\/p>\n<ol>\n<li><b>stock.shipment.in<\/b> \u2014 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u043e\u0432\u0430\u0440\u0430 \u043d\u0430 \u0441\u043a\u043b\u0430\u0434 \u043e\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0430.<\/li>\n<li><b>stock.shipment.in.return<\/b> \u2014 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0449\u0438\u043a\u0443.<\/li>\n<li><b>stock.shipment.internal<\/b> \u2014 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043a\u043b\u0430\u0434\u0430\u043c\u0438.<\/li>\n<li><b>stock.shipment.out<\/b> \u2014 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0438 \u0442\u043e\u0432\u0430\u0440\u0430 \u0441\u043e \u0441\u043a\u043b\u0430\u0434\u0430 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044e.<\/li>\n<li><b>stock.shipment.out.return<\/b> \u2014 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0442\u043e\u0432\u0430\u0440\u0430 \u043e\u0442 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f.<\/li>\n<\/ol>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441\u0445\u0435\u043c\u0430, \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u043f\u043e \u0441\u043a\u043b\u0430\u0434\u0430\u043c:  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/c03\/e8e\/392\/c03e8e39256cfc42e43df04df9f5318d.png\"\/><\/div>\n<p>  \u0414\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043a\u043b\u0430\u0434\u043e\u0432 \u043d\u0430\u0434\u043e \u043b\u0438\u0431\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u043d\u044b\u0439 \u0441\u043a\u043b\u0430\u0434 \u0441 \u0437\u043e\u043d\u0430\u043c\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0438 \u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0438, \u043b\u0438\u0431\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043e\u043d \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e API \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u0442\u0430\u043c\u0438 \u0441\u043a\u043b\u0430\u0434\u0430, \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u0432\u0451\u0437\u0434\u043e\u0447\u043a\u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043b\u0430\u0441\u0441 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 <code>model.stock.shipment.in.search<\/code>.  <\/p>\n<table>\n<tr>\n<th>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430<\/th>\n<th>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>model.*.search<\/td>\n<td>[user_id, cookie, [], start, end, null, {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0440\u0435\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 id \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432(id[start:end]).<\/td>\n<\/tr>\n<tr>\n<td>model.*.fields_get<\/td>\n<td>[user_id, cookie, [], {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u043b\u0435\u0439.<\/td>\n<\/tr>\n<tr>\n<td>model.*.read<\/td>\n<td>[user_id, cookie, list_of_shipment_ids, list_of_field_names, {}]<\/td>\n<td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/td>\n<\/tr>\n<tr>\n<td>model.*.create<\/td>\n<td>[user_id, cookie, [{field_name: field_data, field_name: field_data, &#8230;}], {}]<\/td>\n<td>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442.<\/td>\n<\/tr>\n<tr>\n<td>model.*.delete<\/td>\n<td>[user_id, cookie, list_delete_shipment_ids, {}]<\/td>\n<td>\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043f\u043e id.<\/td>\n<\/tr>\n<tr>\n<td>model.*.write<\/td>\n<td>[user_id, cookie, list_update_shipment_ids, [{field_name: field_data, field_name: field_data, &#8230;}], {}]<\/td>\n<td>\u0418\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e id.<\/td>\n<\/tr>\n<tr>\n<td>model.*.wait<\/td>\n<td>[user_id, cookie, list_shipment_ids, {}]<\/td>\n<td>\u041c\u0435\u043d\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043f\u043e id.<\/td>\n<\/tr>\n<tr>\n<td>model.*.done<\/td>\n<td>[user_id, cookie, list_shipment_ids, {}]<\/td>\n<td>\u041c\u0435\u043d\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043f\u043e id.<\/td>\n<\/tr>\n<\/table>\n<p>  \u0423 \u043c\u043e\u0434\u0443\u043b\u044f \u0441\u043a\u043b\u0430\u0434\u0430 \u0435\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 location \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e \u0441\u043a\u043b\u0430\u0434\u0430\u043c\u0438, \u0430 \u043d\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u043f\u043e \u0441\u043a\u043b\u0430\u0434\u0430\u043c \u0438 \u0437\u043e\u043d\u0430\u043c.<\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 model.stock.shipment.in.create <code>[user_id, cookie, [{&quot;company&quot;: 1, &quot;incoming_moves&quot;: [[&quot;create&quot;, [{&quot;to_location&quot;: 1, &quot;product&quot;: 1, &quot;from_location&quot;: 5, &quot;company&quot;: 1, &quot;unit_price&quot;: {&quot;decimal&quot;: &quot;12.000&quot;, &quot;__class__&quot;: &quot;Decimal&quot;}, &quot;currency&quot;: 123, &quot;uom&quot;: 2, &quot;quantity&quot;: 90.0}]]], &quot;warehouse&quot;: 4, &quot;supplier&quot;: 1}], {}]<\/code>. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u00abunit_price\u00bb: {\u00abdecimal\u00bb: \u00ab12.000\u00bb, &quot;__class__&quot;: \u00abDecimal\u00bb}, \u0435\u0441\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u00abunit_price\u00bb: 12.000, \u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u043a\u043b\u0430\u0434\u0430 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u043d\u0443\u0436\u043d\u044b\u0439 \u0435\u043c\u0443 \u0432 \u043a\u043b\u0430\u0441\u0441 Decimal. \u0422\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u043e\u043b\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0446\u0435\u043d\u0443.<\/p>\n<p>  \u0423 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0438 stock.shipment.in, \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u2014 draft(\u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a), done(\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e). \u0423 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0442\u0440\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u2014 draft(\u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a), wait(\u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435), done(\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e). \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043e\u0442\u0447\u0435\u0442\u044b \u043e\u0431 \u043e\u0441\u0442\u0430\u0442\u043a\u0430\u0445 \u043f\u043e \u0442\u043e\u0432\u0430\u0440\u0430\u043c \u0438 \u0441\u043a\u043b\u0430\u0434\u0430\u043c. \u0415\u0441\u043b\u0438 \u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 draft, \u0442\u043e \u0442\u043e\u0432\u0430\u0440 \u0443\u043a\u0430\u0437\u0430\u043d\u044b\u0439 \u0432 \u043d\u0451\u043c \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0442\u0447\u0435\u0442\u0430\u0445. \u0415\u0441\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 wait, \u0442\u043e \u0432 \u043e\u0442\u0447\u0435\u0442\u0430\u0445 \u0442\u043e\u0432\u0430\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u043a\u043b\u0430\u0434\u0435 \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435\/\u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0430. \u0415\u0441\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 done, \u0442\u043e \u0442\u043e\u0432\u0430\u0440 \u0432 \u043e\u0442\u0447\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u043a\u043b\u0430\u0434\u0435 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435\/\u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0430.<\/p>\n<p>  \u0423 \u043c\u043e\u0434\u0443\u043b\u044f \u0441\u043a\u043b\u0430\u0434\u0430 \u0435\u0441\u0442\u044c \u043e\u0442\u0447\u0435\u0442 \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0446\u0438 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043a\u043b\u0430\u0434\u0435\/\u0437\u043e\u043d\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0438-\u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0438 \u2014 wizard.stock.products_by_locations. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 wizard. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 create \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0411\u0414 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0411\u0414, \u043c\u0435\u0442\u043e\u0434 execute \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0431\u0434, \u043c\u0435\u0442\u043e\u0434 delete \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0438\u0437 \u0411\u0414 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<table>\n<tr>\n<th>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430<\/th>\n<th>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<\/tr>\n<tr>\n<td>wizard.stock.products_by_locations.create<\/td>\n<td>[user_id, cookie, [], {}]<\/td>\n<td>\u0421\u043e\u0437\u0434\u0430\u0451\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043b\u044f \u043e\u0442\u0447\u0435\u0442\u0430 \u043f\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u043c \u043d\u0430 \u0441\u043a\u043b\u0430\u0434\u0435. \u041c\u0435\u0442\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 id \u043e\u0442\u0447\u0435\u0442\u0430.<\/td>\n<\/tr>\n<tr>\n<td>wizard.stock.products_by_locations.execute<\/td>\n<td>[user_id, cookie, wizard_id, {\u00abstart\u00bb: {\u00abforecast_date\u00bb: {\u00abmonth\u00bb: number_of_month, &quot;__class__&quot;: \u00abdate\u00bb, \u00abday\u00bb: number_of_day, \u00abyear\u00bb: number_of_year}}}, \u00abopen\u00bb, { \u00abactive_id\u00bb: warehouse_id, \u00abactive_model\u00bb: \u00abstock.location\u00bb, \u00abactive_ids\u00bb: [warehouse_ids]}]<\/td>\n<td>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0430\u0442\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d \u0440\u0430\u0441\u0447\u0435\u0442 \u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 \u0438 id \u0441\u043a\u043b\u0430\u0434\u0430.<\/td>\n<\/tr>\n<tr>\n<td>wizard.stock.products_by_locations.delete<\/td>\n<td>[user_id, cookie, wizard_id, {}]<\/td>\n<td>\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u043e\u0442\u0447\u0435\u0442 \u043f\u043e id.<\/td>\n<\/tr>\n<\/table>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/224907\/\"> http:\/\/habrahabr.ru\/post\/224907\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">     \t\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438(company), \u043a\u043e\u043d\u0442\u0440\u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438(party), \u0442\u043e\u0432\u0430\u0440\u043e\u0432(product) \u0438 \u0441\u043a\u043b\u0430\u0434\u0430(stock).<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-224907","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/224907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=224907"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/224907\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=224907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=224907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=224907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}