Field not found after modifying mrp_production.py file odoo












0















A Quotation is been created, and a description has been written. Since this product is to be manufactured. A work order will be created.



enter image description here



The Work Order does not have the description line, as shown in the image below.



enter image description here



Thus, I modify the below file (mrp_production_views.xml) to add the fields



line 111 <field name="description" string="Description"/>



and in mrp_production.py



description = fields.one2many('sale.order.line', 'name', related='sale.order_id', readonly=True)


Then I get this error. I'm sure the problem is in the above python statement.




2019-01-03 07:49:16,463 13284 INFO test werkzeug: 127.0.0.1 - -
[03/Jan/2019 07:49:16] "POST /longpolling/poll HTTP/1.1" 500 -
2019-01-03 07:49:16,467 13284 ERROR test werkzeug: Error on request:
Traceback (most recent call last): File "C:Program
FilesPython37libsite-packageswerkzeugserving.py", line 270, in
run_wsgi
execute(self.server.app) File "C:Program FilesPython37libsite-packageswerkzeugserving.py", line 258, in
execute
application_iter = app(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodooserviceserver.py", line 260, in app
return self.app(e, s) File "C:Program Files (x86)Odoo 11.0serverodooservicewsgi_server.py", line 166, in application
return application_unproxied(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodooservicewsgi_server.py",
line 154, in application_unproxied
result = handler(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodoohttp.py", line 1319, in call
return self.dispatch(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodoohttp.py", line 1474, in dispatch
odoo.registry(db).check_signaling() File "C:Program Files (x86)Odoo 11.0serverodoo__init__.py", line 76, in registry
return modules.registry.Registry(database_name) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 61, in
new
return cls.new(db_name) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "C:Program Files (x86)Odoo
11.0serverodoomodulesloading.py", line 376, in load_modules
force, status, report, loaded_modules, update_module, models_to_check) File "C:Program Files (x86)Odoo
11.0serverodoomodulesloading.py", line 274, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check File "C:Program Files (x86)Odoo
11.0serverodoomodulesloading.py", line 152, in load_module_graph
registry.setup_models(cr) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 277, in setup_models
model._setup_fields() File "C:Program Files (x86)Odoo 11.0serverodoomodels.py", line 2425, in _setup_fields
field.setup_full(self) File "C:Program Files (x86)Odoo 11.0serverodoofields.py", line 471, in setup_full
self._setup_related_full(model) File "C:Program Files (x86)Odoo 11.0serverodoofields.py", line 508, in
_setup_related_full
field = target._fields[name] KeyError: 'manufacturing_lead'











share|improve this question





























    0















    A Quotation is been created, and a description has been written. Since this product is to be manufactured. A work order will be created.



    enter image description here



    The Work Order does not have the description line, as shown in the image below.



    enter image description here



    Thus, I modify the below file (mrp_production_views.xml) to add the fields



    line 111 <field name="description" string="Description"/>



    and in mrp_production.py



    description = fields.one2many('sale.order.line', 'name', related='sale.order_id', readonly=True)


    Then I get this error. I'm sure the problem is in the above python statement.




    2019-01-03 07:49:16,463 13284 INFO test werkzeug: 127.0.0.1 - -
    [03/Jan/2019 07:49:16] "POST /longpolling/poll HTTP/1.1" 500 -
    2019-01-03 07:49:16,467 13284 ERROR test werkzeug: Error on request:
    Traceback (most recent call last): File "C:Program
    FilesPython37libsite-packageswerkzeugserving.py", line 270, in
    run_wsgi
    execute(self.server.app) File "C:Program FilesPython37libsite-packageswerkzeugserving.py", line 258, in
    execute
    application_iter = app(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodooserviceserver.py", line 260, in app
    return self.app(e, s) File "C:Program Files (x86)Odoo 11.0serverodooservicewsgi_server.py", line 166, in application
    return application_unproxied(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodooservicewsgi_server.py",
    line 154, in application_unproxied
    result = handler(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodoohttp.py", line 1319, in call
    return self.dispatch(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodoohttp.py", line 1474, in dispatch
    odoo.registry(db).check_signaling() File "C:Program Files (x86)Odoo 11.0serverodoo__init__.py", line 76, in registry
    return modules.registry.Registry(database_name) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 61, in
    new
    return cls.new(db_name) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 85, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "C:Program Files (x86)Odoo
    11.0serverodoomodulesloading.py", line 376, in load_modules
    force, status, report, loaded_modules, update_module, models_to_check) File "C:Program Files (x86)Odoo
    11.0serverodoomodulesloading.py", line 274, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check File "C:Program Files (x86)Odoo
    11.0serverodoomodulesloading.py", line 152, in load_module_graph
    registry.setup_models(cr) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 277, in setup_models
    model._setup_fields() File "C:Program Files (x86)Odoo 11.0serverodoomodels.py", line 2425, in _setup_fields
    field.setup_full(self) File "C:Program Files (x86)Odoo 11.0serverodoofields.py", line 471, in setup_full
    self._setup_related_full(model) File "C:Program Files (x86)Odoo 11.0serverodoofields.py", line 508, in
    _setup_related_full
    field = target._fields[name] KeyError: 'manufacturing_lead'











    share|improve this question



























      0












      0








      0








      A Quotation is been created, and a description has been written. Since this product is to be manufactured. A work order will be created.



      enter image description here



      The Work Order does not have the description line, as shown in the image below.



      enter image description here



      Thus, I modify the below file (mrp_production_views.xml) to add the fields



      line 111 <field name="description" string="Description"/>



      and in mrp_production.py



      description = fields.one2many('sale.order.line', 'name', related='sale.order_id', readonly=True)


      Then I get this error. I'm sure the problem is in the above python statement.




      2019-01-03 07:49:16,463 13284 INFO test werkzeug: 127.0.0.1 - -
      [03/Jan/2019 07:49:16] "POST /longpolling/poll HTTP/1.1" 500 -
      2019-01-03 07:49:16,467 13284 ERROR test werkzeug: Error on request:
      Traceback (most recent call last): File "C:Program
      FilesPython37libsite-packageswerkzeugserving.py", line 270, in
      run_wsgi
      execute(self.server.app) File "C:Program FilesPython37libsite-packageswerkzeugserving.py", line 258, in
      execute
      application_iter = app(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodooserviceserver.py", line 260, in app
      return self.app(e, s) File "C:Program Files (x86)Odoo 11.0serverodooservicewsgi_server.py", line 166, in application
      return application_unproxied(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodooservicewsgi_server.py",
      line 154, in application_unproxied
      result = handler(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodoohttp.py", line 1319, in call
      return self.dispatch(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodoohttp.py", line 1474, in dispatch
      odoo.registry(db).check_signaling() File "C:Program Files (x86)Odoo 11.0serverodoo__init__.py", line 76, in registry
      return modules.registry.Registry(database_name) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 61, in
      new
      return cls.new(db_name) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 85, in new
      odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "C:Program Files (x86)Odoo
      11.0serverodoomodulesloading.py", line 376, in load_modules
      force, status, report, loaded_modules, update_module, models_to_check) File "C:Program Files (x86)Odoo
      11.0serverodoomodulesloading.py", line 274, in load_marked_modules
      perform_checks=perform_checks, models_to_check=models_to_check File "C:Program Files (x86)Odoo
      11.0serverodoomodulesloading.py", line 152, in load_module_graph
      registry.setup_models(cr) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 277, in setup_models
      model._setup_fields() File "C:Program Files (x86)Odoo 11.0serverodoomodels.py", line 2425, in _setup_fields
      field.setup_full(self) File "C:Program Files (x86)Odoo 11.0serverodoofields.py", line 471, in setup_full
      self._setup_related_full(model) File "C:Program Files (x86)Odoo 11.0serverodoofields.py", line 508, in
      _setup_related_full
      field = target._fields[name] KeyError: 'manufacturing_lead'











      share|improve this question
















      A Quotation is been created, and a description has been written. Since this product is to be manufactured. A work order will be created.



      enter image description here



      The Work Order does not have the description line, as shown in the image below.



      enter image description here



      Thus, I modify the below file (mrp_production_views.xml) to add the fields



      line 111 <field name="description" string="Description"/>



      and in mrp_production.py



      description = fields.one2many('sale.order.line', 'name', related='sale.order_id', readonly=True)


      Then I get this error. I'm sure the problem is in the above python statement.




      2019-01-03 07:49:16,463 13284 INFO test werkzeug: 127.0.0.1 - -
      [03/Jan/2019 07:49:16] "POST /longpolling/poll HTTP/1.1" 500 -
      2019-01-03 07:49:16,467 13284 ERROR test werkzeug: Error on request:
      Traceback (most recent call last): File "C:Program
      FilesPython37libsite-packageswerkzeugserving.py", line 270, in
      run_wsgi
      execute(self.server.app) File "C:Program FilesPython37libsite-packageswerkzeugserving.py", line 258, in
      execute
      application_iter = app(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodooserviceserver.py", line 260, in app
      return self.app(e, s) File "C:Program Files (x86)Odoo 11.0serverodooservicewsgi_server.py", line 166, in application
      return application_unproxied(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodooservicewsgi_server.py",
      line 154, in application_unproxied
      result = handler(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodoohttp.py", line 1319, in call
      return self.dispatch(environ, start_response) File "C:Program Files (x86)Odoo 11.0serverodoohttp.py", line 1474, in dispatch
      odoo.registry(db).check_signaling() File "C:Program Files (x86)Odoo 11.0serverodoo__init__.py", line 76, in registry
      return modules.registry.Registry(database_name) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 61, in
      new
      return cls.new(db_name) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 85, in new
      odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "C:Program Files (x86)Odoo
      11.0serverodoomodulesloading.py", line 376, in load_modules
      force, status, report, loaded_modules, update_module, models_to_check) File "C:Program Files (x86)Odoo
      11.0serverodoomodulesloading.py", line 274, in load_marked_modules
      perform_checks=perform_checks, models_to_check=models_to_check File "C:Program Files (x86)Odoo
      11.0serverodoomodulesloading.py", line 152, in load_module_graph
      registry.setup_models(cr) File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 277, in setup_models
      model._setup_fields() File "C:Program Files (x86)Odoo 11.0serverodoomodels.py", line 2425, in _setup_fields
      field.setup_full(self) File "C:Program Files (x86)Odoo 11.0serverodoofields.py", line 471, in setup_full
      self._setup_related_full(model) File "C:Program Files (x86)Odoo 11.0serverodoofields.py", line 508, in
      _setup_related_full
      field = target._fields[name] KeyError: 'manufacturing_lead'








      python odoo






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 3 at 10:19









      Dominique

      2,38042042




      2,38042042










      asked Jan 3 at 7:54









      Charm_quarkCharm_quark

      2501320




      2501320
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Try this one:



          description = fields.one2many(related='sale.order_id', readonly=True)






          share|improve this answer
























          • does not work.. File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 250, in load model = cls._build_model(self, cr) File "C:Program Files (x86)Odoo 11.0serverodoomodels.py", line 428, in _build_model raise TypeError("Model %r does not exist in registry." % name) TypeError: Model 'mrp.production' does not exist in registry.

            – Charm_quark
            Jan 7 at 8:37











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54018341%2ffield-not-found-after-modifying-mrp-production-py-file-odoo%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Try this one:



          description = fields.one2many(related='sale.order_id', readonly=True)






          share|improve this answer
























          • does not work.. File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 250, in load model = cls._build_model(self, cr) File "C:Program Files (x86)Odoo 11.0serverodoomodels.py", line 428, in _build_model raise TypeError("Model %r does not exist in registry." % name) TypeError: Model 'mrp.production' does not exist in registry.

            – Charm_quark
            Jan 7 at 8:37
















          0














          Try this one:



          description = fields.one2many(related='sale.order_id', readonly=True)






          share|improve this answer
























          • does not work.. File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 250, in load model = cls._build_model(self, cr) File "C:Program Files (x86)Odoo 11.0serverodoomodels.py", line 428, in _build_model raise TypeError("Model %r does not exist in registry." % name) TypeError: Model 'mrp.production' does not exist in registry.

            – Charm_quark
            Jan 7 at 8:37














          0












          0








          0







          Try this one:



          description = fields.one2many(related='sale.order_id', readonly=True)






          share|improve this answer













          Try this one:



          description = fields.one2many(related='sale.order_id', readonly=True)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 4 at 13:05









          Nikesh ChaudharyNikesh Chaudhary

          93




          93













          • does not work.. File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 250, in load model = cls._build_model(self, cr) File "C:Program Files (x86)Odoo 11.0serverodoomodels.py", line 428, in _build_model raise TypeError("Model %r does not exist in registry." % name) TypeError: Model 'mrp.production' does not exist in registry.

            – Charm_quark
            Jan 7 at 8:37



















          • does not work.. File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 250, in load model = cls._build_model(self, cr) File "C:Program Files (x86)Odoo 11.0serverodoomodels.py", line 428, in _build_model raise TypeError("Model %r does not exist in registry." % name) TypeError: Model 'mrp.production' does not exist in registry.

            – Charm_quark
            Jan 7 at 8:37

















          does not work.. File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 250, in load model = cls._build_model(self, cr) File "C:Program Files (x86)Odoo 11.0serverodoomodels.py", line 428, in _build_model raise TypeError("Model %r does not exist in registry." % name) TypeError: Model 'mrp.production' does not exist in registry.

          – Charm_quark
          Jan 7 at 8:37





          does not work.. File "C:Program Files (x86)Odoo 11.0serverodoomodulesregistry.py", line 250, in load model = cls._build_model(self, cr) File "C:Program Files (x86)Odoo 11.0serverodoomodels.py", line 428, in _build_model raise TypeError("Model %r does not exist in registry." % name) TypeError: Model 'mrp.production' does not exist in registry.

          – Charm_quark
          Jan 7 at 8:37




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54018341%2ffield-not-found-after-modifying-mrp-production-py-file-odoo%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas